mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 03:17:11 +00:00
future: add the guided tour future flag (#23832)
This commit is contained in:
parent
bdbc9ea979
commit
07ae8e84c8
@ -1,3 +1,5 @@
|
||||
module.exports = ({ env }) => ({
|
||||
future: {},
|
||||
future: {
|
||||
unstableGuidedTour: false,
|
||||
},
|
||||
});
|
||||
|
||||
@ -97,9 +97,12 @@ const UnstableGuidedTourTooltip = ({
|
||||
requiredActions?.every((action) => {
|
||||
return guidedTourMeta?.data?.completedActions.includes(action);
|
||||
}) ?? true;
|
||||
|
||||
const hasFutureFlag = window.strapi.future.isEnabled('unstableGuidedTour');
|
||||
const isEnabled =
|
||||
guidedTourMeta?.data?.isFirstSuperAdminUser && !state.tours[tourName].isCompleted;
|
||||
guidedTourMeta?.data?.isFirstSuperAdminUser &&
|
||||
!state.tours[tourName].isCompleted &&
|
||||
hasFutureFlag;
|
||||
|
||||
const isPopoverOpen = isEnabled && isCurrentStep && hasCompletedRequiredActions;
|
||||
|
||||
// Lock the scroll
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
export interface FeaturesConfig {
|
||||
future?: object;
|
||||
future?: {
|
||||
unstableGuidedTour?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface FeaturesService {
|
||||
@ -9,5 +11,6 @@ export interface FeaturesService {
|
||||
config: FeaturesConfig | undefined;
|
||||
future: {
|
||||
isEnabled: (futureFlagName: string) => boolean;
|
||||
unstableGuidedTour?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user