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

Locally initialize SortableElements #2815

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Apr 3, 2024

What is this pull request for?

We have two places where we need to initialize SortableJS for elements.

  1. The ElementsWindow and its top level elements
  2. The nested elements inside of each element-editor

Instead of using the global Alchemy object to initialize them we can import the file locally and init it where it needs to be. This makes it possible to remove another global call from the create.js.erb file.

Checklist

We have two places where we need to initialize SortableJS
for elements.

1) The ElementsWindow and its top level elements
2) The nested elements inside of each element-editor

Instead of using the global Alchemy object to initialize
them we can import the file locally and init it where it needs
to be. This makes it possible to remove another global
call from the `create.js.erb` file.
@tvdeyen tvdeyen added this to the 7.2 milestone Apr 3, 2024
@tvdeyen tvdeyen requested a review from a team as a code owner April 3, 2024 16:09
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (20ff6ed) to head (1e5766c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2815   +/-   ##
=======================================
  Coverage   95.92%   95.92%           
=======================================
  Files         225      225           
  Lines        6129     6129           
=======================================
  Hits         5879     5879           
  Misses        250      250           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tvdeyen tvdeyen merged commit fc97f93 into main Apr 4, 2024
35 checks passed
@tvdeyen tvdeyen deleted the local-sortable-elements branch April 4, 2024 06:57
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

Successfully merging this pull request may close these issues.

2 participants