flowfuse icon indicating copy to clipboard operation
flowfuse copied to clipboard

Add appropriate Snapshot actions to all snapshot table views

Open knolleary opened this issue 1 year ago • 1 comments

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/snapshots
    • Rollback
    • Download Snapshot
    • Download package.json
    • Set as device target
    • Delete Snapshot
  • device/:id/snapshots
    • Delete 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

knolleary avatar May 02 '24 17:05 knolleary

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

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

Steve-Mcl avatar May 07 '24 16:05 Steve-Mcl

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:

  1. 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
  2. APPLICATION VIEW: Set as target snapshot does not feel right in the Application view - can i leave this out?
  3. 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.
  4. 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
  5. 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.

image

Steve-Mcl avatar May 17 '24 15:05 Steve-Mcl

@joepavitt some feedback on the above from yourself too would be appreciated.

Steve-Mcl avatar May 17 '24 15:05 Steve-Mcl

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.

knolleary avatar May 17 '24 16:05 knolleary