Skip to content

Conversation

@travjenkins
Copy link
Member

@travjenkins travjenkins commented Jan 23, 2026

Issues

#1868

Changes

1868

  • Adding a confirmation to the save button click

Misc

  • Switching to intl hooks
  • Cleaning up LR event enum

Tests

Manually tested

  • Capture Create and Edit
  • Messed with local storage settings

Automated tests

  • unit testing covered

Playwright tests ran locally

  • Admin
  • Captures
  • Collections
  • HomePage
  • Login
  • Materialization

Screenshots

New confirmation for captures about backfill when saving

image

LocalStorage saved

image

Comment on lines +12 to +16
useMount(() => {
logRocketEvent('Data_Flow_Reset', {
confirmationShown: true,
});
});
Copy link
Member Author

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.

Comment on lines +76 to +78
} else {
void save(draftId);
}
Copy link
Member Author

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.

Comment on lines +58 to +64
// Save "do not show again" preference to local storage if applicable
if (doNotShowAgain && settings.doNotShowAgainStorageKey) {
localStorage.setItem(
settings.doNotShowAgainStorageKey,
SKIP_CONFIRMATION_VALUE
);
}
Copy link
Member Author

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

Comment on lines +80 to +92
if (userSettings.doNotShowAgainStorageKey) {
if (
localStorage.getItem(
userSettings.doNotShowAgainStorageKey
) === SKIP_CONFIRMATION_VALUE
) {
logRocketEvent('Confirmation', {
status: 'skipped',
localStorageKey: userSettings.doNotShowAgainStorageKey,
});
return Promise.resolve(true);
}
}
Copy link
Member Author

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 })}
Copy link
Member Author

Choose a reason for hiding this comment

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

Switching out to hook.

Comment on lines +132 to +135
{typeof settings.message === 'string' &&
settings.message.length > 0
? intl.formatMessage({ id: settings.message })
: settings.message}
Copy link
Member Author

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',
Copy link
Member Author

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

@travjenkins travjenkins marked this pull request as ready for review January 23, 2026 21:51
@travjenkins travjenkins requested a review from a team as a code owner January 23, 2026 21:51
@travjenkins travjenkins added the change:planned This is a planned change label Jan 26, 2026
@travjenkins travjenkins merged commit 63481b4 into main Jan 27, 2026
6 checks passed
@travjenkins travjenkins deleted the travjenkins/feature/ensure-backfill-is-proper branch January 27, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:planned This is a planned change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants