-
Notifications
You must be signed in to change notification settings - Fork 238
chore(my-queries): make feature flag ready for saving user data COMPASS-9657 #7264
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
Changes from 1 commit
6b01986
893e6f7
505d90d
d13312d
6ea3db4
208a602
f484042
56e1223
c56a395
97ffb20
923e0d5
95fe0d7
eed1621
8f742a0
d117d7c
72d7115
6e9dfc8
0c8fea4
775d7e6
7d765a2
b8efa1c
de5fbff
2d86489
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,6 +137,9 @@ const App = () => { | |
isAtlas && !!enableGenAIFeaturesAtlasOrg, | ||
optInGenAIFeatures: isAtlas && !!optInGenAIFeatures, | ||
enableDataModeling: true, | ||
cloudFeatureRolloutAccess: { | ||
MY_QUERIES_DATA_EXPLORER: false, // Disabled by default | ||
}, | ||
|
||
}} | ||
onTrack={sandboxTelemetry.track} | ||
onDebug={sandboxLogger.debug} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,6 +62,7 @@ import { | |
CompassAssistantDrawer, | ||
CompassAssistantProvider, | ||
} from '@mongodb-js/compass-assistant'; | ||
import { useMyQueriesFeature } from './hooks/use-my-queries-feature'; | ||
|
||
export type TrackFunction = ( | ||
event: string, | ||
|
@@ -280,6 +281,8 @@ const CompassWeb = ({ | |
onDebug, | ||
}); | ||
const preferencesAccess = useCompassWebPreferences(initialPreferences); | ||
const isMyQueriesEnabled = useMyQueriesFeature(); | ||
|
||
// TODO: This will be used to conditionally provide My Queries storage providers in the implementation PR | ||
const initialWorkspaceRef = useRef(initialWorkspace); | ||
const initialWorkspaceTabsRef = useRef( | ||
initialWorkspaceRef.current ? [initialWorkspaceRef.current] : [] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { usePreference } from 'compass-preferences-model/provider'; | ||
|
||
/** | ||
* Hook to check if the My Queries Data Explorer feature is enabled. | ||
* This controls access to: | ||
* - Saved queries and aggregations | ||
* - Recent queries autocomplete | ||
* - Favorite queries/aggregations | ||
*/ | ||
export function useMyQueriesFeature(): boolean { | ||
const cloudFeatureRolloutAccess = usePreference('cloudFeatureRolloutAccess'); | ||
return cloudFeatureRolloutAccess?.MY_QUERIES_DATA_EXPLORER ?? false; | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.