NASA-AMMOS / aerie-ui

The client application for Aerie.
https://nasa-ammos.github.io/aerie-docs/
MIT License
28 stars 4 forks source link

Lose view customization with aerie_viewer permissions (and when switching to aerie_admin) #1312

Open bradNASA opened 1 month ago

bradNASA commented 1 month ago

Checked for duplicates

Yes - I've already checked

Is this a regression?

No - This is a new bug

Version

2.5.0

Describe the bug

I can't save view customization if I am an aerie-viewer. The options to save the view are disabled. If that is intentional, I question it, but that's not the bug. If I switch to aerie_admin, the page refreshes, and it resets back to the default view, throwing away my changes (after spending 5-10 minutes wasting my time making the changes). Maybe that's as designed, too, but it is a defect if not a bug.

Reproduction

  1. Log in to the Aerie server fresh using actual authentication.
  2. Open up a plan.
  3. Choose a different view
  4. Make 10 minutes of view customizations.
  5. Try to save the view and find that the menu options are disabled because you by default have the aerie_viewer role.
  6. Switch to the aerie_admin role
  7. Watch the page refresh and reset to the default view (instead of the one you were on) with all of your view changes lost.
  8. Try not to blow your brains out.

Logs

No response

System Info

chrome, aerie v2.5.0

Severity

Major

bradNASA commented 1 month ago

Recommendations for fixing:

Don't refresh when changing permission roles; else, preserve changes made to the view or anything else.

Always have the current view saved (no matter the role) so that if the user's laptop crashes, they will not lose their changes.

If somehow it is still possible to lose view changes, first show a dialog to warn them that they will lose their changes and to let them back out and have a chance to save them

Allow an aerie_viewer to save new views, at least. If you really, really don't want a user to be able to save a view, then don't let them customize it.

Re-apply the user's last used view for a plan instead of switching back to the default generated view. (A separate issue may be desirable for this.)