vieten / sequel-pro

Automatically exported from code.google.com/p/sequel-pro
Other
0 stars 0 forks source link

[REQ] Warn before closing tab #1248

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently, with the way the tab structure works, it's fairly easy (and 
unfortunately all too common for me) to close your tab while you currently have 
an open, unsaved query written.  While I love Sequel Pro, it currently handles 
tabs a bit differently than some other database clients.

Example:
As a user, I'm writing a rather long and complex query, utilizing tables where 
I might not have the structure memorized.  In such cases, I'll click on the 
appropriate table in the tables list, and then click on the Structure button 
above the tab bar.  I'm now viewing the structure of the table in the same tab 
that my long, complex query is currently written in.  For one reason or 
another, an user can forget they currently have that query written in the 
background (they get pulled away from their desk, they're using many tabs, 
etc.), since they only see the structure of the table.  As such, they close the 
tab forgetting the query is there.  Since there's no notification or warning 
telling them that they have a query written in the background, the tab promptly 
closes and now their query is gone.  A feature prompting the user to save 
before closing the tab (if there is code written in the background) would be a 
valuable feature potentially saving users from themselves.

Currently, both SQL Server and Toad for Oracle (the only other two database 
clients I'm really familiar with) allow you to view the structure of a table 
while also writing your code.

SQL Server handles this in two different ways:
1. A tree structure for the database -> table -> columns views.  You're able to 
expand your database, which then allows you to see your tables, which you can 
then expand to see your columns, all while still seeing your code in the main 
window.
2. If you were to want to view the full structure of a table (columns, data 
types, contraints, etc.), double-clicking on the table along the left side will 
open up that structure in a new tab, keeping your query open in its original 
tab.

Toad for Oracle has a similar feature to the "Show Table Information" pop up 
that Sequel Pro has - when selecting a table in the table browser, you are able 
to view the structure of that table in the little table information pane, while 
still keeping your code open in the main window.

Again, I think this would be a valuable feature and create a little bit of 
safety for the users from themselves (me in particular).

Regardless, I'm a huge fan of Sequel Pro and continue to use it on a daily 
basis.  Thank you.

Original issue reported on code.google.com by gjr...@gmail.com on 15 Dec 2011 at 8:30

GoogleCodeExporter commented 9 years ago
I find "do you want to close the application?" dialogs rather annoying under 
Windows and I don't generally see them on OS X. That would leave us with a "The 
document has unsaved changes..." dialog which IMHO isn't really fitting either.

However there are some general usability issues with tabs (eg. tabs on top, 
r1069) so I'll leave this open for discussion.

Original comment by schlabbe...@gmail.com on 3 Mar 2012 at 8:23