NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar hans2103
hans2103
2 Sep 2020

Pull Request for Issue # .

Summary of Changes

This pull request changes the HTML structure of the search results page.

  • media/com_finder/finder.css is cleaned (via build/media_source off-course) Most of it came from 2011. :-)
  • OL instead of UL. Since it is an ordered list... default sorted by relevance
  • added attribute start on OL element so first list item on page 2 and further don't start with 1
  • classNames to style individual parts of a search result item
  • no h4 heading for a search title. Use className .result__title to style it.
  • font-awesome icons for mime types instead of a background image via css

Testing Instructions

  • Joomla 4 with Blog as sample data
  • There is not enough content to get pagination working.
    • Global Configuration => set default list limit = 5 (lowest possible)
    • com_content => duplicate articles
  • Go to frontend and apply search => search for the word blog
  • Apply Pull Request
  • Run npm run build:css
  • Go to the frontend and refresh page with search results

Actual result BEFORE applying this Pull Request

Schermafbeelding 2020-09-02 om 14 55 25

Expected result AFTER applying this Pull Request

Why reinvent the wheel while Google did a lot of research how to display a search result. The com_finder display of a search result dates back to 2011 and haven't been changed since.
(image of initial description has been replaced)
Two screenshots of new com_finder search results. One with mime icon and one without mime type icon. Mime type is dynamical.

Schermafbeelding 2020-09-05 om 17 10 34

Schermafbeelding 2020-09-05 om 17 09 51

Documentation Changes Required

avatar hans2103 hans2103 - open - 2 Sep 2020
avatar hans2103 hans2103 - change - 2 Sep 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2020
Category Repository NPM Change Front End com_finder
avatar hans2103 hans2103 - change - 2 Sep 2020
The description was changed
avatar hans2103 hans2103 - edited - 2 Sep 2020
avatar brianteeman
brianteeman - comment - 2 Sep 2020

Looks great - I might be wrong but I think @wilsonge said that there should be no fontawesome dependencies in the front end

avatar hans2103
hans2103 - comment - 2 Sep 2020

Looks great - I might be wrong but I think @wilsonge said that there should be no fontawesome dependencies in the front end

@brianteeman thanks. Wasn't aware of no font-awesome dependency in the frontend. I will have to refactor the display of mime-type to something else. Perhaps included svg. Some else instead of that ugly image form 1995. :-)

avatar chmst
chmst - comment - 2 Sep 2020

Would be great to have an svg, as now also the alert icons are with svg. #30516

The structure looks good.

avatar hans2103
hans2103 - comment - 3 Sep 2020

I have a question regarding the icon

The icon is used to indicate the mime type.

$mime = !empty($this->result->mime) ? 'mime-' . $this->result->mime : null;

But... how does it get there? How or what and where is this mime being set?

avatar paternax paternax - test_item - 3 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 3 Sep 2020

I have tested this item successfully on b2fec88

That is much more better than before as well from the HTML-structural point of view as from readability

Only the taxonomy objects without styling looks a bit irritating


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar hans2103
hans2103 - comment - 3 Sep 2020

@paternax

Only the taxonomy objects without styling looks a bit irritating

I agree on that one. With current styling it draws too much attention. Do you have a suggestion how we can improve it?

avatar N6REJ
N6REJ - comment - 4 Sep 2020

Looks great - I might be wrong but I think @wilsonge said that there should be no fontawesome dependencies in the front end

your correct, but does that mean that we can't use fa in front-end? Or just that core function must work irregardless of icon- or fa- seamlessly.
@wilsonge can you clarify the intent please?

avatar infograf768
infograf768 - comment - 4 Sep 2020

we would have quite a problem if fontawesome is not to be used in frontend

Just edit an article for example and Insert an another article through CMS Content => Article.
The modal contains 3 fontawesome icons.
fas fa-search
fas fa-angle down
fas fa-check

In the edit interface of the article also
fas fa-eye is used for toggle editor
fas fa-edit for modules edit
fas fa-times for Cancel
fas fa-code-branch for Versions
etc.

and also when inserting image
fas fa-upload
fas fa-folder
fa fa-search-minus
fas fa-search-plus
fas fa-info
fa fa-list

  • the harcoded content for media which also use fontawesome.

I miss for sure a few others.

avatar N6REJ
N6REJ - comment - 4 Sep 2020

@hans2103 change the class name from __ to _ . It's very unusual to use 2.
our discussion with @wilsonge about icon handling is going to effect how this all plays out.

avatar hans2103
hans2103 - comment - 5 Sep 2020

