Skip to content

Commit 8c023da

Browse files
authored
Merge pull request #11761 from google/infrastructure/11534-unstable-vrts
Fix multiple unstable VRTs - including Google Charts
2 parents d1d4b02 + 86d2a80 commit 8c023da

9 files changed

+27
-20
lines changed

assets/js/components/SelectionPanel/index.stories.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ function Template( {
105105
export const Default = Template.bind( {} );
106106
Default.storyName = 'Default';
107107
Default.scenario = {
108-
delay: 1500,
108+
readySelector:
109+
'.googlesitekit-selection-panel-item:first-of-type .mdc-checkbox__native-control:focus',
109110
};
110111

111112
export const WithSavedItems = Template.bind( {} );

assets/js/components/wp-dashboard/WPDashboardWidgets.stories.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ ReadyWithActivateAnalyticsCTA.args = {
116116
},
117117
};
118118

119-
ReadyWithActivateAnalyticsCTA.scenario = {
120-
// delay: 6000, // This extra delay is required to fix unstable VRTs. TODO: remove if not required.
121-
};
119+
ReadyWithActivateAnalyticsCTA.scenario = {};
122120

123121
export const ReadyWithCompleteAnalyticsActivationCTA = Template.bind( {} );
124122
ReadyWithCompleteAnalyticsActivationCTA.storyName =

assets/js/modules/analytics-4/components/dashboard/DashboardAllTrafficWidgetGA4/indexEntityDashboard.stories.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ const widgetComponentProps = getWidgetComponentProps(
4949
);
5050

5151
function Template() {
52-
return <DashboardAllTrafficWidgetGA4 { ...widgetComponentProps } />;
52+
// Min height added to fix rare VRT instability where the mobile VRT for Zero Data was not capturing the full height.
53+
return (
54+
<div style={ { minHeight: '980px' } }>
55+
<DashboardAllTrafficWidgetGA4 { ...widgetComponentProps } />
56+
</div>
57+
);
5358
}
5459

5560
const baseAllTrafficOptions = {
@@ -167,7 +172,7 @@ EntityDashboardLoaded.args = {
167172
};
168173
EntityDashboardLoaded.scenario = {
169174
readySelector: '[id^="googlesitekit-chart-"] svg',
170-
delay: 200,
175+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
171176
};
172177

173178
export const EntityDashboardLoading = Template.bind( {} );
@@ -225,7 +230,7 @@ EntityDashboardDataUnavailable.args = {
225230
};
226231
EntityDashboardDataUnavailable.scenario = {
227232
readySelector: '[id^="googlesitekit-chart-"] svg',
228-
delay: 200,
233+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
229234
};
230235

231236
export const EntityDashboardZeroData = Template.bind( {} );
@@ -269,7 +274,7 @@ EntityDashboardZeroData.args = {
269274
};
270275
EntityDashboardZeroData.scenario = {
271276
readySelector: '[id^="googlesitekit-chart-"] svg',
272-
delay: 200,
277+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
273278
};
274279

275280
export const EntityDashboardError = Template.bind( {} );
@@ -316,7 +321,7 @@ EntityDashboardOneRowOfData.args = {
316321
};
317322
EntityDashboardOneRowOfData.scenario = {
318323
readySelector: '[id^="googlesitekit-chart-"] svg',
319-
delay: 200,
324+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
320325
};
321326

322327
export const NoDataInComparisonDateRange = Template.bind( {} );
@@ -332,7 +337,7 @@ NoDataInComparisonDateRange.args = {
332337
};
333338
NoDataInComparisonDateRange.scenario = {
334339
readySelector: '[id^="googlesitekit-chart-"] svg',
335-
delay: 200,
340+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
336341
};
337342

338343
export default {

assets/js/modules/analytics-4/components/dashboard/DashboardAllTrafficWidgetGA4/indexMainDashboard.stories.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ MainDashboardLoaded.args = {
173173
};
174174
MainDashboardLoaded.scenario = {
175175
readySelector: '[id^="googlesitekit-chart-"] svg',
176-
delay: 200,
176+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
177177
};
178178

179179
export const MainDashboardLoading = Template.bind( {} );
@@ -235,7 +235,7 @@ MainDashboardDataUnavailable.args = {
235235
};
236236
MainDashboardDataUnavailable.scenario = {
237237
readySelector: '[id^="googlesitekit-chart-"] svg',
238-
delay: 200,
238+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
239239
};
240240

241241
export const MainDashboardZeroData = Template.bind( {} );
@@ -279,7 +279,7 @@ MainDashboardZeroData.args = {
279279
};
280280
MainDashboardZeroData.scenario = {
281281
readySelector: '[id^="googlesitekit-chart-"] svg',
282-
delay: 200,
282+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
283283
};
284284

285285
export const MainDashboardError = Template.bind( {} );
@@ -326,7 +326,7 @@ MainDashboardOneRowOfData.args = {
326326
};
327327
MainDashboardOneRowOfData.scenario = {
328328
readySelector: '[id^="googlesitekit-chart-"] svg',
329-
delay: 200,
329+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
330330
};
331331

332332
export const NoDataInComparisonDateRange = Template.bind( {} );
@@ -342,7 +342,7 @@ NoDataInComparisonDateRange.args = {
342342
};
343343
NoDataInComparisonDateRange.scenario = {
344344
readySelector: '[id^="googlesitekit-chart-"] svg',
345-
delay: 200,
345+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
346346
};
347347

348348
export default {

assets/js/modules/search-console/components/dashboard/SearchFunnelWidgetGA4/index.stories.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ ReadyWithActivateAnalyticsCTA.args = {
294294
provideSearchConsoleMockReport( registry, searchConsoleArgs );
295295
},
296296
};
297-
298297
ReadyWithActivateAnalyticsCTA.scenario = {
299-
delay: 3000,
298+
readySelector: '[id^="googlesitekit-chart-"] svg',
299+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
300300
};
301301

302302
export const ReadyWithCompleteAnalyticsActivationCTA = Template.bind( {} );
@@ -336,9 +336,9 @@ ReadyWithCreateKeyEventCTA.args = {
336336
}
337337
},
338338
};
339-
340339
ReadyWithCreateKeyEventCTA.scenario = {
341-
delay: 3000,
340+
readySelector: '[id^="googlesitekit-chart-"] svg',
341+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
342342
};
343343

344344
export const Loading = Template.bind( {} );
@@ -485,7 +485,10 @@ NoDataInComparisonDateRange.args = {
485485
}
486486
},
487487
};
488-
NoDataInComparisonDateRange.scenario = {};
488+
NoDataInComparisonDateRange.scenario = {
489+
readySelector: '[id^="googlesitekit-chart-"] svg',
490+
delay: 400, // This extended delay is required to fix rare VRT instability where the chart in this scenario does not render in the standard delay.
491+
};
489492

490493
export default {
491494
title: 'Modules/SearchConsole/Widgets/SearchFunnelWidgetGA4',
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)