Skip to content

Remove label prop from scenario objects on stories. Update VR images. #10634

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

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions assets/js/components/ErrorHandler/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Global/ErrorHandler',
};
Default.scenario = {};

export default {
title: 'Components/ErrorHandler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Global/GoogleChartErrorHandler',
};
Default.scenario = {};

export default {
title: 'Components/GoogleChartErrorHandler',
Expand Down
2 changes: 0 additions & 2 deletions assets/js/components/Header.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ PluginHeader.args = {
},
};
PluginHeader.scenario = {
label: 'Global/Plugin Header',
hierarchyRootSeparator: '|',
hierarchySeparator: {},
delay: 3000,
Expand All @@ -111,7 +110,6 @@ HeaderWithDateSelector.args = {
},
};
HeaderWithDateSelector.scenario = {
label: 'Global/Plugin Header with Date Selector',
hierarchyRootSeparator: '|',
hierarchySeparator: {},
delay: 3000,
Expand Down
1 change: 0 additions & 1 deletion assets/js/components/JoyrideTooltip.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ DefaultTooltip.args = {
target: '.target',
};
DefaultTooltip.scenario = {
label: 'Global/JoyrideTooltip/DefaultTooltip',
delay: 1000,
};

Expand Down
4 changes: 1 addition & 3 deletions assets/js/components/KeyMetrics/AddMetricCTATile.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'AddMetricCTATile';
Default.scenario = {
label: 'KeyMetrics/AddMetricCTATile',
};
Default.scenario = {};

export default {
title: 'Key Metrics/AddMetricCTATile',
Expand Down
4 changes: 1 addition & 3 deletions assets/js/components/KeyMetrics/ChangeMetricsLink.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'ChangeMetricsLink';
Default.scenario = {
label: 'KeyMetrics/ChangeMetricsLink',
};
Default.scenario = {};

export default {
title: 'Key Metrics/ChangeMetricsLink',
Expand Down
15 changes: 3 additions & 12 deletions assets/js/components/KeyMetrics/ChipTabGroup/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ Default.args = {
registry.dispatch( CORE_USER ).receiveIsUserInputCompleted( false );
},
};
Default.scenario = {
// eslint-disable-next-line sitekit/no-storybook-scenario-label
label: 'Components/KeyMetrics/ChipTabGroup/default',
};
Default.scenario = {};

export const WithError = Template.bind( {} );
WithError.storyName = 'With Error';
Expand Down Expand Up @@ -148,10 +145,7 @@ WithError.args = {
} );
},
};
WithError.scenario = {
// eslint-disable-next-line sitekit/no-storybook-scenario-label
label: 'Components/KeyMetrics/ChipTabGroup/WithError',
};
WithError.scenario = {};

export const WithSuggestedGroup = Template.bind( {} );
WithSuggestedGroup.storyName = 'With Suggested Group';
Expand All @@ -166,10 +160,7 @@ WithSuggestedGroup.args = {
} );
},
};
WithSuggestedGroup.scenario = {
// eslint-disable-next-line sitekit/no-storybook-scenario-label
label: 'Components/KeyMetrics/ChipTabGroup/WithSuggestedGroup',
};
WithSuggestedGroup.scenario = {};

