Infisical / infisical

♾ Infisical is the open-source secret management platform: Sync secrets across your team/infrastructure, prevent secret leaks, and manage internal PKI
https://infisical.com
Other
13k stars 677 forks source link

Persist unsaved secret state in secrets overview page #1306

Open jithenms opened 5 months ago

jithenms commented 5 months ago

Describe the bug

Currently, if I close the accordion for each secret in the secrets overview page it loses the state of the unsaved changes.

To Reproduce

  1. Go to the secrets overview page
  2. Toggle open an existing secret
  3. Modify it without saving
  4. Close the accordion
  5. Open it again and the unsaved changes are lost.

Expected behavior

A user goes to the secrets overview page, toggles open an existing secret, modifies it without saving it and closes the accordion, then decides to come back to toggle that secret once again but the unsaved changes were not lost. This is not applicable if the user decides to refresh the page.

Additional context

Screenshot 2024-01-15 at 11 27 51 AM

I'm willing to submit a PR

maidul98 commented 5 months ago

@jithenms All changes to secrets should be intentional and having the user confirm their changes is a way to achieve that. Auto saving changes may cause changes to occur that were not indented.

jithenms commented 5 months ago

@maidul98 updated the issue with the follow up thought I had let me know if you think that's something worth taking a look at. Thanks!

maidul98 commented 5 months ago

If a user modifies content and does not save these modifications, they should receive a standard popup message warning them that their unsaved changes will be lost.