@hans2103 change the class name from __ to _ . It's very unusual to use 2.
our discussion with @wilsonge about icon handling is going to effect how this all plays out.

Using __ and -- comes from the BEM methodology and is implemented in com_finder with commit #20861
I'm just extending the use of it through all elements with classes in the search result.

avatar hans2103 hans2103 - change - 5 Sep 2020
Labels Added: NPM Resource Changed ?
avatar hans2103 hans2103 - change - 5 Sep 2020
The description was changed
avatar hans2103 hans2103 - edited - 5 Sep 2020
avatar hans2103
hans2103 - comment - 5 Sep 2020

Why reinvent the wheel while Google did a lot of research how to display a search result. The com_finder display of a search result dates back to 2011 and haven't been changed since.
(image of initial description has been replaced)
Two screenshots of new com_finder search results. One with mime icon and one without mime type icon. Mime type is dynamical.

Schermafbeelding 2020-09-05 om 17 10 34

Schermafbeelding 2020-09-05 om 17 09 51

updated the initial description of this commit so testers can directly see what to expect.

avatar paternax paternax - test_item - 7 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 7 Sep 2020

I have tested this item successfully on 89c6f72

It looks very good, much more clearer and more legible


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar hans2103
hans2103 - comment - 7 Sep 2020

and with that change I would like to ask @paternax to test this PR again. :-)

avatar N6REJ N6REJ - test_item - 8 Sep 2020 - Tested unsuccessfully
avatar N6REJ
N6REJ - comment - 8 Sep 2020

I have tested this item ? unsuccessfully on 22f2574


Spacing is not quite right. We need more space below each entry ( yellow ) and consistent spacing in file path ( red )
image


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.
avatar hans2103
hans2103 - comment - 8 Sep 2020

I have tested this item ? unsuccessfully on 22f2574

Spacing is not quite right. We need more space below each entry ( yellow ) and consistent spacing in file path ( red )
image

This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

it seems that you forgot to run the command npm run build:css

avatar paternax paternax - test_item - 8 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 8 Sep 2020

I have tested this item successfully on 22f2574

I can't confirm the results of NGREJ. It looks very good. I would only put a bit more space between the URL and the title and bit less space between the title and the introtext


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.
avatar N6REJ
N6REJ - comment - 8 Sep 2020

Tested successfully but recommend changing the padding & margin slightly to help with segmentation.
image

avatar paternax
paternax - comment - 8 Sep 2020

Result of testing:

screen shot 2020-09-08 at 07 41 13


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar hans2103
hans2103 - comment - 8 Sep 2020

@N6REJ

Tested successfully but recommend changing the padding & margin slightly to help with segmentation.
image

That's a matter of taste I think. For me it's a bit awkward to see different spacing above and below the horizontal line. I've tried it on my test environment and resulted in equal spacing in the end.

avatar hans2103
hans2103 - comment - 8 Sep 2020

Thank you @paternax and @N6REJ for testing.

I would only put a bit more space between the URL and the title and bit less space between the title and the introtext.

I've equalized spacing between elements. (Just like spacing between elements in Google result item are the same)

Tested successfully but recommend changing the padding & margin slightly to help with segmentation.

Haven't changed spacing between items.

Due to this new commit all tests have to be done again.

Played with the results though... when adding the following in your local css you can change the looks of the result items to cards.

li.result__item {
    background-color: hsl(0, 0%, 96%);
    border-radius: .5rem;
    padding: 1.5em;
    box-shadow: 0 0 0.125em 0.125em hsl(0, 0%, 36%);
}
li.result__item + .result__item {
    border: 0;
}

Schermafbeelding 2020-09-08 om 10 14 43

avatar chmst chmst - test_item - 8 Sep 2020 - Tested successfully
avatar chmst
chmst - comment - 8 Sep 2020

I have tested this item successfully on 0791571


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar paternax paternax - test_item - 8 Sep 2020 - Tested successfully
avatar paternax
paternax - comment - 8 Sep 2020

I have tested this item successfully on 0791571


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar paternax
paternax - comment - 8 Sep 2020

The search results have never looked better


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.
avatar Quy Quy - change - 8 Sep 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 8 Sep 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30550.

avatar infograf768
infograf768 - comment - 9 Sep 2020

@Hackwar
Is this PR OK for you?

avatar wilsonge wilsonge - change - 15 Sep 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-09-15 11:25:47
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 15 Sep 2020
avatar wilsonge wilsonge - merge - 15 Sep 2020
avatar wilsonge
wilsonge - comment - 15 Sep 2020

Thanks!

Add a Comment

Login with GitHub to post a comment