Problem/Motivation

While doing #3466028: Ensure media library popin is usable, I looked at nav and nav_item and I think those patterns and preprocess for menu local tasks/task can be simplified with the links normalization.

I think nav_item can be integrated directly into nav and maybe navbar_nav and nav could become only one pattern.

Add tab / tab_pane component

https://getbootstrap.com/docs/5.3/components/navs-tabs/#javascript-behavior

Update PreprocessFilterTips to use it.

Changes summary:

  • nav component reworked:
    • use links prop type for menu elements: improve site building features
    • add card_header prop type to remove the last pattern preprocess
    • add tab_content slot for easier tab content generation (maybe not site buildable, but at least it ease custom development)
  • preprocess_menu_local_task transformed into preprocess_menu_local_tasks to do our stuff directly in menu_local_tasks
  • no more need of the menu-local-task template
  • nav_item component removed
  • last pattern preprocess removed!
  • fix button variant in dropdown
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

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: Unassigned » grimreaper

grimreaper’s picture

Issue summary: View changes
Status: Active » Needs work

grimreaper’s picture

grimreaper’s picture

Issue summary: View changes
grimreaper’s picture

Issue summary: View changes
grimreaper’s picture

Status: Needs work » Needs review

In review, keeping it assigned to me to not forget to merge it.

grimreaper’s picture

Title: Simplify nav/nav_item/navbar_nav » Rework nav/nav_item components

Better title

grimreaper’s picture

TODO:

- merge
- do a change record

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Needs review » Fixed

  • grimreaper committed f298b56f on 5.0.x
    Issue #3467598 by grimreaper, pdureau: Rework nav/nav_item components
    

Status: Fixed » Closed (fixed)

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