Skip to content

Commit b29666a

Browse files
Display survey for native notebooks on/after 1st August (#12961)
Co-authored-by: Joyce Er <[email protected]>
1 parent 9c31e46 commit b29666a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/client/datascience/notebook/survey.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ export class NotebookSurveyBanner {
8181
if (!this.enabled || this.disabledInCurrentSession) {
8282
return false;
8383
}
84+
const currentDate = new Date();
85+
if (currentDate.getMonth() < 7 && currentDate.getFullYear() <= 2020) {
86+
return false;
87+
}
88+
8489
const data = this.persistentState.createGlobalPersistentState<NotebookSurveyUsageData>(storageKey, {});
8590

8691
const totalActionsInPreviousSessions =

src/test/datascience/notebook/survey.unit.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ suite('Data Science - NativeNotebook Survey', () => {
5757
shell = mock<IApplicationShell>();
5858
browser = mock<IBrowserService>();
5959
clock = fakeTimers.install();
60+
clock.setSystemTime(new Date(2020, 7, 1)); // Survey will work only after 1st August.
6061
});
6162
async function loadAndActivateExtension() {
6263
const surveyBanner = new NotebookSurveyBanner(instance(shell), instance(stateFactory), instance(browser));

0 commit comments

Comments
 (0)