Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mods screen shows "update" button for team deployments #9103

Closed
twschiller opened this issue Sep 6, 2024 · 3 comments · Fixed by #9140
Closed

Mods screen shows "update" button for team deployments #9103

twschiller opened this issue Sep 6, 2024 · 3 comments · Fixed by #9140
Assignees
Labels
bug Something isn't working user experience Improve the user experience (UX)

Comments

@twschiller
Copy link
Contributor

twschiller commented Sep 6, 2024

Describe the bug

  • Mods screen shows "update" button for deployments
  • The intent of deployments is that users will use the pinned version
  • The button is confusing because users naturally think they're supposed to click the button

To Reproduce

Steps to reproduce the behavior:

  1. Create a deployment of a mod and pin to an older version
  2. Deploy the mod via deployment key (or normally to a restricted user)

Actual behavior

The mods screen shows an "Update" button for the mod

Expected behavior

  • The mods screen shows an "Active" status with the pinned mod version for the mod

Discussion

  • For organizations that apply UI restrictions, the RestrictedFeatures.DEACTIVATE_DEPLOYMENT would be the policy for whether or not the use is able to deactivate/re-activate a deployment
  • However, to avoid confusion in the UI, for deployments, the mods screen SHOULD NOT show the Update button as the main status to any user. But users with permission to reactivate should still be able to re-activate/upgrade using the 3-dot menu to get the latest version
  • Note that the Update button should show for personal deployments: Slice 2.2 Support creating user deployment in extension console #9091

Future Work

  • Indicate to developers/managers/admins when a mod deployment isn't the latest version (and see which version is activated vs. the latest)

Related Code

@twschiller twschiller added bug Something isn't working user experience Improve the user experience (UX) labels Sep 6, 2024
@twschiller twschiller changed the title Mods screen shows "update" button for deployments Mods screen shows "update" button for team deployments Sep 6, 2024
@mnholtz mnholtz self-assigned this Sep 11, 2024
@mnholtz
Copy link
Collaborator

mnholtz commented Sep 11, 2024

Interpreting defintion of done from discussion here:
Acceptance Criteria

  1. Mods activated via deployment should have "Active" status for pinned mod version
  • Given a user views the mods screen after creating a deployment and pinning it to an older version,
  • When the user views the mod in the mods page,
  • Then the screen should not show an "Update" button for the pinned mod version.
  1. Mods activated via deployment key should have "Active" status for pinned mod version
  • Given a user has deployed a mod using a deployment key,
  • When the user views the mods screen,
  • Then the screen should display "Active" as the status with the pinned mod version.
  1. Ability to update deployed mod via 3-dot menu
  • Given a user has permission to reactivate a deployment (or any mod for that matter),
  • When they view the mod in the mods screen,
  • Then they should be able to update to the latest version using the "Update" option in the 3-dot menu
  1. Update Button for Personal Deployments
  • Given a user has created a personal deployment,
  • When they view the deployed mod in the mods screen,
  • Then the screen should show the "Update" button if there is a newer version available
  1. Correct "Update" Restrictions for Organizations
  • Given an organization has applied UI restrictions via
    DEACTIVATE_DEPLOYMENT: "uninstall",
  • When a user views the mods screen,
  • Then the option to "Update" or "Reactivate" should not be displayed to the user in any situation

@mnholtz
Copy link
Collaborator

mnholtz commented Sep 11, 2024

@twschiller is this bullet correct?

Update Button for Personal Deployments
Given a user has created a personal deployment,
When they view the deployed mod in the mods screen,
Then the screen should show the "Update" button (instead of the "Active" status) if there is a newer version available.

@mnholtz
Copy link
Collaborator

mnholtz commented Sep 11, 2024

Update Button for Personal Deployments
Given a user has created a personal deployment,
When they view the deployed mod in the mods screen,
Then the screen should show the "Update" button (instead of the "Active" status) if there is a newer version available.

Per slack conversation, acceptance criteria #4 will omit subsequent clicking behavior to "...[click update] and then the new version would be what’s sync’d across their devices" as it is out of scope. We'll be creating a follow-up ticket to implement this behavior.

mnholtz added a commit that referenced this issue Sep 12, 2024
* refactor buildGetModVersionStatus - extract isLatestVersion

* swap isLatestVersion parameter position

* refactor replace VersionInfo | null with Nullishable type

* refactor rename VersionInfo -> ModVersionInfo

* refactor rename getModVersionInfo

* add isDeployment logic to update button clause

* change isDeployment logic -> sharingType === 'Deployment' to accommodate personal deployment feature

* add text-nowrap to update button

* remove todo

* add 'doesn't show update for deployment' test

* add PersonalDeployment test

* tweak test name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user experience Improve the user experience (UX)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants