Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The existing method for styling the search fields in the header and the same/similar search field styling for the search results page rely on fixed widths, heights and some absolute positioning. I propose we refactor the code in search.css and search-results.css to rely more on our existing use of Flexbox, and to improve the way we apply the hover/focus effect so that it is more tightly styled and for better responsive support.
Comment | File | Size | Author |
---|---|---|---|
#25 | interdiff-23-25.txt | 1.04 KB | markconroy |
#25 | 2977510-25.patch | 8.18 KB | markconroy |
#23 | interdiff-17-23.txt | 723 bytes | markconroy |
#23 | 2977510-23.patch | 8.18 KB | markconroy |
#19 | interdiff-17-19.txt | 913 bytes | kjay |
Comments
Comment #2
kjay CreditAttribution: kjay commentedHere'e a patch for review that has been tested across current crop of Safari, Chrome, Firefox, IE11 and Edge.
Main points in this patch are:
Comment #3
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commentedHi @kjay
Reviewed your patch and the use of flexbox for consistency looks good on search. Placeholder is visible this time on all screen size. Just noticed one thing on focus of search input there's a bluish-greenish border and before it was not there so I think we should remove the outline from focus so that the greenish border on focus looks more good like before. Adding screenshots of before and after.
Comment #4
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedHi @kjay,
It looks like this patch needs a reroll after the patch if IE11 support was committed today.
The code looks good on first inspection, so it shouldn't be a huge amount of work for us to get this committed.
Comment #5
finnsky CreditAttribution: finnsky at Skilld commentedHi! rerolled patch.
had one conflict in blocks/search/search.css
conflict resolved.
Comment #6
jofitz CreditAttribution: jofitz at ComputerMinds commentedRemoved tag. Unassigned so that someone can review.
Comment #7
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commented#5 looks good but that bluish-greenish border issue still there but this time on search button and only on chrome and before it was on search input which I had mentioned in #3. Added a screenshot after patch.
Comment #9
kjay CreditAttribution: kjay commentedAttached is a patch that refactors the search form in general to have it follow our global form styles and not the pre-header search form styles. This patch also addresses the responsive theming for the advanced form fields that are provided by the search results page when logged in.
This patch needs work, especially around layout. Having just updated it to work against the latest 8.7.x, I've had to add in a box-sizing: border-box; in search-results.css line 60 which does not seem right. We may need to review our base.css settings for border box methods in general for Umami.
Also - not tested in RTL
Comment #10
Eli-TComment #11
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI removed the `box-sizing: border-box;` from the patch and it seems to work fine. It used the border-box from the base.css file, which is correct.
Would be nice to see a new patch with that removed please.
Comment #12
shaalThe patch on #9 works well with RTL, with one caveat - the pager at the bottom.
By adding this code it fixes it for RTL (and not breaking anything on LTR)
Comment #13
shaalI added 2 fixes to patch #9:
box-sizing: border-box;
(per @markconroy request)Comment #14
kjay CreditAttribution: kjay commentedI'm not sure why but the border-box issue is in Safari only and does still seem to be an issue. Without box-sizing: border-box;, the columns wrap in Safari.
Comment #15
shaalI made some additional updates to the patch.
I tested that it works correctly on Safari 9.1
Main changes included in this patch (based on #13)
Comment #17
kjay CreditAttribution: kjay commentedThe patch required a re-roll and two minor tweaks:
Screenshots attached of result. I think this is ready to go.
Comment #18
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commented@kjay
This patch is brilliant. I'm annoyed we've left the search results looking so bad for so long and great that we finally have it this good. Thanks so much.
I'm proposing 2 tiny changes. If you can make those, I'll mark it RTBC then.
Can we change this from an element to a class? Like this:
.search-form + .item-list > .search-result__title
Let's be a little less generic here, incase there is a list within the search result node itself. I suggest:
.search-results > li
and the same for the [dir=rtl] following it.
Comment #19
kjay CreditAttribution: kjay commented@markconroy, thanks for the review! Agreed, we really need to get this one over the line.
I've taken a look at the two issues you raised and the first one is actually a class removal that's required, .search-form + .item-list > h3 doesn't seem to target anything from what I can see. h3 is never going to be the first child of the .item-list UL. Unless you think this should be there for another purpose?
The second is sorted also in the attached patch.
Comment #20
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedLooks like we're ready for RTBC.
Comment #21
Gábor HojtsyComment #22
Gábor HojtsyFrom stylelint (while attempting to commit):
Comment #23
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedAdding new patch - no changes except adding a blank line before the @ statements.
Comment #24
Gábor HojtsyI don't know why this was not reported earlier, but there you go:
Comment #25
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedNew patch to add new line to stop the linter failing.
I ran the linter as well, and no new CSS bugs were picked up.
Comment #26
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedSetting to rtbc again as tests have passed.
Comment #29
Gábor HojtsyThanks a lot!
Comment #30
Gábor Hojtsy