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.pcss.css @@ -0,0 +1,94 @@ +.header__left {
Maybe there's a better name for this because this is only left when displayed on LTR.
-
+++ b/core/themes/olivero/css/components/nav-button-wide.pcss.css @@ -0,0 +1,104 @@ +.nav-primary__button { +++ b/core/themes/olivero/css/components/nav-primary-button.pcss.css @@ -0,0 +1,132 @@ +.primary-nav__button-toggle { +++ b/core/themes/olivero/css/components/nav-primary.pcss.css @@ -0,0 +1,383 @@ +.primary-nav__menu {
.nav-primary
doesn't exist at the moment -
+++ b/core/themes/olivero/css/components/nav-secondary.pcss.css @@ -0,0 +1,116 @@ +.secondary-nav__wrapper {
This is not an element of the .secondary-nav because it is not inside it.
Comment | File | Size | Author |
---|---|---|---|
#37 | interdiff-30-36.txt | 827 bytes | mherchel |
#36 | 3173014-36.patch | 17.96 KB | morganlyndel |
#30 | 3173014-30-reroll.patch | 17.95 KB | mherchel |
#27 | 3173014-27.patch | 17.94 KB | mherchel |
#27 | interdiff-23-27.txt | 522 bytes | mherchel |
Issue fork drupal-3173014
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
proeungComment #3
mherchelComment #4
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedComment #5
adamzimmermann CreditAttribution: adamzimmermann at Chromatic commentedI'm not a front-end developer, but I took a swing at this.
1. I changed the class to
head__initial
.2. The
nav-primary
class now exists. I adjusted the JavaScript too.3. I'm not sure we can do this. The menu template is generic, and any menu block can be placed in the
secondary_menu
region, so we don't know the machine name of the menu. Happy to be proven wrong though.4. I'm not seeing
secondary-nav__wrapper
in any templates. Can we remove these styles or am I missing something?Comment #6
mherchelthanks for the patch!
I think "header__initial" makes sense 👍
"nav-primary" as the button name doesn't seem to make sense to me. IMO we need to be pretty verbose... maybe "wide-nav-expand" or something.
Comment #7
mherchelAs far as #3, we can define an explicit template / css class when a type of block is placed in a certain region. We can split that out into another issue though.
#4 You can find
secondary-nav__wrapper
in https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/olive...Comment #8
paulocsI'll work on it.
Comment #9
paulocsI did the changes suggested in comment #6.
Comment #10
mherchelAttaching updated patch with interdiff. Made number of changes including
- moving
.secondary-nav__wrapper
into.region--secondary-menu
. This required some templating changes and also moving the PCSS file into /layout/- renamed
.nav-primary__icon
to.wide-nav-expand__icon
to keep proper BEM methodology- renamed nav-button-wide.pcss.css to nav-button-wide.pcss.css
Comment #11
mherchelSplitting out #3 to #3182200: Follow proper BEM syntax within secondary navigation menu
Comment #12
proeungLooks like the build script is not including the closing mark `;` in the compiled version. Can you take a look and see if this is related to the build process.
Comment #13
mherchelGood catch!
I removed node_modules and did a yarn install, and did not see any changes! We should be good!
Comment #14
proeungThat's odd. I wonder if this is just a way to decreasing the compiled files. Regardless, I don't see anything wrong with this. Marking this as RTBC.
Comment #15
lauriiiSince this patch is changing libraries, we probably cannot backport this to 9.1.x because it would require running updates.
We should add empty post update hook to make sure caches are cleared on the update process.
Comment #16
mherchelempty post update hook is added. Thanks!
Comment #17
proeungThe empty post-update hook function is now included in this patch. Looks good!
Comment #18
lauriiiTagging for release manager review because of the changes in libraries and post update hook.
Comment #19
alexpottNeeds a reroll.
Comment #20
komalk CreditAttribution: komalk at Srijan | A Material+ Company for Drupal India Association commentedRe-rolled the patch on 9.2.x.
Comment #21
mherchelVerified patch in #20 is good, and still applies! Thanks!
Comment #22
alexpott#20 has a coding standards fail. Might as well fix that while waiting for the release manager review.
Comment #23
raman.b CreditAttribution: raman.b at OpenSense Labs commentedResolving CS issues
Comment #24
mherchelChanges in #23 look good to me. Thanks!
Comment #25
catchIf this goes into 9.2.x-only, then I think we can skip the empty post-update, because there is a very high chance of something else having an update that goes into a 9.2.0 deployment.
Comment #26
mherchelI'm fine with that, and honestly there's no urgent need for 9.1.x.
Comment #27
mherchelUpdated patch without the post-update.
Comment #28
proeungPatch in #27 applies correctly. We'll need a review from @lauriii to make sure all of his feedback is fully addressed.
Comment #29
proeungRTBC +1
Comment #30
mherchelRe-roll
Comment #31
mherchelComment #32
kostyashupenkoOne little feedback:
aria-label should be translatable
Comment #33
volkswagenchickAdding some steps to help a novice contribute successfully:
The flow would be:
Comment #34
morganlyndel CreditAttribution: morganlyndel at Kanopi Studios commentedI am working on this. Thanks!
Comment #35
morganlyndel CreditAttribution: morganlyndel at Kanopi Studios commentedComment #36
morganlyndel CreditAttribution: morganlyndel at Kanopi Studios commentedI have just rerolled the patch in comment #30 with the changes in comment #32.
I am new to Drupal Core contribution, and was working with my mentor @volkswagenchick this afternoon to complete this. This is my first core patch and I welcome and feedback!
I would have created an interdiff file but it is a bit outside of my skillset.
I've unassigned myself and changed the status to 'Needs review'.
Thank you!
Comment #37
mherchelUpdated interdiff attached.
Thanks for the quick fix. This is looking good to me!
Comment #38
mherchelComment #39
lauriiiRemoving needs release manager review tag based on #25.
Comment #41
lauriiiCommitted c117502 and pushed to 9.2.x. Thanks!