- Issue created by @spryah
- Merge request !27Issue #3383395 by spryah: add "translate menu" pattern → (Merged) created by spryah
- Status changed to Needs review
over 1 year ago 3:03pm 25 August 2023 - Status changed to Needs work
over 1 year ago 8:01am 26 August 2023 - 🇫🇷France pdureau Paris
First feedbacks
Component ID is "translate" not "translate_menu"
because the BEM block name is "fr-translate"
"attribute" object is missing
<nav role="navigation" class="fr-translate fr-nav">
Drupal needs it to inject helpers to the component.
"items" field must follow the Drupal menu structure
https://api.drupal.org/api/drupal/core!modules!system!templates!menu.htm...
because we will move those links/menu structures from slots ("fields") to props ("settings") after the release of UI Patterns Settings 2.1: ✨ Add links setting type Needs review
i don' know how you will manage language_code property with this data structure but we must find a way
maybe adding the "links--language-block.html.twig" presenter template will bring you the solution
Use default() filter with random function()
it makes unit testing impossible because it generates a different template each time when we have the same input slots & props.
See: 📌 [beta4] Always use default() filter with random function() Fixed
{% set translate_id = 'translate-' ~ random(0, 9999) %}
Don't forget to add the new "translate_id" prop ("setting") to the YML file.
Also, AFAIK, no need for 0, 9999 parameters here. random() works well without them
- Status changed to Postponed
about 1 year ago 7:22pm 9 November 2023 - 🇫🇷France pdureau Paris
Waiting for ✨ Add links setting type Needs review
- Status changed to Needs work
about 1 year ago 8:46am 15 December 2023 - 🇫🇷France pdureau Paris
Links setting type is now usable and used in 📌 [beta6] Replace PHP hooks by more themer-friendly solutions Needs review
- Status changed to Needs review
11 months ago 3:02pm 22 January 2024 - 🇫🇷France pdureau Paris
I did 3 things:
- Rebase from 1.0.x
- Links are now a setting
- Add note about component working only in page header
Is it enough? Can we do soemthing about this page header issue?
-
pdureau →
committed 8eb9ffdb on 1.0.x authored by
spryah →
Issue #3383395 by spryah: add "translate menu" pattern
-
pdureau →
committed 8eb9ffdb on 1.0.x authored by
spryah →
- Status changed to Fixed
11 months ago 2:16am 6 February 2024 Automatically closed - issue fixed for 2 weeks with no activity.