-
Notifications
You must be signed in to change notification settings - Fork 2
Warn users about impact of backfill #1877
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
Warn users about impact of backfill #1877
Conversation
| useMount(() => { | ||
| logRocketEvent('Data_Flow_Reset', { | ||
| confirmationShown: true, | ||
| }); | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be safe adding some eventing so we know what this happens.
| } else { | ||
| void save(draftId); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put inside an else just to be super safe. Normally we return up above but on the off change that ever gets messed up I don't want save run twice.
| // Save "do not show again" preference to local storage if applicable | ||
| if (doNotShowAgain && settings.doNotShowAgainStorageKey) { | ||
| localStorage.setItem( | ||
| settings.doNotShowAgainStorageKey, | ||
| SKIP_CONFIRMATION_VALUE | ||
| ); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought to only save if they confirmed. Saving right away when updating the setting felt wrong if the user clicked cancel
| if (userSettings.doNotShowAgainStorageKey) { | ||
| if ( | ||
| localStorage.getItem( | ||
| userSettings.doNotShowAgainStorageKey | ||
| ) === SKIP_CONFIRMATION_VALUE | ||
| ) { | ||
| logRocketEvent('Confirmation', { | ||
| status: 'skipped', | ||
| localStorageKey: userSettings.doNotShowAgainStorageKey, | ||
| }); | ||
| return Promise.resolve(true); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future I could see us need a "skip confirm" for lots of things but for now we only have 1 use case.
| > | ||
| <DialogTitle id={LABEL_ID}> | ||
| <FormattedMessage id={settings.title} /> | ||
| {intl.formatMessage({ id: settings.title })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching out to hook.
| {typeof settings.message === 'string' && | ||
| settings.message.length > 0 | ||
| ? intl.formatMessage({ id: settings.message }) | ||
| : settings.message} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching out to hook and this is the first time an exception got thrown.
The component more gracefully handled empty keys.
| export enum CustomEvents { | ||
| AUTHORIZE_TASK = 'AuthorizeTask', | ||
| AUTH_SIGNOUT = 'Auth_Signout', | ||
| DATA_FLOW_RESET = 'Data_Flow_Reset', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not being used so moved to the new type
Issues
#1868
Changes
1868
confirmationto the save button clickMisc
intlhooksTests
Manually tested
Automated tests
Playwright tests ran locally
Screenshots
New confirmation for captures about backfill when saving
LocalStorage saved