pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Show deployment indicator and do not show on-item "Update" button for deployments on Mod Screen

Open twschiller opened this issue 1 year ago • 0 comments

Describe the bug

The mods page shows "update available" for mod deployments when there's a newer version of a mod

A non-restricted user has no way of know which mods are deployments vs. what they manually installed

To Reproduce

Steps to reproduce the behavior:

  1. Deploy an older version of a mod to a restricted user
  2. Log in as the restricted user

Actual behavior

  • The card/row shows an Update button

Expected/New behavior

  • For deployments, the card/row should show the deployment information
  • Keep the Reactivate/Update behavior in the 3-dot menu as-is
  • For deployments, instead of showing the check icon for active deployments, show the deployment icon we use in the Admin Console faDownload: https://github.com/pixiebrix/pixiebrix-app/blob/395c5d3672689d0a7158e3d3ef11e821f69e669d/pixiebrix-app/src/layout/useSidebarLinks.tsx#L153-L153

Discussion

  • The "Status" component currently shows "Update" if a reactivate action is allowed
  • Is there a bug with our logic to determine if re-activate is available? I thought I remembered seeing some cases on customer calls where the "Update" button should not have shown, but I might be wrong

Screenshot

Example of what the developer currently sees for a deployment:

image

After this issue, they should need to click the "3-dot" menu to update: image

Related Code

  • https://github.com/pixiebrix/pixiebrix-extension/blob/bc985fb397f5a289a883668aa2191e82335253cb/src/mods/useModViewItems.tsx#L129-L129
  • https://github.com/pixiebrix/pixiebrix-extension/blob/bc985fb397f5a289a883668aa2191e82335253cb/src/extensionConsole/pages/mods/Status.tsx#L34-L34
  • https://github.com/pixiebrix/pixiebrix-extension/blob/bc985fb397f5a289a883668aa2191e82335253cb/src/extensionConsole/pages/mods/hooks/useReactivateAction.ts#L27-L27

twschiller avatar Mar 23 '24 16:03 twschiller