Add appropriate Snapshot actions to all snapshot table views
Description
We currently list snapshots in a few different views. We are lacking consistency on the actions available against individual snapshots in each of those places.
Here's what actions we provide currently in the respective views:
instance/:id/snapshotsRollbackDownload SnapshotDownload package.jsonSet as device targetDelete Snapshot
device/:id/snapshotsDelete Snapshot- A 'deploy snapshot' button appears in the row when the mouse hovers over it instead of using the action menu
application/:id/snapshots- No action menu
Proposed set of changes:
- https://github.com/FlowFuse/flowfuse/issues/3629 already proposes renaming 'Rollback' - should also consider the two different UXes we have for that action
- Add 'delete snapshot' to Application view
- Add Download* to Application/device view - don't immediately see why that would be restricted to just instances
Goal is very much a quick iteration to get these things inline.
Epic/Story
No response
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
Info (for reference)
application/:id/snapshots
- No action menu
A menu is to be added as part of https://github.com/FlowFuse/flowfuse/pull/3835
This can be built upon once merged.
- Add Download* to Application/device view - don't immediately see why that would be restricted to just instances
This will be possible following https://github.com/FlowFuse/flowfuse/pull/3833
- A 'deploy snapshot' button appears in the row when the mouse hovers over it instead of using the action menu
- Proposal to Rename 'Rollback' to 'Deploy Snapshot' #3629 already proposes renaming 'Rollback' - should also consider the two different UXes we have for that action
My preference would be to:
- move the current device->snapshots 'Deploy Snapshot' button into the kebab menu
- Rename "rollback" to 'Deploy Snapshot' & keep it in the instance->snapshots page kebab menu
Having spend some time in this this afternoon, there are a few UX things that require some further thought.
I have made a collage of the 3 snapshot views (the 4th is the device snapshots but showing ALL application snapshots (other instances/devices)
Pertinent questions are:
- APPLICATION VIEW: We cannot (easily) show the "Deploy Snapshot" item since it requires a device or instance (i.e. not really applicable to an an application). If this IS required, then we need to add an entity selector that provides a list of projects and devices in the application
- APPLICATION VIEW: Set as target snapshot does not feel right in the Application view - can i leave this out?
- DEVICE VIEW: Devices dont really have a Set as Snapshot singular function. When the "Deploy Snapshot" is operated, the device tables target snapshot field is set. We could synthesise this but i feel it is right to leave this out here and now.
- DEVICE VIEW incl other snapshots: Do we really want "Set as Device Target" option in the "Device Snapshots" - the instance snapshots are only visible at this time because the user elected to Show all snapshots. I recommend we leave this out
- DEVICE VIEW incl other snapshots: Do we really want "Delete Snapshot" options in the "Device Snapshots" for an unrelated instance? As above, the instance snapshots are only visible at this time because the user elected to Show all snapshots. I recommend we leave this disabled for snapshots NOT belonging to the device being viewed.
@joepavitt some feedback on the above from yourself too would be appreciated.
The goal is to achieve a sensible level of consistency. That doesn't mean we must have exactly the same options in every menu - I agree the 'deploy' option doesn't have good meaning in the Application view for example.
But, unless there's a reason not to, we should have a minimum of 'view', 'download', 'delete' actions that are entirely generic and apply to all snapshots.
The others are going to be context specific and we shouldn't force them in where they don't belong.