Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/core/src/core-server/presets/common-preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ export const features: PresetProperty<'features'> = async (existing) => ({
legacyDecoratorFileOrder: false,
measure: true,
outline: true,
menuOnboardingChecklist: true,
sidebarOnboardingChecklist: true,
viewport: true,
});
Expand Down
7 changes: 5 additions & 2 deletions code/core/src/manager/components/sidebar/Sidebar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import type { IndexHash } from 'storybook/manager-api';
import { ManagerContext } from 'storybook/manager-api';
import { expect, fn, userEvent, waitFor, within } from 'storybook/test';

import { internal_fullStatusStore as internal_ctaStatusStore } from 'storybook/manager-api';
import { initialState } from '../../../shared/checklist-store/checklistData.state.ts';
import {
internal_fullStatusStore,
internal_universalChecklistStore,
} from '../../manager-stores.mock.ts';
import { internal_fullStatusStore as internal_ctaStatusStore } from 'storybook/manager-api';
import { LayoutProvider } from '../layout/LayoutProvider.tsx';
import { standardData as standardHeaderData } from './Heading.stories.tsx';
import { DEFAULT_REF_ID, Sidebar } from './Sidebar.tsx';
Expand Down Expand Up @@ -228,7 +228,10 @@ export const SimpleNoChecklist: Story = {
},
beforeEach: () => {
const features = global.FEATURES;
global.FEATURES = { ...features, sidebarOnboardingChecklist: false };
global.FEATURES = {
...features,
sidebarOnboardingChecklist: false,
};
return () => {
global.FEATURES = features;
};
Expand Down
5 changes: 4 additions & 1 deletion code/core/src/manager/container/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@ export const useMenu = ({
[
[
about,
...(global.CONFIG_TYPE === 'DEVELOPMENT' ? [guide] : []),
...(global.CONFIG_TYPE === 'DEVELOPMENT' &&
global.FEATURES?.menuOnboardingChecklist !== false
? [guide]
: []),
...(enableShortcuts ? [shortcuts] : []),
],
[sidebarToggle, toolbarToogle, addonsToggle, up, down, prev, next, collapse],
Expand Down
7 changes: 5 additions & 2 deletions code/core/src/manager/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React, { useMemo } from 'react';

import { Button, ScrollArea, TabsView } from 'storybook/internal/components';
import { Location, Route } from 'storybook/internal/router';
import { Addon_TypesEnum } from 'storybook/internal/types';
import type { Addon_PageType } from 'storybook/internal/types';
import { Addon_TypesEnum } from 'storybook/internal/types';

import { global } from '@storybook/global';
import { CloseIcon } from '@storybook/icons';
Expand Down Expand Up @@ -81,7 +81,10 @@ const Pages: FC<{
},
];

if (global.CONFIG_TYPE === 'DEVELOPMENT') {
if (
global.CONFIG_TYPE === 'DEVELOPMENT' &&
global.FEATURES?.menuOnboardingChecklist !== false
) {
tabsToInclude.push({
id: 'guide',
title: 'Guide',
Expand Down
7 changes: 7 additions & 0 deletions code/core/src/types/modules/core-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,13 @@ export interface StorybookConfigRaw {
*/
sidebarOnboardingChecklist?: boolean;

/**
* Enable the onboarding guide page in the menu
*
* @default true
*/
menuOnboardingChecklist?: boolean;

/**
* @temporary This feature flag is a migration assistant, and is scheduled to be removed.
*
Expand Down
11 changes: 11 additions & 0 deletions docs/api/main-config/main-config-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Type:
measure?: boolean;
outline?: boolean;
sidebarOnboardingChecklist?: boolean;
menuOnboardingChecklist?: boolean;
toolbars?: boolean;
viewport?: boolean;
}
Expand All @@ -53,6 +54,7 @@ Type:
measure?: boolean;
outline?: boolean;
sidebarOnboardingChecklist?: boolean;
menuOnboardingChecklist?: boolean;
toolbars?: boolean;
viewport?: boolean;
}
Expand All @@ -77,6 +79,7 @@ Type:
measure?: boolean;
outline?: boolean;
sidebarOnboardingChecklist?: boolean;
menuOnboardingChecklist?: boolean;
toolbars?: boolean;
viewport?: boolean;
}
Expand Down Expand Up @@ -234,6 +237,14 @@ Default: `true`

Enable the [Measure](../../essentials/measure-and-outline.mdx#measure) feature.

## `menuOnboardingChecklist`

Type: `boolean`

Default: `true`

Enable a link to the onboarding guide in the menu.
Comment thread
Sidnioulz marked this conversation as resolved.

## `outline`

Type: `boolean`
Expand Down
Loading