[META] Migrate Navigation to SDC

Created on 1 July 2024, 6 months ago
Updated 20 September 2024, 3 months ago

Problem/Motivation

SDC is part of core now, so we can migrate the existing code to take advantage of SDC.

Proposed resolution

Plan and move all the components into their own SDCs.

Remaining tasks

The plan for Phase 2 still needs to be defined to refactor and improve the code in the best way possible.

Phase 1 - Create the components

  • πŸ“Œ Migrate Toolbar button to SDC Needs review
  • Toolbar menu (todo: create issue)
  • Toolbar block (todo: create issue)
  • Toolbar dropdown (todo: create issue)
  • Toolbar popover (todo: create issue)
  • Tooltip (todo: create issue)
  • Admin Toolbar control bar (todo: create issue)

Phase 2 - Javascript and refactor/improvements/make things right

  • Events
  • Safe triangle refactor
  • Tooltip to core
  • Break the JS into components: @todo a proposal of specific steps and issues

User interface changes

There shouldn't be UI changes.

API changes

Data model changes

Release notes snippet

🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
NavigationΒ  β†’

Last updated about 19 hours ago

No maintainer
Created by

πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ckrina
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    Note: I haven’t added as components the following items:

    • Admin Toolbar. I see this more as a region rather than a component
    • Top Bar. Same, I see this more as a a region
    • Body Scroll lock: I see this more as an utility

    I know @finnsky had ideas to plan Phase 2, so leaving this here so he can work on it.

  • πŸ‡³πŸ‡ΏNew Zealand quietone
  • πŸ‡¦πŸ‡ΊAustralia Jon Nunan

    Break the JS into components: @todo a proposal of specific steps and issues

    By "components" are we talking Web Component custom elements, or just breaking the functionality up by SDC component?

    I'd be a fan of exploring the first option as it would also allow some style encapsulation. I've started playing around with writing my front end themes with more a CUBE CSS (https://cube.fyi/) approach, but I find that often leads to conflicts with admin elements, so having admin elements outside the frontend css with Shadow DOM could be a nice win.

  • πŸ‡·πŸ‡ΈSerbia finnsky

    Thank you for your interest.

    Specifically in this task we mean SDC Drupal components.

    But of course we should keep in mind web components as a promising technology. Especially in the Navigation module because it should look the same in the context of any Drupal theme. (and any basic styles)

    If you are interested in web components in the core, then I know two tasks where they can appear (sorry for the off-topic)

    https://www.drupal.org/project/drupal/issues/3405822 πŸ“Œ Use webcomponents for dropbutton Needs review
    https://www.drupal.org/project/drupal/issues/3100083 πŸ“Œ Add js message theme override to match Umami message markup Needs review

Production build 0.71.5 2024