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

fix: action redirect loop #3545

Merged
merged 3 commits into from
Dec 19, 2024
Merged

fix: action redirect loop #3545

merged 3 commits into from
Dec 19, 2024

Conversation

Paul-Bob
Copy link
Contributor

Description

Fixes #3409

Implement turbo_stream.avo_close_modal on all responses, excluding those intended to keep the modal open. This ensures the action modal is refreshed, preventing it from retaining the SRC of the last executed action. When navigating back, the modal is present in a fresh state, avoiding unintended re-execution of the previous action.

While enabling turbo_temporary on the frame could address this issue, it introduces another problem: the modal disappears when navigating back, and actions fail to execute.

This solution resolves both issues effectively and includes tests to validate the behavior.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@Paul-Bob Paul-Bob self-assigned this Dec 19, 2024
@github-actions github-actions bot added the Fix label Dec 19, 2024
Copy link

codeclimate bot commented Dec 19, 2024

Code Climate has analyzed commit 8dc3853 and detected 0 issues on this pull request.

View more on Code Climate.

@Paul-Bob Paul-Bob merged commit d8e7728 into main Dec 19, 2024
21 checks passed
@Paul-Bob Paul-Bob deleted the fix/action_redirect_loop branch December 19, 2024 10:02
Copy link
Contributor

This PR has been merged into main. The functionality will be available in the next release.

Please check the release guide for more information.

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

Successfully merging this pull request may close these issues.

actions can sometimes trigger an infinite redirect
1 participant