Skip to content

"Undo" functionality in flash messages (issue #64) - #182

Open
wuletawwonte wants to merge 10 commits into
TelosLabs:mainfrom
wuletawwonte:64-undo-functionality-in-flash-messages
Open

"Undo" functionality in flash messages (issue #64)#182
wuletawwonte wants to merge 10 commits into
TelosLabs:mainfrom
wuletawwonte:64-undo-functionality-in-flash-messages

Conversation

@wuletawwonte

@wuletawwonte wuletawwonte commented Sep 18, 2024

Copy link
Copy Markdown
Contributor

Description

This PR addresses issue #64. I have implemented an undo action that allows users to revert their last action via a button in the flash message as per the design in Figma.

How it works:

  1. Each time an action (create, destroy) is performed, it is stored in the session (session[:last_action])
  2. The flash message partial conditionally displays an "Undo" button based on if the undo path is available that allows the user to revert the action
  3. The undo action then retrieves the last action from the session and reverts it.

How has this been tested?

Please mark the tests that you ran to verify your changes. If difficult to test, consider providing instructions so reviewers can test.

  • Manual testing
  • System tests
  • Unit tests
  • None

Checklist

  • CI pipeline is passing
  • My code follows the conventions of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • I have added seed data to the database (if applicable)

Release tasks

Add any tasks that need to be done before/after the release of this feature.

Screenshots/Loom

This section is relevant in case we want to share progress with the team, otherwise, it can be omitted.

@wuletawwonte
wuletawwonte marked this pull request as ready for review September 19, 2024 09:24
@LuigiR0jas
LuigiR0jas self-requested a review September 19, 2024 21:01
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.

3 participants