Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/4.0 dev a11y com finder refactor search result #30550

Conversation

hans2103
Copy link
Contributor

@hans2103 hans2103 commented Sep 2, 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

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-4.0-dev labels Sep 2, 2020
@brianteeman
Copy link
Contributor

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

@hans2103
Copy link
Contributor Author

hans2103 commented Sep 2, 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. :-)

@chmst
Copy link
Contributor

chmst commented Sep 2, 2020

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

The structure looks good.

@hans2103
Copy link
Contributor Author

hans2103 commented Sep 5, 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.

@hans2103 hans2103 marked this pull request as ready for review September 5, 2020 15:36
@paternax
Copy link

paternax commented Sep 7, 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.

that was ugly... thank you

Co-authored-by: Quy <quy@fluxbb.org>
@hans2103
Copy link
Contributor Author

hans2103 commented Sep 7, 2020

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

@N6REJ
Copy link
Contributor

N6REJ commented Sep 8, 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.

@hans2103
Copy link
Contributor Author

hans2103 commented Sep 8, 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

@paternax
Copy link

paternax commented Sep 8, 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.

@N6REJ
Copy link
Contributor

N6REJ commented Sep 8, 2020

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

@paternax
Copy link

paternax commented Sep 8, 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.

@hans2103
Copy link
Contributor Author

hans2103 commented Sep 8, 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.

@hans2103
Copy link
Contributor Author

hans2103 commented Sep 8, 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

@chmst
Copy link
Contributor

chmst commented Sep 8, 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.

1 similar comment
@paternax
Copy link

paternax commented Sep 8, 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.

@paternax
Copy link

paternax commented Sep 8, 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.

@Quy
Copy link
Contributor

Quy commented Sep 8, 2020

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 8, 2020
@infograf768
Copy link
Member

@Hackwar
Is this PR OK for you?

@wilsonge wilsonge merged commit 90d5e5e into joomla:4.0-dev Sep 15, 2020
@wilsonge
Copy link
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 15, 2020
@wilsonge wilsonge added this to the Joomla 4.0 milestone Sep 15, 2020
@hans2103 hans2103 deleted the feature/4.0-dev-a11y--com_finder-refactor-search-result branch September 15, 2020 12:33
sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NPM Resource Changed This Pull Request can't be tested by Patchtester
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants