-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
ref(issue-views): Fold navigate behavior into issueViews context #82540
Conversation
if (action.type === 'SYNC_VIEWS_TO_BACKEND' || action.syncViews) { | ||
debounceUpdateViews(newState.views); | ||
} | ||
|
||
if (action.updateQueryParams) { | ||
queueMicrotask(() => { |
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.
Is this queueMicrotask necessary?
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 seemed to fix an error that would occur in tests (something about not being able to simultaneously update state in two components at once), though that never seemed to be an issue in the UI.
) This PR refactors the issue views family of components by moving lots of the navigation logic into the IssueViews context created in [this PR](#82429). Many of the tab actions that were folded into the IssueViews context require changes to the query parameters, which is why it makes sense to combine these two actions in the reducer function. For example: * Duplicating a tab requires the newly created tab to be selected (change viewId parameter) * Discarding a tab's changes requires the query/sort to be reset to the original query/sort (change query/sort param
PR reverted: 520e316 |
…ext (#82540)" This reverts commit 518b63d. Co-authored-by: malwilley <[email protected]>
@MichaelSun48 reverting because we noticed a bug with this change:
This would often cause the issue stream to lock up or not navigate back at all |
This PR refactors the issue views family of components by moving lots of the navigation logic into the IssueViews context created in this PR.
Many of the tab actions that were folded into the IssueViews context require changes to the query parameters, which is why it makes sense to combine these two actions in the reducer function. For example: