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.
Problem/Motivation
These changes are coming from the feedback that we've received from the patch submission that we've made on 9/23/2020.
-
+++ b/core/themes/olivero/css/components/header-search-narrow.pcss.css @@ -0,0 +1,174 @@ + form {
We could make this element of the
.search-block
. -
+++ b/core/themes/olivero/css/components/header-search-wide.pcss.css @@ -0,0 +1,292 @@ +.search-wide__wrapper {
This could be just
.block-search--wide
. -
+++ b/core/themes/olivero/css/components/header-search-wide.pcss.css @@ -0,0 +1,292 @@ +.search-wide__grid {
This should probably also be an element of
.block-search
. -
+++ b/core/themes/olivero/css/components/header-search-wide.pcss.css @@ -0,0 +1,292 @@ + .icon--search {
This should be an element of
.block-search
.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#30 | after_patch.png | 745.48 KB | kiran.kadam911 |
Comments
Comment #2
proeungComment #3
proeungComment #4
proeungComment #5
proeungComment #6
proeungComment #7
mherchelComment #8
mherchelPatch attached!
Comment #9
mherchelComment #10
proeung@mherchel Code looks good overall, but the patch in #8 needs to be re-roll for 9.2.x-dev.
Comment #11
ankithashettyRerolled the patch in #8 and fixed the custom commands failure errors, thanks!
Comment #12
andy-blumUpdated patch 11 to fix failed custom commands
Comment #13
djsagar CreditAttribution: djsagar at OpenSense Labs commentedHI all,
Rolling up patch 13 to fix failed custom commands Failed in patch #12, which i found after run post css command please review.
Thanks
Comment #14
mherchelRe-roll of #13 attached.
Comment #15
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commented@mherchel, the Semicolon is missing for some CSS properties in patch #14.
Comment #16
andy-blum@Gauravmahlawat that file is automatically generated from the front-end tooling. See this stackoverflow comment regarding semicolons in CSS blocks
Comment #17
andy-blumPatch #14 applies cleanly and seems to have passed all the tests, however I wanted to point out that the issue description recommended implementing
.block-search--wide
, I assume to use BEM standards, but the patch currently implements.block-search-wide
essentially creating a new BEM block.If that's not an issue, then +1 for RTBC
Comment #18
mherchelThanks for the review!
Yeah, thats intentional. To me the differences are enough that it warrants a new block. We also have the code split out into multiple CSS files.
Review and requested changes incoming
Comment #19
mherchelWhile we're refactoring, let's add data attributes onto all of the selectors that JavaScript is querying. This is per Drupal coding standards (see #3153234: [Meta] Olivero JavaScript should be selecting [data-drupal-selector] attributes where possible).
Something like
data-search-wide-button
, etcThis can also use the data attribute selectors
Comment #20
kiran.kadam911Thanks, @mherchel for the patch, and Thanks @andy-blum for the review.
Kindly review the updated patch based on #19.
Thanks!
Comment #22
mherchelThere's a prettier error on the patch. Run
yarn prettier
to fix it.Comment #23
mherchelOther than that, it looks great!
Comment #24
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedRe-rolled patch #20.
Attached interdiff for the same.
Please ignore
a/core/misc/ajax.js | a/core/misc/jquery.cookie.shim.js
in interdiff. these files are not included in patch.Comment #25
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedComment #26
mherchelThe interdiff in #24 contains some irrelevant changes that are not in the actual patch. I'm attaching the correct interdiff between #20 and #24 here.
Passes tests, and looks perfect. RTBC!
I also adjusted the credits.
Comment #27
lauriiiDoes this have to be nested still?
Is there a specific reason not to use
data-drupal-selector
which is something we have been trying to standardize on?Comment #28
mherchelYep. It's nested under
.block-search-wide__button[aria-expanded="true"]
, which is necessary to turn the icon into an XI didn't know about using
data-drupal-selector
until recently. We'll make the change here.Comment #29
mherchelUpdated patch and interdiff attached with changes to the JavaScript selector pattern.
Comment #30
kiran.kadam911@mherchel Thanks for the updated patch, it's applied successfully and working as expected.
Attaching just SS for reference instead of video.
Thanks!
Comment #32
lauriiiCommitted 25de809 and pushed to 9.3.x and 9.2.x. Thanks!