- Issue created by @kopeboy
- 🇮🇹Italy kopeboy Milan
I also noticed that the current button breaks the styling of the field form, by making the label inline and other elements after the button not aligned (for example the Delete button on multi-value fields, or additional inputs like those defined in entity_reference_quantity fields - if/when supported).
I didn't test with Bootstrap, just default core theme Claro (with which anything should work).
Providing a fix shortly (but I won't be able to test it with Bootstrap).
- 🇮🇹Italy kopeboy Milan
I also added core CSS classes (button, button--primary) but I couldn't make them show up when the search button is enabled (so I removed them from the $attributesBootstrapTable).
It's debatable if Bootstrap-related classes should be added by default, but I left them to not break functionality for existing users. - 🇮🇹Italy kopeboy Milan
Should be good for review now. I hope this helps and will be included in the module!
- 🇫🇷France lazzyvn paris
It must support Bootstrap 5 admin(there is an option to enable Bootstrap 5 if your theme is not based on Bootstrap 5), I user lib bootstrap 5 table for search,... I would be happy if the Gin theme were also supported.
Your merge request doesn't pass the phpcs test, so I definitely can't merge your branch - 🇮🇹Italy kopeboy Milan
Gitlab said "ready to merge", with only minor warnings:
- Line exceeds 80 characters: on 2 comments I added
- Expected newline after closing brace: on 2
} else
but I fixed them now.
I didn't remove any bootstrap class 👍🏻
I just tested with Gin:
- without this MR: the dropbutton is misaligned and taller than the input and the Remove button
- with this MR:
- the dropbutton is centered vertically (but still taller - apparently this is a Gin issue: dropbuttons are taller than buttons)
- the single button is aligned and same height of input and Remove button.
Recap in attached screenshots.
Updated issue summary to clarify why this use case is important.
- 🇮🇹Italy kopeboy Milan
I also noticed that this MR, since it moves the button element from the field's description to the field's suffix, would also fix the fact that with Gin, when the option form description toggle is enabled in its settings, the button is automatically hidden:
You need to click the toggle to see the button: