-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
feat: Adds new admin feature preview setting management #33212
Conversation
… user preferences settings
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: d607c08 The changes in this PR will be included in the next version bump. This PR includes changesets to release 34 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ion on accounts.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some expected behavior I'm missed:
- The badge with the number of not viewed features in the new admin sidebar item
- The feature preview list should be shown despite being enabled or not
- The badge with the number of not viewed features in the user account sidebar item
- Setting a feature preview as default doesn't reflect on the user preferences
- Even activating the feature on user preferences, the desired feature doesn't work
apps/meteor/client/views/account/featurePreview/AccountFeaturePreviewPage.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx
Outdated
Show resolved
Hide resolved
apps/meteor/client/views/admin/featurePreview/AdminFeaturePreviewPage.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed, we need to test the new screen! Let me know if you need any help ;)
fe6b237
to
6ec11a0
Compare
@@ -0,0 +1,40 @@ | |||
import { Users } from './fixtures/userStates'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of creating an e2e test, I think creating few unit tests would be much more useful. also you didn test the whole point: if the default works for the users, you just tested if the page renders, which is expected already ;)
6ec11a0
to
d607c08
Compare
Co-authored-by: Guilherme Gazzo <[email protected]>
* Bump 6.12.1 * fix: message parser being slow to process very long messages with too many symbols (#33254) Co-authored-by: Pierre Lehnen <[email protected]> * fix: Allow to use the token from `room.v` when requesting transcript instead of finding visitor (#33242) Co-authored-by: Kevin Aleman <[email protected]> * fix: Retention Policy cached settings not updated during upgrade procedure (#33265) Co-authored-by: gabriellsh <[email protected]> * fix: imported fixes (#33268) Co-authored-by: Julio A. <[email protected]> * Release 6.12.1 [no ci] * fix: Federation callback not awaiting model call (#33298) * fix: correct parameter order in afterSaveMessage to restore outgoing webhooks and related features (#33295) * feat: New endpoint for listing rooms & discussions from teams (#33177) * chore: Update typings on callbacks to accept less than a full room object (#33305) * fix: resolve avatar download issue on setUsername by refining service selection logic (#33193) * feat: Allow managing association to business units on departments' creation and update (#32682) * fix: Local avatars prioritized over external avatar provider and remove remnant references on client of `Accounts_AvatarExternalProviderUrl` (#33296) Co-authored-by: gabriellsh <[email protected]> * fix: Mark as unread not working (#32939) Co-authored-by: Douglas Fabris <[email protected]> * refactor: Remove old `setreaction` callbacks and use new after/before callbacks (#33309) * fix: `LivechatSessionTaken` webhook event called without `agent` param (#33209) * fix: error on sendmessage stub (#33317) * feat: contextualbar based on chat size (#33321) * feat: `RoomSidepanel` (#33225) Co-authored-by: Guilherme Gazzo <[email protected]> * ci: auto candidate releases (#33325) Co-authored-by: Diego Sampaio <[email protected]> * refactor: Reactions set/unset (#32994) * feat: E2EE messages mentions (#32510) * fix: markdown inconsistency with bold and italics (#33157) * fix: conference calls are shown as "not answered" after they end (#33179) * Release 6.13.0-rc.0 * chore: update E2EE setting text (#33226) * feat: Implement proper accessbility for report user modal (#33294) Co-authored-by: Tasso Evangelista <[email protected]> * fix: imported fixes (#33330) * chore: create network broker package (#33338) * feat: Adds new admin feature preview setting management (#33212) Co-authored-by: Guilherme Gazzo <[email protected]> * chore: move common files to core-services (#33341) * regression: `Sidepanel` color highlight (#33342) * feat: Adds new admin feature preview setting management (#33212) Co-authored-by: Guilherme Gazzo <[email protected]> * fix: Avoid destructuring `connectionData` when value is undefined (#33339) * Release 6.13.0-rc.1 [no ci] * chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356) * Bump rocket.chat to 6.14.0-develop (#33366) * ci: use node20 for release action (#33343) --------- Co-authored-by: rocketchat-github-ci <[email protected]> Co-authored-by: dionisio-bot[bot] <117394943+dionisio-bot[bot]@users.noreply.github.com> Co-authored-by: Pierre Lehnen <[email protected]> Co-authored-by: Kevin Aleman <[email protected]> Co-authored-by: gabriellsh <[email protected]> Co-authored-by: Julio A. <[email protected]> Co-authored-by: Guilherme Gazzo <[email protected]> Co-authored-by: Kevin Aleman <[email protected]> Co-authored-by: Ricardo Garim <[email protected]> Co-authored-by: Matheus Barbosa Silva <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]> Co-authored-by: Martin Schoeler <[email protected]> Co-authored-by: Douglas Fabris <[email protected]> Co-authored-by: Júlia Jaeger Foresti <[email protected]> Co-authored-by: Guilherme Gazzo <[email protected]> Co-authored-by: Diego Sampaio <[email protected]> Co-authored-by: Hugo Costa <[email protected]> Co-authored-by: csuadev <[email protected]> Co-authored-by: Henrique Guimarães Ribeiro <[email protected]> Co-authored-by: Tasso Evangelista <[email protected]> Co-authored-by: Lucas Pelegrino <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]>
…apped/composer-restriction * 'develop' of github.com:RocketChat/Rocket.Chat: (55 commits) regression: `Sidepanel` sort requires refresh after room update (#33370) ci: use node20 for release action (#33343) Bump rocket.chat to 6.14.0-develop (#33366) chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356) Release 6.13.0-rc.1 fix: Avoid destructuring `connectionData` when value is undefined (#33339) feat: Adds new admin feature preview setting management (#33212) regression: `Sidepanel` color highlight (#33342) chore: move common files to core-services (#33341) feat: Adds new admin feature preview setting management (#33212) chore: create network broker package (#33338) fix: imported fixes (#33330) feat: Implement proper accessbility for report user modal (#33294) chore: update E2EE setting text (#33226) Release 6.13.0-rc.0 fix: conference calls are shown as "not answered" after they end (#33179) fix: markdown inconsistency with bold and italics (#33157) feat: E2EE messages mentions (#32510) refactor: Reactions set/unset (#32994) ci: auto candidate releases (#33325) ...
…ocket.Chat into feat/airgapped-restrictions * 'feat/airgapped-restrictions' of github.com:RocketChat/Rocket.Chat: (57 commits) fix: Async E2EE key exchange not working on develop (#33378) chore: Move Apps-Engine to monorepo (#32951) chore(Sidepanel): uses only local channels and discussions (#33387) chore: add gazzodown preview (#33279) fix: Avoid notifying `watch.settings` on uncaught errors (#33376) fix: race condition when forwarding livechat by splitting subscription removal (#33381) chore: Single Contact ID: improved typings and removed some duplicated code (#33324) ci: remove Jira-GitHub security integration (#33384) chore: add ui-composer to storybook (#33383) regression: `Sidepanel` sort requires refresh after room update (#33370) ci: use node20 for release action (#33343) Bump rocket.chat to 6.14.0-develop (#33366) chore: replace Meteor._localStorage -> Accounts.storageLocation (#33356) Release 6.13.0-rc.1 fix: Avoid destructuring `connectionData` when value is undefined (#33339) feat: Adds new admin feature preview setting management (#33212) regression: `Sidepanel` color highlight (#33342) chore: move common files to core-services (#33341) feat: Adds new admin feature preview setting management (#33212) chore: create network broker package (#33338) ...
Proposed changes (including videos or screenshots)
This PR adds the new admin feature preview pages, where workspace admins can enable feature previewing and manage what features will be enabled by default for all users.
ADR: https://adr.rocket.chat/0103
Issue(s)
CORE-654
Steps to test or reproduce
As a admin, go to Workspace management, the feature preview page link should be present in the sidebar.
Further comments
This PR has a few technical debts; for instance, in order to save the default feature preview list in our settings, I had to use transform the list into a string, and cast it back to an array of objects when I'm using it. Same as when I'm modifying the default settings. This adds complexity that could be avoided if we could save direct objects in the settings.
I understand there's
select
andmultiSelect
configuration that allows us to save arrays of objects, but that would not be appropriate for this particular setting as its purpose is to store a list of objects that builds the feature previews configuration, such as if its a feature that we made available for use, or if its enabled in the workspace, translations keys, etc. It's a logical setting that we use on the background and the admin sets as a default preference for the workspace users.Another issue is that we currently have the new features hard coded in the front end, this was fine when there was no default setting configuration. But now we actually use this information in the backend and we would have to duplicate the list, or... as I implemented, save an empty array initially that will be populated with the list once the user access the feature preview page for the first time.
We could work on a directory that is used by both BE and FE to collect data such as this one. This way we have a single source of truth and no need to duplicate data or add workarounds in the code to accommodate the requirements.