Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.0 Theme breaks Drupal drag and drop functionality #1300

Open
LOBsTerr opened this issue Jul 5, 2023 · 5 comments
Open

3.5.0 Theme breaks Drupal drag and drop functionality #1300

LOBsTerr opened this issue Jul 5, 2023 · 5 comments

Comments

@LOBsTerr
Copy link

LOBsTerr commented Jul 5, 2023

after update to 3.5.0 we can drag the item, but we can't drop them anymore. For example when we edit a node with paragraphs or table with drag and drop feature. To reproduce we need sortable table, where we can drag and drop items and also set their weight

@LOBsTerr
Copy link
Author

LOBsTerr commented Jul 27, 2023

Actually, we found the reason the select components doesn't apply necessary Drupal classes in ecl-select.html.twig:

{% set _css_group_class = 'ecl-form-group' %}
{% set _css_class = ['ecl-select'] %}
{% set _css_class = _css_class|join(' ') %}

And this breaks drag and drop. This our fix:

{% set _css_group_class = 'ecl-form-group' %}
{% set _css_class = ['ecl-select'] %}
{% set _css_class = _css_class|merge(attributes.class) %}

@LOBsTerr
Copy link
Author

To be more precise we are missing this class "table-sort-weight".

@22Alexandra
Copy link
Contributor

22Alexandra commented Sep 8, 2023

Hi @LOBsTerr, could you please point to some pages where this can be seen?
Using oe_theme for editing and creating content doesn't seem to allow drag&drop at all and the oe_theme table.html.twig template uses the ECL Table component (ecl-table.html.twig).

The ecl-select.html.twig template is used for the select form element.

@LOBsTerr
Copy link
Author

Hi @22Alexandra, we managers the admin is not allow and they are using oe_theme to update the content and change the configuration of their groups.

I think the easiest way to add a paragraph field and add a few paragraphs then you can see drag and drop feature there.
And it is broken, because of the missing classes

@upchuk
Copy link
Contributor

upchuk commented Sep 15, 2023

@LOBsTerr #1317 can you see if this PR fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants