Skip to content

Commit

Permalink
Add back multiple missing VRTs and remove Legacy prefix to non-refact…
Browse files Browse the repository at this point in the history
…ored stories.
  • Loading branch information
benbowler committed Dec 17, 2024
1 parent 06b7a72 commit 26873f9
Show file tree
Hide file tree
Showing 89 changed files with 94 additions and 29 deletions.
3 changes: 1 addition & 2 deletions assets/js/components/Link.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,9 +314,8 @@ export function VRTStory() {
</div>
);
}

VRTStory.storyName = 'All Links VRT';
VRTStory.scenario = {
label: 'Components/Links',
hoverSelector: '.googlesitekit-cta-link--hover',
postInteractionWait: 1000,
onReadyScript: 'mouse.js',
Expand Down
4 changes: 4 additions & 0 deletions assets/js/components/PageHeader.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ function Template( args ) {
}

export const Connected = Template.bind( {} );
Connected.storyName = 'Connected';
Connected.scenario = {};
Connected.args = {
title: 'Module Page Title',
status: 'connected',
statusText: 'Analytics is connected',
};

export const NotConnectedWithIcon = Template.bind( {} );
NotConnectedWithIcon.storyName = 'Not Connected with Icon';
NotConnectedWithIcon.scenario = {};
NotConnectedWithIcon.args = {
title: 'Module Page Title with Icon',
icon: (
Expand Down
2 changes: 2 additions & 0 deletions assets/js/components/VisuallyHidden.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ function Template() {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {};

export default {
title: 'Components/VisuallyHidden',
Expand Down
4 changes: 4 additions & 0 deletions assets/js/components/layout/Layout.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function Template( { ...args } ) {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {};
Default.args = {
header: true,
footer: true,
Expand All @@ -51,6 +53,8 @@ Default.args = {
};

export const WithHeaderAndFooter = Template.bind( {} );
WithHeaderAndFooter.storyName = 'With Header and Footer';
WithHeaderAndFooter.scenario = {};
WithHeaderAndFooter.args = {
header: true,
footer: true,
Expand Down
2 changes: 2 additions & 0 deletions assets/js/components/legacy-setup/SetupUsingGCP.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function Template() {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {};

export default {
title: 'Setup/Legacy/SetupUsingGCP',
Expand Down
1 change: 1 addition & 0 deletions assets/js/components/settings/SettingsApp.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function Template() {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.scenario = {
delay: 3000,
};
Expand Down
3 changes: 1 addition & 2 deletions assets/js/googlesitekit/components-gm2/Button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ export function VRTStory() {
</div>
);
}

VRTStory.storyName = 'All Buttons VRT';
VRTStory.scenario = {
label: 'Global/Buttons',
hoverSelector: '.googlesitekit-button--icon',
postInteractionWait: 3000,
onReadyScript: 'mouse.js',
Expand Down
25 changes: 22 additions & 3 deletions assets/js/googlesitekit/components-gm2/ProgressBar.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,41 @@ function Template( args ) {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.args = {};

export const Small = Template.bind( {} );
Small.storyName = 'Small';
Small.args = {
small: true,
};

export const SmallCompress = Template.bind( {} );
SmallCompress.storyName = 'Small Compress';
SmallCompress.args = {
small: true,
compress: true,
};

export function VRTStory() {
return (
<div>
<div style={ { marginBottom: '50px' } }>
<h2>Default</h2>
<Default { ...Default.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<h2>Small</h2>
<Small { ...Small.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<h2>Small Compress</h2>
<SmallCompress { ...SmallCompress.args } />
</div>
</div>
);
}

VRTStory.storyName = 'All Progress Bars VRT';
VRTStory.scenario = {};

export default {
title: 'Components/ProgressBar',
};
26 changes: 22 additions & 4 deletions assets/js/googlesitekit/components-gm2/Radio.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,39 @@ function Template( args ) {
}

export const Default = Template.bind( {} );
Default.storyName = 'Default';
Default.args = {};
Default.args = { description: 'Default' };

export const Checked = Template.bind( {} );
Checked.storyName = 'Checked';
Checked.args = {
checked: true,
description: 'Checked',
};

export const Disabled = Template.bind( {} );
Disabled.storyName = 'Disabled';
Disabled.args = {
disabled: true,
description: 'Disabled',
};

export function VRTStory() {
return (
<div>
<div style={ { marginBottom: '50px' } }>
<Default { ...Default.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<Checked { ...Checked.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<Disabled { ...Disabled.args } />
</div>
</div>
);
}

VRTStory.storyName = 'All Radios VRT';
VRTStory.scenario = {};

export default {
title: 'Components/Radio',
};
5 changes: 2 additions & 3 deletions assets/js/googlesitekit/components-gm2/Select.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ export function VRTStory() {
</div>
);
}

VRTStory.story = {
label: 'Components/Select',
VRTStory.storyName = 'All Selects VRT';
VRTStory.scenario = {
delay: 3000, // Sometimes the click doesn't work, waiting for everything to load.
clickSelector: '.googlesitekit-story-select-click',
postInteractionWait: 3000, // Wait for overlay and selects to animate.
Expand Down
18 changes: 18 additions & 0 deletions assets/js/googlesitekit/components-gm2/Switch.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ HiddenLabel.args = {
checked: true,
};

export function VRTStory() {
return (
<div>
<div style={ { marginBottom: '50px' } }>
<Unswitched { ...Unswitched.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<Switched { ...Switched.args } />
</div>
<div style={ { marginBottom: '50px' } }>
<HiddenLabel { ...HiddenLabel.args } />
</div>
</div>
);
}
VRTStory.storyName = 'All Switches VRT';
VRTStory.scenario = {};

export default {
title: 'Components/Switch',
component: Switch,
Expand Down
4 changes: 2 additions & 2 deletions stories/module-adsense-components.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const getCurrencyFromReportOptions = {
generateReportBasedWidgetStories( {
moduleSlugs: [ 'adsense', 'analytics-4' ],
datastore: MODULES_ANALYTICS_4,
group: 'Legacy/AdSense Module/Components/Dashboard/Top Earning Pages Widget',
group: 'AdSense Module/Components/Dashboard/Top Earning Pages Widget',
referenceDate: '2021-09-12',
...generateAnalyticsData( topEarningPagesArgs ),
options: topEarningPagesArgs,
Expand Down Expand Up @@ -100,7 +100,7 @@ generateReportBasedWidgetStories( {
delay: 3000, // Allow time for the text resizing code to finish to prevent inconsistent rendering of chart during VRTs.
moduleSlugs: [ 'adsense' ],
datastore: MODULES_ADSENSE,
group: 'Legacy/AdSense Module/Components/Module/Overview Widget',
group: 'AdSense Module/Components/Module/Overview Widget',
referenceDate: '2021-11-25',
zeroing,
...generateAdSenseData( [
Expand Down
2 changes: 1 addition & 1 deletion stories/module-adsense-settings.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const withRegistry = ( Story ) => {
return <Story registry={ registry } />;
};

storiesOf( 'Legacy/AdSense Module/Settings', module )
storiesOf( 'AdSense Module/Settings', module )
.add(
'View, closed',
( args, { registry } ) => {
Expand Down
2 changes: 1 addition & 1 deletion stories/module-adsense-setup.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const withRegistry = ( Story ) => {
return <Story registry={ registry } />;
};

storiesOf( 'Legacy/AdSense Module/Setup', module )
storiesOf( 'AdSense Module/Setup', module )
.add(
'Loading',
( args, { registry } ) => {
Expand Down
2 changes: 1 addition & 1 deletion stories/module-adsense.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function SetupWrap( { children } ) {
);
}

storiesOf( 'Legacy/AdSense Module', module )
storiesOf( 'AdSense Module', module )
.add( 'Account Select, none selected', () => {
const accounts = fixtures.accountsMultiple;
const setupRegistry = ( { dispatch } ) => {
Expand Down
2 changes: 1 addition & 1 deletion stories/module-pagespeed-insights-settings.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const withRegistry = ( Story ) => {
return <Story registry={ registry } />;
};

storiesOf( 'Legacy/PageSpeed Insights Module/Settings', module )
storiesOf( 'PageSpeed Insights Module/Settings', module )
.add(
'View, closed',
( args, { registry } ) => {
Expand Down
6 changes: 3 additions & 3 deletions stories/module-search-console-components.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function generateSearchConsoleWidgetStories( args ) {
}

generateSearchConsoleWidgetStories( {
group: 'Legacy/Search Console Module/Components/Dashboard/Popular Keywords Widget',
group: 'Search Console Module/Components/Dashboard/Popular Keywords Widget',
referenceDate: '2020-08-26',
...generateSearchConsoleData( [
{
Expand All @@ -88,7 +88,7 @@ generateSearchConsoleWidgetStories( {
} );

generateSearchConsoleWidgetStories( {
group: 'Legacy/Search Console Module/Components/Entity Dashboard/Popular Keywords Widget',
group: 'Search Console Module/Components/Entity Dashboard/Popular Keywords Widget',
referenceDate: '2020-08-26',
...generateSearchConsoleData( [
{
Expand All @@ -110,7 +110,7 @@ generateSearchConsoleWidgetStories( {
} );

generateSearchConsoleWidgetStories( {
group: 'Legacy/Search Console Module/Components/View Only Dashboard/Popular Keywords Widget',
group: 'Search Console Module/Components/View Only Dashboard/Popular Keywords Widget',
referenceDate: '2020-08-26',
...generateSearchConsoleData( [
{
Expand Down
2 changes: 1 addition & 1 deletion stories/module-search-console-settings.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const storyOptions = {
],
};

storiesOf( 'Legacy/Search Console Module/Settings', module )
storiesOf( 'Search Console Module/Settings', module )
.add(
'View, closed',
( args, { registry } ) => {
Expand Down
2 changes: 1 addition & 1 deletion stories/modules-tagmanager-settings.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const withRegistrySecondaryAMP = ( Story ) => {
return <Story registry={ registry } />;
};

storiesOf( 'Legacy/Tag Manager Module/Settings', module )
storiesOf( 'Tag Manager Module/Settings', module )
.add(
'View, closed',
( args, { registry } ) => {
Expand Down
2 changes: 1 addition & 1 deletion stories/modules-tagmanager.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function SetupWrap( { children } ) {
);
}

storiesOf( 'Legacy/Tag Manager Module', module )
storiesOf( 'Tag Manager Module', module )
.add( 'AccountSelect', () => {
const setupRegistry = ( registry ) => {
registry
Expand Down
2 changes: 1 addition & 1 deletion stories/tokens.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export const DefaultToken = Template.bind( {} );
DefaultToken.scenario = {};

export default {
title: 'Legacy/Global/Tokens',
title: 'Global/Tokens',
decorators: [
( Story ) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion stories/type-scale.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const DefaultTypeScale = Template.bind( {} );
DefaultTypeScale.scenario = {};

export default {
title: 'Legacy/Global/TypeScale',
title: 'Global/TypeScale',
decorators: [
( Story ) => {
return (
Expand Down
2 changes: 1 addition & 1 deletion stories/widgets.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const withRegistry = ( Story ) => {
);
};

storiesOf( 'Legacy/Global/Widgets', module )
storiesOf( 'Global/Widgets', module )
.add( 'Widgets in boxes layout', () => (
<BoxesWidgets>
{ [ 1, 2, 3, 4 ].map( ( count ) => (
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.

0 comments on commit 26873f9

Please sign in to comment.