- Issue created by @Grimreaper
- Assigned to pdureau
- 🇫🇷France Grimreaper France 🇫🇷
Hi @pdureau,
I have done some research and thoughts about this. Here are the results.
I think this should be done with 🐛 Bootstrap 5: dropdown is too complicated (outdated) Closed: outdated . What do you think about that?
Actions element:
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/lib/Drupal/...
Only add a div with a class. But do some processing for dropbutton.
"look for elements with a #dropbutton property".
Dropbutton element:
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/lib/Drupal/...
Use the 'links' and 'dropbutton_wrapper' theme keys.
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/sys...
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/sys...Operations element:
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/lib/Drupal/...
Just a template suggestion of Dropbutton.
Bootstrap 3 handling:
https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/templates/sy...
Iconize only: https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...
Workaround core bug: https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...
Replace core preRenderDropbutton: https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...
https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...
Operations: https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/src/Plugin/P...https://git.drupalcode.org/project/bootstrap/-/tree/8.x-3.x/templates/bo...
- 🇫🇷France Grimreaper France 🇫🇷
I forgot the screenshots.
Current rendering with Olivero of admin/content:
Current rendering with UI Suite Bootstrap of admin/content:
Current rendering with Olivero of custom form:
Current rendering with Ui Suite Bootstrap of custom form:
$form['actions'] = [ '#type' => 'actions', ]; // Add a submit button that handles the submission of the form. $form['actions']['submit'] = [ '#type' => 'submit', '#value' => $this->t('Submit'), ]; $form['actions']['delete'] = [ '#type' => 'submit', '#value' => $this->t('Delete'), ]; $form['actions']['extra_actions'] = [ '#type' => 'dropbutton', '#links' => [ 'simple_form' => [ 'title' => $this->t('Simple Form'), 'url' => Url::fromRoute('form_api_example.simple_form'), ], 'demo' => [ 'title' => $this->t('Build Demo'), 'url' => Url::fromRoute('form_api_example.build_demo'), ], ], ];
- Assigned to Grimreaper
- 🇫🇷France pdureau Paris
I think this should be done with 🐛 Bootstrap 5: dropdown is too complicated (outdated) Closed: outdated . What do you think about that?
It may be. Unfortunately, 🐛 Bootstrap 5: dropdown is too complicated (outdated) Closed: outdated is waiting for the completion of ✨ Add links setting type Needs review which is slowly progressing.
Can we work on ✨ Add links setting type Needs review first?
- Assigned to pdureau
- Status changed to Postponed
over 1 year ago 8:36am 31 March 2023 - 🇫🇷France Grimreaper France 🇫🇷
Of course.
It was more to highlight and ensure the dependencies between issues.
Keeping this issue assigned to you, due to 🐛 Bootstrap 5: dropdown is too complicated (outdated) Closed: outdated assigned to you.
Changing status to postponed until parent issues are fixed.
- Status changed to Needs work
about 1 year ago 8:41am 30 October 2023 - 🇫🇷France pdureau Paris
https://www.drupal.org/project/ui_patterns_settings/releases/8.x-2.1 → is out!
We can resume work. - Assigned to Grimreaper
- 🇫🇷France Grimreaper France 🇫🇷
Commiting on the MR on 📌 Bootstrap 5: Convert menu, breadcrumb and pagers to the links prop type Needs review .
Almost ok. Not working when it is submit buttons.
$form['actions'] = [ '#type' => 'actions', ]; $form['actions']['key'] = [ '#type' => 'submit', '#value' => $this->t('Key'), '#dropbutton' => 'submit', ]; $form['actions']['submit'] = [ '#type' => 'submit', '#value' => $this->t('Save'),
- 🇫🇷France Grimreaper France 🇫🇷
So this form element structure is coming from core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php.
I have tested it with Olivero and it does not work either.
Found related issue in core #3057577: Provide a way to add Buttons to Dropbutton → which is won't fix, waiting for the new splitbutton element.
So maybe we can stay as it is.
I just wonder if in dropdown template:
{% if button_split %} {{ pattern('button', { label: title, url: button_url, attributes: create_attribute().setAttribute('id', dropdown_id) }, button_variant) }} ...
We should not pass button attributes.
- Status changed to Postponed
about 1 year ago 5:17pm 30 November 2023 - Merge request !153Issue #3369769 by pdureau, Grimreaper: Bootstrap 5: Convert menu, breadcrumb... → (Merged) created by Grimreaper
-
Grimreaper →
committed 1adec720 on 5.0.x
Issue #3345267 by Grimreaper, pdureau: actions and dropbutton form...
-
Grimreaper →
committed 1adec720 on 5.0.x
- Issue was unassigned.
- Status changed to Fixed
about 1 year ago 10:15am 7 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.