- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
This is really looking bad and exceeds the page width, so should be fixed.
- First commit to issue fork.
- Merge request !15Issue #3452509: Field (widget) descriptions are displayed wrong (should not be in .form-item__suffix) → (Merged) created by Grevil
- Status changed to Needs review
5 months ago 3:04pm 14 August 2024 - 🇩🇪Germany Grevil
I accidentally removed the labels (Length, Width, Height). Fixed it again.
- 🇩🇪Germany Grevil
Since @Anybody asked internally whether the measurement element help text is still displayed, when having only 1 unit available, here is that output:
- Status changed to RTBC
5 months ago 7:57am 15 August 2024 - 🇩🇪Germany Anybody Porta Westfalica
Thank you @Grevil! This fixes the issue for us and now looks correct in general. I couldn't find any issues with the solution.
Regarding the code comments I think the maintainers should have a look. If removing that, I think it might better happen in a follow-up.
- Status changed to Needs work
5 months ago 3:35pm 30 August 2024 - 🇮🇱Israel jsacksick
Haven't tested the patch myself manually, but the main thing I can see is that we're now extending FormElementBase which only exists from D10.3... So by doing this you're making the module compatible with Drupal >D10.3...
- 🇩🇪Germany Anybody Porta Westfalica
@jsacksick thanks! So it might make sense to just use the non
*Base
for now and later on replacing them in a 2.x branch when preparing the ^12 compatible version?Otherwise, we'd need two branches already and that would be extra work for you...
Just to give us a direction how you'd like it! (As non-maintainers it's always good to know which direction the maintainer wants to go into, to not put work into things that will be rejected later on... that's why I ask these questions and very much like early general (green / yellow / red light) maintainer feedback)
Thank you!
- 🇮🇱Israel jsacksick
thanks! So it might make sense to just use the non *Base for now and later on replacing them in a 2.x branch when preparing the ^12 compatible version?
Yes, exactly... No point in opening a new branch just to fix this deprecation, D12 is planned for mid 2026 afaik, so there is time...
- Status changed to Needs review
5 months ago 7:53am 2 September 2024 - 🇩🇪Germany Grevil
Dropped the "container" theme wrapper. Should be all done now! :)
- Status changed to Needs work
5 months ago 7:53am 3 September 2024 - 🇩🇪Germany Grevil
The Number form element ("physical_number") has their own "form_element" theme wrapper set. Since this form element is rendered in Measurement ("physical_measurement"), which now also defines a "form_element" theme wrapper we have two wrappers in place, which will result in a weird looking gab between the input field and the label / help text:
I'll see if I can fix this without simply removing the Number theme wrapper.
- 🇩🇪Germany Anybody Porta Westfalica
I guess structurally it might be fine to keep both, as for some physical field elements it's a combo. So if needed we might fix this visually via CSS?
It's at least already better and more standardized than the implementation before.
- Status changed to Needs review
5 months ago 8:29am 3 September 2024 - 🇩🇪Germany Grevil
Alright, unfortunately this isn't easily fixable.
It seems we can not (easily) remove the theme wrapper of the child "physical_number" form element in "physical_dimensions" / "physical_measurement" and removing the "form_element" wrapper inside the "Number" ("physical_number") class itself would:
A. Introduce a breaking change, as "physical_number" can't have a description nor label anymore
B. "physical_number" won't support "#field_suffix" anymore and a lot would break.Taking a look at the before and after in #9 🐛 Field (widget) descriptions are displayed wrong (should not be in .form-item__suffix) Needs work I would say, that the original issue is fixed and any further work should go into a following issue (or rather 🐛 Dimensions render element / field widget styling lost when used with Claro Needs work ).
With the patch everything works perfectly fine in the admin forms & on frontend. The field description is rendered separately as usual.
So RTBC from my side.
Very hard to work around this issue without the patch if the rendered description markup is included in #suffix and of course, it looks completely broken. So it would be very nice to have this merged & released soon.
- 🇩🇪Germany Anybody Porta Westfalica
MR as static patch for composer for the meantime, but I agree it would be great to have this merged and released soon!
Confirming RTBC - thanks for the wakeup call!
-
jsacksick →
committed b113f00b on 8.x-1.x authored by
grevil →
Issue #3452509: Field (widget) descriptions are displayed wrong (should...
-
jsacksick →
committed b113f00b on 8.x-1.x authored by
grevil →
- Status changed to Fixed
2 months ago 11:24am 12 November 2024 Automatically closed - issue fixed for 2 weeks with no activity.