cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

frontend: improve user and profile management

Open ES-Alexander opened this issue 1 year ago • 0 comments

Current behaviour

  1. There is no interface for existing users to be deleted or renamed
    • It's currently only possible by manually editing the JSON in the BlueOS Bag of Holdings
  2. The user switching interface doesn't make it obvious what the differences are between users
  3. New users get created as a duplicate of the current user, without the user being informed
  4. "Add New" in the user selection window looks like a user, which is a little confusing/unintuitive
    • It's in the same place, and only slightly visually different from the available users Screenshot 2024-10-03 at 7 46 32 PM
  5. "Save" in the user selection window doesn't make sense, and "Cancel" seems redundant
  6. "Cancel" in the new user creator cancels the whole selection process, not just the new user creation
  7. Sharing profiles between users requires a manual export and import, which feels a bit clunky
  8. Profiles have no sense of history/basis
    • This makes it hard to know when there are new view/widget options available
      • Relevant to #234
  9. Default profiles can only be accessed by restoring all the user's profiles to the defaults
  10. Initial profiles for the default user are labelled as defaults, but are editable, and don't actually change the real defaults
  11. The profile switcher treats the icon differently between the selected and available profiles Screenshot 2024-10-03 at 7 35 43 PM

Expected or desired behaviour

  1. Add an admin / settings cog / pencil button in the top right of the user switcher
    • Allow renaming and deleting users from there
    • Confirm/cancel to return to the user switcher and choose your user
  2. The user switcher should show the Profiles included in each user
    • Include indicators of which vehicle types they apply to
    • Preferably list out the View names within each profile as well
  3. Along with choosing a name, new user creation should allow explicitly selecting an existing user as a basis
    • Include a special "Empty" option that has no profiles, which then opens the Profile creator (see 7.)
    • Maybe include a special "General" option, with clones of all the current default Profiles
      • I think explicit choices are better, but this could be convenient for some users to quickly get a sense of what Cockpit can do
      • If we do this, the generated Profiles should not include "default" in their names
  4. "Add New" should be replaced with a "+", and should potentially have no background or a circular one
    • We could also make user creation exclusive to the admin section, but that might be unintuitive for new users
  5. In user selection, remove the "Save"/"Cancel" buttons, and make it necessary to select a user
    • It would be helpful to add an icon/styling to indicate which user is currently selected, if there is one
    • Clicking out of the window or pressing Escape should be equivalent to choosing the current user
      • If there isn't one it should do nothing, or provide an error indication/message that a user must be selected or created
  6. "Cancel" in the new user creator should return to the user selector
  7. New Profile creation should allow selecting an existing profile as a basis
    • Include Cockpit's default profiles as basis options
      • Include a special "Empty" option, with a single "View" View, with no widgets in it
    • Include profiles available from other users on the system
      • Ideally avoid duplicates, but that's not critical
    • Ideally render out a thumbnail of each View, but at least list their names, and possibly allow expanding them to see a list of the widgets they include
    • If the Profile name gets pre-filled from its basis, it should not include the word "default"
  8. Store metadata with each profile as to its basis and latest update time (unix epoch seconds)
    • e.g. {"branched_from": "defaults:ROV profile", "branched_on": 1727951073, "last_updated": 1727951207}
    • This would make it trivial to provide a notification when a basis profile has been updated
    • Storing release date metadata with each widget would allow also providing notifications when there are new widgets released since the last update of this user's most recently updated profile
      • This would also allow showing "new" icons on the widgets in edit mode, based on the active profile's last update time
  9. This gets resolved by 7.
  10. There should be no initial profiles for a completely new vehicle
    • Per 3., the Profile creator should open when a user is created without profiles
      • It should also open if a vehicle is connected and the user has no available Cockpit profile that supports that vehicle type
  11. The icon should be consistently included in the dropdown, including for the selected option
    • It seems redundant to have "profile" in the name of every profile - perhaps we could have a "Current Profile" heading to the left of the profile selector, and let profiles be named normally

Prerequisites

  • [X] I have checked to make sure that a similar request has not already been filed or fixed.

ES-Alexander avatar Oct 03 '24 10:10 ES-Alexander