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

Add delete-element-button #2818

Merged
merged 4 commits into from
Apr 4, 2024
Merged

Add delete-element-button #2818

merged 4 commits into from
Apr 4, 2024

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Apr 4, 2024

What is this pull request for?

Instead returning imperative JS from a js.erb server response (that only works with the deprecated rails-ujs library)
we introduce another web component that uses the also introduced ConfirmDialog ES class and a promised based
approach to do the things we do after we removed an element.

Checklist

Copy link

codecov bot commented Apr 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.92%. Comparing base (fc97f93) to head (5e789e0).

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

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

Do not use global Alchemy object anymore and fix a
bug with nested dirty elements not being detected.
Replaces a js.erb template returned from the controller.
In order for this to work we return a promise from
confirmToDeleteDialog that gets resolved after the
DELETE request has been made.
No need for jQuery.hide animation here.
@tvdeyen tvdeyen changed the title Delete element button Add delete-element-button Apr 4, 2024
@tvdeyen tvdeyen added this to the 7.2 milestone Apr 4, 2024
@tvdeyen tvdeyen marked this pull request as ready for review April 4, 2024 10:10
@tvdeyen tvdeyen requested a review from a team as a code owner April 4, 2024 10:10
@tvdeyen tvdeyen enabled auto-merge April 4, 2024 10:21
@tvdeyen tvdeyen merged commit f0b0403 into main Apr 4, 2024
35 of 36 checks passed
@tvdeyen tvdeyen deleted the delete-element-button branch April 4, 2024 13:38
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