- Issue created by @Martygraphie
- Status changed to Needs review
6 months ago 10:34am 29 May 2024 - First commit to issue fork.
- Status changed to Needs work
6 months ago 9:03am 10 June 2024 - 🇫🇷France pdureau Paris
I have rebased the MR.
I am not very comfortable with this part:
{% set is_button = item.url == 'route:<button>' ? true : false %} {% set is_plain_text = item.url == 'route:<nolink>' ? true : false %}
First, because we may not need the ternary:
{% set is_button = (item.url == 'route:<button>') %} {% set is_plain_text = (item.url == 'route:<nolink>') %}
Second, and that's the most important, I would prefer to not manipulate route information from the template.
UI Patterns Settings 2.2 & 2.3 were released last week with some improvement in the menu processing: https://www.drupal.org/project/ui_patterns_settings/releases/8.x-2.3 →
Is it helping? - Status changed to Postponed: needs info
5 months ago 7:43am 4 July 2024 - First commit to issue fork.
- 🇫🇷France judapriest Grenoble
Currently running with "UI Patterns Settings 2.3" and "ui suite dsfr 1.0.1".
Tokens<button>
still return an empty url.I have rebased the MR with 1.0.x and withdraw the unnecessary ternary operator.
- Status changed to Needs review
3 months ago 2:00pm 23 August 2024 - Status changed to Needs work
3 months ago 2:26pm 23 August 2024 - 🇫🇷France pdureau Paris
Other feedback: you are adding logic to
hook_preprocess_pattern_footer_menu
https://git.drupalcode.org/project/ui_suite_dsfr/-/merge_requests/84/diffsBut component preprocesses are forbidden in SDC, so will be forbidden in UI Patterns 2.x. It is better to make them lighter than heavier. I know it is not easy because at the same time I told you it is better "to not manipulate route information from the template".
So, not in the preprocess, not in the template... where?
if the logic is generic (useful for other components with
links
, even outside DSFR) it can go to: LinksSettingType::normalize()And I will port it to LinksPropType::normalize() for UI Patterns 2.
- 🇷🇪Réunion Martygraphie Saint-Denis (Réunion)
martygraphie → changed the visibility of the branch 3449679-add-attributes-specifics-routes-to-link to hidden.
- 🇷🇪Réunion Martygraphie Saint-Denis (Réunion)
martygraphie → changed the visibility of the branch 3449679-add-attributes-specifics-routes-to-link to active.
- 🇫🇷France pdureau Paris
Related to 📌 [1.1.x] Manage URL without preprocesses Active