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

Switch ingredient update response from Javascript to Turob Stream #2891

Merged

Conversation

sascha-karnatz
Copy link
Contributor

@sascha-karnatz sascha-karnatz commented May 23, 2024

What is this pull request for?

  • add alchemy-action - component (which is an extend version of wip: Add alchemy-action #2883)
    • trigger three different actions to allow the usage of Turob Stream responses
  • replace the Javascript reponse to Turob Stream in the admin/ingredients/update - route

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

tvdeyen and others added 2 commits May 23, 2024 14:38
Allows to call functions that are registered as action from a
`turbo_stream` response. It supports closeCurrentDialog, reloadPreview,
and updateAnchorIcon. The closeCurrentDialog is an intermediate solution
until all dialogs will respond with a promise.
As a preparation to replace the Rails Javascript responses, the ingredient update response was replaced with turbo stream. It now uses the alchemy-action - component to trigger action in our frontend. As an addition the response also triggers a previewReload action to reflect the changes in the settings of an ingredient.
@sascha-karnatz sascha-karnatz requested a review from a team as a code owner May 23, 2024 12:48
Copy link

codecov bot commented May 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.95%. Comparing base (7c1505e) to head (32f6e24).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2891      +/-   ##
==========================================
+ Coverage   95.94%   95.95%   +0.01%     
==========================================
  Files         230      230              
  Lines        6260     6258       -2     
==========================================
- Hits         6006     6005       -1     
+ Misses        254      253       -1     

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

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 🤩

@tvdeyen tvdeyen merged commit 70b0d49 into AlchemyCMS:main May 23, 2024
36 checks passed
@sascha-karnatz sascha-karnatz mentioned this pull request May 23, 2024
3 tasks
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.

None yet

2 participants