Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
navigation.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2024 at 14:38 UTC
Updated:
12 Feb 2025 at 09:04 UTC
Jump to comment: Most recent, Most recent file



Comments
Comment #2
skaught@ckrina:
demo_umami.profile does this by choosing to add a hook_toolbar (in the .profile). this item uses an inline_template build simply add the link and add a library to style it.
i might think this could be an menu block added thru Unami itself rather than something navigation needs to provide.
IMO: unami should design this message differently. it has a very strange purpose putting in this kind of message in the toolbar in the first place (:
related: Acquia Connector adds a toolbar link.
Comment #3
ckrinaComment #4
ckrina@SKAUGHT this is a message we have designed. Its place is the vertical navigation because it's where the site-wide messages belong. The Top Bar will only be used for contextual tools/actions that belong to the content/forms on the page.
Now that the Navigation is in core can be addressed.
Comment #8
markconroy commentedMR started - currently just adds the HTML to the block.
I'll try get to the CSS next week.
---
Thanks to Code Enigma for sponsoring my time to work on this.
Comment #9
markconroy commentedComment #10
finnsky commentedJust to warn that this way will not work since Navigation module blocks may have titles
https://gyazo.com/2794d74881c590e9594540b9b8d09104
I would prefer if we create new block somehow here
Comment #11
finnsky commentedAlso probably move styles of that message on Navigation module level.
Comment #12
finnsky commentedProbably we should add yet another theme hook in Navigation module. Style it there. And use it in Umami.
Comment #13
markconroy commentedThanks @finnsky
I've updated the MR now to use
hook_preprocess_layoutand added a new library to theme this.Navigation collapsed:
Navigation expanded:
---
Thanks to The Confident for sponsoring my time to work on this.
Comment #14
smustgrave commentedShould the MR be marked non draft or still WIP?
Comment #15
finnsky commentedI have another approach here. Gonna prepare MR
Comment #17
finnsky commentedI really don't think that Umami or any other modules/themes should care about Navigation css.
Other modules may also want to add messages to Navigation.
So i've added 2 more theme hooks in navigation module + required css.
Currently it displays message 3 times. As status/warning and error.
We need to replace it with one status before commit.
Please review.
Comment #18
finnsky commentedHow it looks
https://gyazo.com/324a0cee609afeef39b55e70f35de72f
I didn't found actual design so reused most styles from button
Comment #20
smustgrave commentedWhy use 3 notifications?
Comment #21
finnsky commentedcan be different type of that messages i believe. i added example of 3 messages types here.
Comment #22
smustgrave commentedSo guess @markconroy which one should be used?
Comment #23
markconroy commentedI'm happy to go with @finnsky's approach, looks very clean and will scale for other uses too.
---
Thanks to The Confident for sponsoring my time to work on this.
Comment #24
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #25
finnsky commentedFixed icon plus added common tooltip
https://gyazo.com/795757bee733d175de17e7815f40cc64
Comment #26
ckrinaI just reviewed the code and it looks great but since this is providing an standardized solution and goes beyond the Umami message, then its place needs to be more generic and be moved to the top of the content region (above Dashboard, Content, Shortcuts) so it doesn't interfere with the navigation and behaves more as a normal message.
Comment #27
plopescChecked the code and in general looks good.
Agree with @ckrina that would be great to move the messages to the top.
I think that would be interesting to provide a simpler way to implement messages by other modules. We can probably discuss it as part of #3463142: Allow modules to hook into top of content section of new core navigation.
Thank you for your work on this one @finnsky!
Comment #28
plopescI would really like to have it merged, but I'm afraid we need to get #3463142: Allow modules to hook into top of content section of new core navigation in first.
Postponing this one on it to make it more explicit and have a better picture of the relationships between the issues.
Once we have #3463142: Allow modules to hook into top of content section of new core navigation, it will be only necessary to implement the hook to have the Umami message visible in the new Navigation.
Comment #29
plopescWorking on it since the blocker issue is already merged.
Comment #30
plopescReimplemented the messages block once the parent issue has been merged.
Some screenshots of the new behavior:
Expanded:



Collapsed:
Collapsed with tooltip:
Some CSSLint issues need to be addressed before moving the issue to Needs Review.
Comment #31
plopescComment #32
plopescFigured out how to make Gitlab CI happy.
Ready for Review now.
Comment #33
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #34
plopescBack to Needs Review once conflicts have been solved.
Comment #35
gxleano commentedReview steps
1. Install Umami demo site.
2. Enable
navigationmodule.3. Check Umami message on new navigation.
Everything works as expected, see the screenshot below:
Expanded:



Collapsed:
Collapsed with tooltip:
Comment #36
gxleano commentedComment #37
gxleano commentedComment #38
finnsky commentedPerhaps we should have done it through the SDC right away. But it is quite possible to implement it through subsequent tasks.
Comment #39
plopescCreated follow-up issue #3502993: Convert Navigation messages component to SDC to address the SDC conversion.
Comment #42
nod_Committed c131a1e and pushed to 11.x. Thanks!