export default {
title: 'Key Metrics/ChipTabGroup',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ function Template( args ) {

export const Default = Template.bind( {} );
Default.storyName = 'ConfirmSitePurposeChangeModal';
Default.scenario = {
// eslint-disable-next-line sitekit/no-storybook-scenario-label
label: 'KeyMetrics/ConfirmSitePurposeChangeModal',
};
Default.scenario = {};

export default {
title: 'Key Metrics/Key Metrics Confirm Site Purpose Change Modal',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.args = {
features: [ 'conversionReporting' ],
};
Default.scenario = {};

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'SetupCTAWidget';
Default.scenario = {
label: 'KeyMetrics/SetupCTAWidget',
delay: 250,
};
Default.scenario = {};

export default {
title: 'Key Metrics',
Expand Down
24 changes: 5 additions & 19 deletions assets/js/components/KeyMetrics/MetricTileNumeric.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ Positive.args = {
currentValue: 100,
previousValue: 91,
};
Positive.scenario = {
label: 'KeyMetrics/MetricTileNumeric/Positive',
delay: 250,
};
Positive.scenario = {};

export const Negative = Template.bind( {} );
Negative.storyName = 'Negative';
Expand All @@ -52,10 +49,7 @@ Negative.args = {
currentValue: 91,
previousValue: 103,
};
Negative.scenario = {
label: 'KeyMetrics/MetricTileNumeric/Negative',
delay: 250,
};
Negative.scenario = {};

export const ZeroChange = Template.bind( {} );
ZeroChange.storyName = 'Zero Change';
Expand All @@ -66,10 +60,7 @@ ZeroChange.args = {
currentValue: 100,
previousValue: 100,
};
ZeroChange.scenario = {
label: 'KeyMetrics/MetricTileNumeric/ZeroChange',
delay: 250,
};
ZeroChange.scenario = {};

export const ZeroData = Template.bind( {} );
ZeroData.storyName = 'Zero Data';
Expand All @@ -82,10 +73,7 @@ ZeroData.args = {
};
// Since the "Zero" state is similar for all "numeric" KMW tiles, this should be
// the sole scenario and should not be added to any other "numeric" type KMW components.
ZeroData.scenario = {
label: 'KeyMetrics/MetricTileNumeric/ZeroData',
delay: 250,
};
ZeroData.scenario = {};

export const Loading = Template.bind( {} );
Loading.storyName = 'Loading';
Expand All @@ -99,9 +87,7 @@ Loading.args = {
};
// Since the "Loading" state is the same for all KMW tiles, this is the sole scenario
// and should not be added to any other generic `MetricTile___` or KMW component.
Loading.scenario = {
label: 'KeyMetrics/MetricTileNumeric/Loading',
};
Loading.scenario = {};
Loading.decorators = [
( Story ) => {
// Ensure the animation is paused for VRT tests to correctly capture the loading state.
Expand Down
15 changes: 3 additions & 12 deletions assets/js/components/KeyMetrics/MetricTileTable.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ Ready.args = {
],
columns,
};
Ready.scenario = {
label: 'KeyMetrics/MetricTileTable/Ready',
delay: 250,
};
Ready.scenario = {};

export const ReadyWithInfoTooltip = Template.bind( {} );
ReadyWithInfoTooltip.storyName = 'Ready With Info Tooltip';
Expand All @@ -89,10 +86,7 @@ ReadyWithInfoTooltip.args = {
columns,
infoTooltip: 'This is a tooltip',
};
ReadyWithInfoTooltip.scenario = {
label: 'KeyMetrics/MetricTileTable/ReadyWithInfoTooltip',
delay: 250,
};
ReadyWithInfoTooltip.scenario = {};

export const ZeroData = Template.bind( {} );
ZeroData.storyName = 'Zero Data';
Expand All @@ -106,10 +100,7 @@ ZeroData.args = {
};
// Since the "Zero" state is similar for all "tabular" KMW tiles, this should be
// the sole scenario and should not be added to any other "table" type KMW components.
ZeroData.scenario = {
label: 'KeyMetrics/MetricTileTable/ZeroData',
delay: 250,
};
ZeroData.scenario = {};

export const Loading = Template.bind( {} );
Loading.storyName = 'Loading';
Expand Down
20 changes: 4 additions & 16 deletions assets/js/components/KeyMetrics/MetricTileText.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ Positive.args = {
currentValue: 100,
previousValue: 91,
};
Positive.scenario = {
label: 'KeyMetrics/MetricTileText/Positive',
delay: 250,
};
Positive.scenario = {};

export const Negative = Template.bind( {} );
Negative.storyName = 'Negative';
Expand All @@ -52,10 +49,7 @@ Negative.args = {
currentValue: 91,
previousValue: 103,
};
Negative.scenario = {
label: 'KeyMetrics/MetricTileText/Negative',
delay: 250,
};
Negative.scenario = {};

export const ZeroChange = Template.bind( {} );
ZeroChange.storyName = 'Zero Change';
Expand All @@ -66,10 +60,7 @@ ZeroChange.args = {
currentValue: 100,
previousValue: 100,
};
ZeroChange.scenario = {
label: 'KeyMetrics/MetricTileText/ZeroChange',
delay: 250,
};
ZeroChange.scenario = {};

export const ZeroData = Template.bind( {} );
ZeroData.storyName = 'Zero Data';
Expand All @@ -82,10 +73,7 @@ ZeroData.args = {
};
// Since the "Zero" state is similar for all "textual" KMW tiles, this should be
// the sole scenario and should not be added to any other "text" type KMW components.
ZeroData.scenario = {
label: 'KeyMetrics/MetricTileText/ZeroData',
delay: 250,
};
ZeroData.scenario = {};

export const Loading = Template.bind( {} );
Loading.storyName = 'Loading';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ function Template( { viewContext } ) {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'KeyMetrics/MetricsSelectionPanel',
};
Default.scenario = {};

export const ViewOnly = Template.bind( {} );
ViewOnly.storyName = 'View-only user';
Expand Down
1 change: 0 additions & 1 deletion assets/js/components/Link.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export function VRTStory() {
}
VRTStory.storyName = 'All Links VRT';
VRTStory.scenario = {
label: 'Global/Links',
hoverSelector: '.googlesitekit-cta-link--hover',
postInteractionWait: 1000,
onReadyScript: 'mouse.js',
Expand Down
4 changes: 1 addition & 3 deletions assets/js/components/MediaErrorHandler/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ function NoErrorsTemplate() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Global/MediaErrorHandler',
};
Default.scenario = {};

export const WithCustomErrorMessage = Template.bind( {} );
WithCustomErrorMessage.storyName = 'With Custom Error Message';
Expand Down
20 changes: 5 additions & 15 deletions assets/js/components/ModalDialog.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function Template( args ) {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Global/ModalDialog',
};
Default.scenario = {};

export const Danger = Template.bind( {} );
Danger.storyName = 'Danger';
Expand All @@ -46,9 +44,7 @@ Danger.args = {
provides: [ 'Audience overview', 'Top pages', 'Top acquisition channels' ],
danger: true,
};
Danger.scenario = {
label: 'Global/ModalDialog/Danger',
};
Danger.scenario = {};

export const DependentModules = Template.bind( {} );
DependentModules.storyName = 'Danger With Dependent Modules';
Expand All @@ -58,27 +54,21 @@ DependentModules.args = {
provides: [ 'Audience overview', 'Top pages', 'Top acquisition channels' ],
danger: true,
};
DependentModules.scenario = {
label: 'Global/ModalDialog/DangerWithDependentModules',
};
DependentModules.scenario = {};

export const SmallModal = Template.bind( {} );
SmallModal.storyName = 'Small';
SmallModal.args = {
small: true,
};
SmallModal.scenario = {
label: 'Global/ModalDialog/Small',
};
SmallModal.scenario = {};

export const MediumModal = Template.bind( {} );
MediumModal.storyName = 'Medium';
MediumModal.args = {
medium: true,
};
MediumModal.scenario = {
label: 'Global/ModalDialog/Medium',
};
MediumModal.scenario = {};

export default {
title: 'Global/Modal Dialog',
Expand Down
4 changes: 1 addition & 3 deletions assets/js/components/NewBadge.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ NewBadgeForceOpen.args = {
learnMoreLink: 'https://www.google.com',
forceOpen: true,
};
NewBadgeForceOpen.scenario = {
label: 'Global/NewBadge',
};
NewBadgeForceOpen.scenario = {};

export default {
title: 'Components/NewBadge',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Components/AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification',
};
Default.scenario = {};

export default {
title: 'Components/AnalyticsAndAdSenseAccountsDetectedAsLinkedOverlayNotification',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function Template() {

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
label: 'Components/LinkAnalyticsAndAdSenseAccountsOverlayNotification',
};
Default.scenario = {};

export default {
title: 'Components/LinkAnalyticsAndAdSenseAccountsOverlayNotification',
Expand Down
Loading
Loading