-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Page list: Fix submenu colors #44310
Conversation
Size Change: +147 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
An alternative to this would be to separate the overlay colors from the sub menu colors and add the color options to the page list, page link and submenu blocks. Short term, this does fix a bug though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this bug.
I do also tend to agree with @scruffian that this PR will only paper over the major problem which is the way custom colors work on the Nav block.
Moreover, it couples the Page List block even more closely to the Navigation block which isn't ideal.
Lastly, it's worth noting that @draganescu is working on splitting this block into
- Page List (parent)
- Page List Item (child)
...so that may effect this PR as well.
This does fix the bug in the short term so we need to make a decision here about short term fix vs compounding the long term problem.
@aaronrobertshaw sums up the problem nicely for us.
I do agree the colors need to be separated but can it be done fast enough, because this is an ongoing issue that affects Twenty Twenty-Two. Yes I am a bit dis-heartened because I have been trying to highlight this problem for some time. |
Understood. I can completely empathise with why you might feel like that. Contributors are aware of the issue but we've never managed to find a "quick fix" solution which is...unfortunate but not through lack of trying.
There is no one focusing on this effort right now so I agree it will not be fast (within next week or so).
That's clearly not ideal. Allowing this to land would be a compromise position but leave us with more technical debt to clean up in the longer term. That said as there is no way to fix this in 2022 without resolving in Core we might need to look at this again. @scruffian Could we land a compromise and include comments to specifically highlight that this is a temporary fix and raise follow up Issues (to be cross linked to #44712)? |
I could have worked on it in already in September if anyone had voiced support for changing the color options. |
What?
Adds the overlay color context to submenus in the page list block when the page list is inside the navigation block.
Why?
Submenus in page list did not inherit the submenu and overlay colors from the navigation block. In the editor, the submenu colors were white background and black text.
How?
Adds the has-text-color and has-background CSS classes, the palette color classes, and inline custom colors to the submenu items (the inner
<li>
element).Testing Instructions
Create a new page on your WordPress install.
Add a child page to this page, and a child page to that child page.
You will use these as a page list with a two level sub menu.
Create a new post or page and add a navigation block.
Add the page list to the navigation block.
In the color setting, select a custom color using the color picker for the Submenu and overlay text color, and one for the submenu and overlay background color.
Confirm that the colors are used for the submenu in the editor and front.
Return to the editor and select overlay text and background color from the palette.
Confirm that the colors are used for the submenu in the editor and front.
Screenshots or screencast
After: