Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Enable temporary survey #1167

Merged
merged 1 commit into from Nov 6, 2020
Merged

Enable temporary survey #1167

merged 1 commit into from Nov 6, 2020

Conversation

TaiWilkin
Copy link
Contributor

@TaiWilkin TaiWilkin commented Nov 3, 2020

Overview

Re-enables the temporary survey popup until December 13th, 2020.

Connects #1151

Demo

Screen Shot 2020-11-03 at 2 43 56 PM

Testing Instructions

  • Run ./scripts/server
  • Navigate to :6543/. You should see the survey popup with the updated link. Close the popup.
  • Refresh the page. You should no longer see the popup.

Checklist

  • fixup! commits have been squashed
  • CI passes after rebase
  • CHANGELOG.md updated with summary of features or fixes, following Keep a Changelog guidelines

Copy link
Contributor

@jwalgran jwalgran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When writing up the issue I didn't realize that everyone who dismissed the previous survey dialog would not see the new survey dialog because they already had the key set in their local storage.

I can think of two ways to resolve this:

  1. Change the name of the constant/string to SURVEY_2_DIALOG_HAS_BEEN_DISPLAYED or similar
  2. Add surveyStartDate, change the local storage key to SURVEY_DIALOG_DISMISSED_DATE, and show the dialog if SURVEY_DIALOG_DISMISSED_DATE either does not exist or is a date less than surveyStartDate. Also remove the SURVEY_DIALOG_HAS_BEEN_DISPLAYED key if it exists to avoid confusion.

Since there is a good chance we will be reusing this feature again, I lean toward the more flexible option 2.

@TaiWilkin
Copy link
Contributor Author

I've added a section, outside of the component function, which looks for and removes the SURVEY_DIALOG_HAS_BEEN_DISPLAYED key from local storage. We will most likely want to remove this code in the future, once it's had a chance to serve its purpose. (Possibly when we next update the survey URL and start/end dates).

Copy link
Contributor

@jwalgran jwalgran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fixups. I exercised the new local storage interactions and they look good.

@jwalgran jwalgran removed their assignment Nov 5, 2020
Re-enables the temporary survey popup until December 13th, 2020.
@TaiWilkin TaiWilkin merged commit f847475 into develop Nov 6, 2020
@TaiWilkin TaiWilkin deleted the tw/add-survey-popup branch November 6, 2020 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants