- Issue created by @HLopes
- π΅πΉPortugal HLopes
Patch that removes both columns (action and order).
- Status changed to Needs review
10 months ago 12:47pm 4 February 2024 - last update
10 months ago 182 pass - π΅π±Poland nsavitsky
@hlopes Thank you very much for this patch and description, it helped me so much to understand what happened with paragraphs widget after 10.2 update.
So, if I understand correctly, in 10.2 we have "very special" new column for having actions. It looks like the problem is more complex than the case with cardinality = 1, because with 1.x paragraphs widget shows empty table cell (which actually breaks css/js) and shows actions in the content/title cell. I guess the correct approach will be to actually use this new cell, instead of hiding. That's why I extended the patch of @hlopes to implement this solution.
It works great with Claro.
Before patch:
After patch:
Unfortunately, it doesn't look good with Gin, because it shows paragraphs widget using "display:block" and has some magic css for calculating width and I don't really understand how it works (but it was broken before patch too, so it doesn't make it any worse :) ).
- last update
10 months ago 86 pass, 76 fail The last submitted patch, 5: 3418303-2-paragraphs__fix_sort_and_action_columns.patch, failed testing. View results β
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- π΅π±Poland nsavitsky
Ouch, this is painful. The moving actions to new column obviously crashed functional testing. I'll try to find some time to update tests if my fix makes sense.
- πΊπΈUnited States recrit
the patch in #2 π New structure for template_preprocess_field_multiple_value_form Needs work fixed the issue for me.
- π¦πΉAustria hudri Austria
I've been testing a bit, the changes from #1038316 π Allow for deletion of a single value of a multiple value field Fixed broke a lot of things in Paragraphs. I'm currently getting best results with patch from #2, in multi-lingual and nested scenarios. The patch from #5 has issues with nested paragraphs, in my case the < table >'s expanded horizontally far beyond the container < div >.
- πͺπΈSpain budalokko Girona
Patch in #2 works for me in Claro, but #5 still shows the "Collapse" button misplaced, leaving less space for the actual form fields:
Patch in #2:
Patch in #5:
- Status changed to Postponed: needs info
4 months ago 10:11pm 6 August 2024 - π¨πSwitzerland berdir Switzerland
I merged π Order select shows on a translation of a paragraphs field on 10.2+ Fixed which I think resolves this, my understanding from #5 is that there is still an issue with Gin, so keeping this open to verify and address that, without regressions on Claro which the patch there apparently has.
Extending tests would also be useful.
- π¦π·Argentina hanoii π¦π·UTC-3
I use Gin on most of my projects and π Order select shows on a translation of a paragraphs field on 10.2+ Fixed definitely sorted it out also on Gin.
- π΅π±Poland nsavitsky
@berdir I just tested version 1.18 with Claro and it definitely looks better than it was before. Not ideal, unfortunately, because we still have issue with empty table cells (see screenshot below), but it doesn't catch your eye.
- Status changed to Needs work
2 months ago 7:06pm 20 September 2024 - π¨π¦Canada tame4tex
As @nsavitsky confirmed this is not completely fixed.
template_preprocess_field_multiple_value_form()
is automatically adding an extra table column for a form element item's'_actions'
.\Drupal\Core\Field\WidgetBase::formMultipleElements()
adds the'_actions'
array key and populates it with the item's remove button.Given
\Drupal\paragraphs\Plugin\Field\FieldWidget\ParagraphsWidget::formMultipleElements()
does not add'_actions'
to its items, we end up with this extra empty column.The question is should this be fixed in core or paragraphs? Should core automatically add a column for
'_actions'
without confirming that items do actually have that key? - Assigned to tame4tex
- Merge request !151Issue #3418303: New structure for template_preprocess_field_multiple_value_form β (Open) created by tame4tex
- π¨π¦Canada tame4tex
Assuming this wont be addressed in core, I have added a MR to fix the extra empty column issue.
I have refactored
paragraphs_preprocess_field_multiple_value_form
quite a bit in an attempt to improve readability and improve robustness.I have manually tested on both paragraph widget types and all looks to be ok.
- Status changed to Needs review
2 months ago 11:00pm 20 September 2024