refactor(compass-web): add enableCompassWebSettings feature flag COMPASS-10867#8248
refactor(compass-web): add enableCompassWebSettings feature flag COMPASS-10867#8248dkwncho wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a new enableCompassWebSettings feature flag intended to control exposure of the Settings experience in Compass Web, wiring up the settings plugin and using preferences to conditionally surface settings UI.
Changes:
- Added
enableCompassWebSettingsto the shared feature flags/preferences model. - Added
@mongodb-js/compass-settingsto Compass Web and mountedCompassSettingsPlugin. - Updated the sidebar header to conditionally show the Settings action based on the new preference.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/compass-web/src/entrypoint.tsx | Mounts the settings plugin within the Compass Web app tree. |
| packages/compass-web/package.json | Adds the Compass Settings package dependency for the web build. |
| packages/compass-sidebar/src/components/multiple-connections/header/sidebar-header.tsx | Switches Settings action visibility to be controlled by the new preference flag. |
| packages/compass-preferences-model/src/feature-flags.ts | Defines the new enableCompassWebSettings feature flag in preferences. |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…ngs flag Co-authored-by: Copilot Autofix powered by AI <[email protected]>
| {preferences.getPreferences() | ||
| .enableCompassWebSettings && ( |
There was a problem hiding this comment.
This is not reactive so won't actually re-render the component if the value changes: this might not matter too much here, but the worst bugs are usually caused by small compounding issues like that 🙂 While it's a bit more work, you should wrap this in a component that can access the preferences value via a React hook instead of reading directly from the service (CompassComponentsWeb is an example of how to do this)
New Feature Flag Definition DetectedThe following new feature flag was added to
|
…sWebSettings preference changes
…' of https://github.com/mongodb-js/compass into COMPASS-10867-add-enableCompassWebSettings-feature-flag
Description
Checklist
Motivation and Context
Open Questions
Dependents
Types of changes