studio
studio copied to clipboard
cant close a tab with no changes (but filter is set)
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
Hey @linojon, IIUC, adding a filter to a tab marks it as "dirty", and you expect it to not be that way? If so, then this is expected. We mark it so so that you don't accidentally close tabs that might contain manual input.
Let me know if I misunderstood!
Thanks. I’ve gotten used to it now. But my expectation was that it wouldn’t be dirty unless I had unsaved changes. New tabs are opened with filters when browsing relation connections, and now closing those tabs requires several extra clicks which is annoying.
From: Siddhant @.> Sent: Wednesday, July 14, 2021 7:02 AM To: prisma/studio @.> Cc: Jonathan Linowes @.>; Mention @.> Subject: Re: [prisma/studio] cant close a tab with no changes (but filter is set) (#727)
Hey @linojon https://github.com/linojon , IIUC, adding a filter to a tab marks it as "dirty", and you expect it to not be that way? If so, then this is expected. We mark it so so that you don't accidentally close tabs that might contain manual input.
Let me know if I misunderstood!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/prisma/studio/issues/727#issuecomment-879797933 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQYEH6CUUYZESXRZIDB2DTXVVEFANCNFSM5ADI3B7A . https://github.com/notifications/beacon/AAAQYEDL4COJPSXJJN2NXPLTXVVEFA5CNFSM5ADI3B7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGRYKNLI.gif
Its a pain to close tabs when its "dirty", especially when theres alot open eg from navigating relations.
The easiest solution is allow closing a tab when you click to close it, without the Discard Changes dialog box when there are no pending "Save N change". I see no reason to consider the tab as dirty just because the view has changed eg theres a filter or sort etc set.
But if you insist that there must be a Discard Changes box in those cases, heres some suggestions for UI improvement
- Allow keyboard enter key to Discard on the Discard Changes? dialog
- Right-click on tab > context menu > Close & Discard
- Setting icon > Close & Discard All (sometimes i just want a clean slate)
thanks
This is really hard to close, can't we have close all tabs util? :)
We're working on and will soon be releasing some improvements to closing tabs that will better differentiate between actual unsaved changes and filters that were set, and helping you close tabs and discard any of those changes. Even then, I still see the value in some of the solutions outlined in this issue, e.g. a close all feature. I'll bring this up internally and put it on our long-term roadmap.
Is this resolved? This would help me a lot.
I have to agree that the experience of closing tabs that have filters applied is a bit cumbersome. One thing that would smooth out this experience would be to have the "Close filtered view" button focused when the dialog opens. This would allow using the enter button on a keyboard to close the view rather than having to traverse back and forth between that button and the several filtered tabs that need to be closed in a row.
Two other options to help smooth out this experience would be
- Not show a confirmation dialog when closing a filtered view. (I haven't found the confirmation to be useful for filtered views, only for unsaved changes)
- Implement some sort of "close all tabs" functionality.
Any updates on this? Even if its a chrome setting we can alter or change? Because prisma studio remembers tabs based on sessions and different chrome accounts have different tabs open it should be easy to close all tabs with a button or a setting? No?