-
Notifications
You must be signed in to change notification settings - Fork 0
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
6913 lock version conflict mitigation #986
Conversation
@@ -73,7 +73,7 @@ const ConfirmationDialog = ({ | |||
variant='gray' | |||
data-testid='cancelDialogAction' | |||
> | |||
{cancelText || unconfirmable ? 'Close' : 'Cancel'} | |||
{cancelText || (unconfirmable ? 'Close' : 'Cancel')} |
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.
looks like a bug where cancelText was not displayed
const channelRef = useRef<BroadcastChannel | null>(null); | ||
useEffect(() => { | ||
const channelName = `record-sync-${recordType}-${recordId}`; | ||
channelRef.current = new BroadcastChannel(channelName); |
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.
* use snackbar to display refresh local version, adjust language * add generic snackbar alert component * adjust eslint to allow us to use console statements in stories * adjust storybook so it doesn't try to open itself on start (breaks my docker container)
alertProps?: AlertProps; | ||
title?: string; | ||
} | ||
const SnackbarAlert: React.FC<Props> = ({ |
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.
Ideally we'd use this in the existing Apollo Alert but refactoring that felt like a bit too much scope creep for this branch
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 looks great @ttoomey!
Description
GH Issue
Two changes to try and reduce occurrence of users encountering lock version errors. Spot checking suggests this is often due to opening the same record in multiple tabs.
BroadcastChannel
which is a newer feature. Looks like it's now supported on evergreen browsersmisc fix:
##testing
Type of change
Checklist before requesting review