Skip to content
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

fix(issue-views): Fixes unsaved changes not detected on reload #77892

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

MichaelSun48
Copy link
Member

@MichaelSun48 MichaelSun48 commented Sep 23, 2024

Fixes a uncommon bug where reloading the page on a tab where the query is not the tab's persistent query would not retrigger the unsaved changes icon.

Before (notice how after the page refresh, the unsaved changes indicator is gone)
Screen.Recording.2024-09-22.at.5.24.14.PM.mov
After
Screen.Recording.2024-09-22.at.5.29.00.PM.mov

@MichaelSun48 MichaelSun48 requested a review from a team as a code owner September 23, 2024 00:29
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 23, 2024
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
static/app/views/issueList/customViewsHeader.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #77892      +/-   ##
==========================================
- Coverage   79.92%   77.99%   -1.93%     
==========================================
  Files        7167     6996     -171     
  Lines      319795   310241    -9554     
  Branches    50763    50763              
==========================================
- Hits       255582   241963   -13619     
+ Misses      58460    56142    -2318     
- Partials     5753    12136    +6383     

@@ -289,7 +289,7 @@ function CustomViewsIssueListHeaderTabsContent({
return;
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [navigate, organization.slug, query, sort, viewId]);
}, [navigate, organization.slug, query, sort, viewId, tabListState]);
Copy link
Member

Choose a reason for hiding this comment

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

This is a good example of the eslint rule trying to help us, would be good to take a second look at some point and see if we can remove the ignores

@MichaelSun48 MichaelSun48 merged commit 5e3cf47 into master Sep 23, 2024
44 of 45 checks passed
@MichaelSun48 MichaelSun48 deleted the msun/issueViews/fixNoUnsavedChangesOnReload branch September 23, 2024 17:41
harshithadurai pushed a commit that referenced this pull request Sep 24, 2024
Fixes a uncommon bug where reloading the page on a tab where the query
is not the tab's persistent query would not retrigger the unsaved
changes icon.

<details open>
<summary>Before (notice how after the page refresh, the unsaved changes
indicator is gone)</summary>


https://github.com/user-attachments/assets/2f6f471f-27b0-431a-8a1a-357df65c2881

</details>

<details>
 <summary>After </summary>



https://github.com/user-attachments/assets/87c4b6a6-008e-4f65-b0b6-c6d891b54fb6
</details>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants