-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(issue-views): Fix uncommitted new views being saved (#78188)
Fixes a bug where views that were newly created, but were not progressed past the new view flow, were being saved to the backend. https://github.com/user-attachments/assets/dde66230-7af9-41e6-8c2b-40ccde7b4fa2 _Notice how even after triggering an action that saves the views to the backend (renaming the first tab), the newly created view still has the new view flow, indicating it has not been saved._ Achieves this by adding an `isCommitted` property to each tab. The frontend only send views where `isCommitted=false` to be saved. **Logic details:** * All views are initially marked with `isCommitted=true` * Only views created via the `+ Add View` button will have is `isCommitted=false` * Views created via duplcating, or by saving a temp view have `isCommitted=false` * `isCommitted` for a view can be switched from `false` to `true`... * If the view is renamed * If a recommended search or saved search is clicked * If the query is changed manually There are some interesting questions to be considered regarding the last bullet point: * Should we toggle `isCommitted` to true if the query is changed manually or if a recommended/saved search is chosen from a new view? Maybe this would give the user a chance to look at the results first before hitting `Save Changes`, which would then toggle `isCommitted` to true. * Should we toggle `isCommitted` to true if the view is renamed? This cause the new view flow to disappear after renaming, which probably isn't ideal. On the other hand, it would be strange if I renamed a tab, forgot to add a query, then came back and found the tab to be gone.
- Loading branch information
1 parent
09cb65f
commit 1e29d42
Showing
3 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters