Skip to content

Conversation

@Paul-Bob
Copy link
Contributor

@Paul-Bob Paul-Bob commented Jan 9, 2024

Description

Fixes #2336

Adds the close_modal action's response option that flashes the alerts and closes the modal.

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

Screenshots

close_modal.webm

Manual review steps

  1. Add close_modal to an action
  2. Use that action on record creation
  3. Notice that action runs and don't clears the form

@Paul-Bob Paul-Bob self-assigned this Jan 9, 2024
@qlty-cloud-legacy
Copy link

qlty-cloud-legacy bot commented Jan 9, 2024

Code Climate has analyzed commit 1601215 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

@Paul-Bob Paul-Bob changed the title feature: close_modal_and_flash_alerts feature: close_modal Jan 9, 2024
when :close_modal
# Close the modal and flash the messages
render turbo_stream: [
turbo_stream.remove("actions_show"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's create a custom stream action here close_action_modal.

Copy link
Collaborator

@adrianthedev adrianthedev left a comment

Choose a reason for hiding this comment

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

let's create a custom stream action here close_action_modal.

Then it's good to be merged!

@Paul-Bob Paul-Bob merged commit a618b69 into main Jan 9, 2024
@Paul-Bob Paul-Bob deleted the feature/close_modal_and_flash_alerts branch January 9, 2024 16:45
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2024

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.

Add the ability to run an action and not reload or redirect.

3 participants