Problem/Motivation

The existing message provided by the Umami installation profile that shows on the Toolbar hasn't been integrated on the new navigation yet.

Proposed resolution

Create a new custom block navigation implementation that follows a design along this lines:

When collapsed, only the warning icon should be shown.

Remaining tasks

This will new to implement a custom block for the Navigation for the first time, beyond the existing menus.

User interface changes

The Umami message will appear on the new navigation.

Issue fork drupal-3441100

Command icon 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

ckrina created an issue. See original summary.

skaught’s picture

@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.

ckrina’s picture

Project: Navigation » Drupal core
Version: 1.x-dev » 11.x-dev
Component: Code » navigation.module
ckrina’s picture

Issue tags: +Portland2024

@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.

markconroy made their first commit to this issue’s fork.

markconroy’s picture

Status: Active » Needs work

MR 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.

markconroy’s picture

finnsky’s picture

Just 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

finnsky’s picture

Also probably move styles of that message on Navigation module level.

finnsky’s picture

Probably we should add yet another theme hook in Navigation module. Style it there. And use it in Umami.

markconroy’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new218.16 KB
new239.93 KB

Thanks @finnsky

I've updated the MR now to use hook_preprocess_layout and added a new library to theme this.

Navigation collapsed:

navigation collapsed

Navigation expanded:

navigation expanded

---
Thanks to The Confident for sponsoring my time to work on this.

smustgrave’s picture

Should the MR be marked non draft or still WIP?

finnsky’s picture

I have another approach here. Gonna prepare MR

finnsky’s picture

I 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.

finnsky’s picture

How it looks

https://gyazo.com/324a0cee609afeef39b55e70f35de72f

I didn't found actual design so reused most styles from button

smustgrave changed the visibility of the branch 3441100-integrate-umami-message to hidden.

smustgrave’s picture

Why use 3 notifications?

finnsky’s picture

can be different type of that messages i believe. i added example of 3 messages types here.

smustgrave’s picture

So guess @markconroy which one should be used?

markconroy’s picture

I'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.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new3.12 KB

The 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.

finnsky’s picture

Status: Needs work » Needs review

Fixed icon plus added common tooltip
https://gyazo.com/795757bee733d175de17e7815f40cc64

ckrina’s picture

Status: Needs review » Needs work

I 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.

plopesc’s picture

Checked 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!

plopesc’s picture

Title: Integrate Umami message » [PP-1] Integrate Umami message
Status: Needs work » Postponed

I 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.

plopesc’s picture

Title: [PP-1] Integrate Umami message » Integrate Umami message
Assigned: Unassigned » plopesc
Status: Postponed » Active
Issue tags: +11.2.0 release target

Working on it since the blocker issue is already merged.

plopesc’s picture

Status: Active » Needs work
StatusFileSize
new176.69 KB
new185.15 KB
new210.75 KB

Reimplemented 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.

plopesc’s picture

Assigned: plopesc » Unassigned
plopesc’s picture

Status: Needs work » Needs review

Figured out how to make Gitlab CI happy.
Ready for Review now.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The 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.

plopesc’s picture

Status: Needs work » Needs review

Back to Needs Review once conflicts have been solved.

gxleano’s picture

Review steps

1. Install Umami demo site.
2. Enable navigation module.
3. Check Umami message on new navigation.

Everything works as expected, see the screenshot below:

Expanded:
Navigation expanded
Collapsed:
Navigation collapsed
Collapsed with tooltip:
Navigation collapsed with tooltip

gxleano’s picture

gxleano’s picture

Status: Needs review » Reviewed & tested by the community
finnsky’s picture

Perhaps we should have done it through the SDC right away. But it is quite possible to implement it through subsequent tasks.

plopesc’s picture

Created follow-up issue #3502993: Convert Navigation messages component to SDC to address the SDC conversion.

  • nod_ committed c131a1e8 on 11.x
    Issue #3441100 by markconroy, finnsky, plopesc, smustgrave, gxleano,...
nod_’s picture

Status: Reviewed & tested by the community » Fixed

Committed c131a1e and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.