mirror of
https://github.com/strapi/strapi.git
synced 2025-11-17 02:28:30 +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 }) => ({
|
module.exports = ({ env }) => ({
|
||||||
future: {},
|
future: {
|
||||||
|
unstableGuidedTour: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -97,9 +97,12 @@ const UnstableGuidedTourTooltip = ({
|
|||||||
requiredActions?.every((action) => {
|
requiredActions?.every((action) => {
|
||||||
return guidedTourMeta?.data?.completedActions.includes(action);
|
return guidedTourMeta?.data?.completedActions.includes(action);
|
||||||
}) ?? true;
|
}) ?? true;
|
||||||
|
const hasFutureFlag = window.strapi.future.isEnabled('unstableGuidedTour');
|
||||||
const isEnabled =
|
const isEnabled =
|
||||||
guidedTourMeta?.data?.isFirstSuperAdminUser && !state.tours[tourName].isCompleted;
|
guidedTourMeta?.data?.isFirstSuperAdminUser &&
|
||||||
|
!state.tours[tourName].isCompleted &&
|
||||||
|
hasFutureFlag;
|
||||||
|
|
||||||
const isPopoverOpen = isEnabled && isCurrentStep && hasCompletedRequiredActions;
|
const isPopoverOpen = isEnabled && isCurrentStep && hasCompletedRequiredActions;
|
||||||
|
|
||||||
// Lock the scroll
|
// Lock the scroll
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
export interface FeaturesConfig {
|
export interface FeaturesConfig {
|
||||||
future?: object;
|
future?: {
|
||||||
|
unstableGuidedTour?: boolean;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FeaturesService {
|
export interface FeaturesService {
|
||||||
@ -9,5 +11,6 @@ export interface FeaturesService {
|
|||||||
config: FeaturesConfig | undefined;
|
config: FeaturesConfig | undefined;
|
||||||
future: {
|
future: {
|
||||||
isEnabled: (futureFlagName: string) => boolean;
|
isEnabled: (futureFlagName: string) => boolean;
|
||||||
|
unstableGuidedTour?: boolean;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user