This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192270 - Truncate Table button is too close to and too similar to Drop Selected Record(s) button
Summary: Truncate Table button is too close to and too similar to Drop Selected Record...
Status: NEW
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 12:25 UTC by marxjohnson
Modified: 2014-09-17 20:11 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Image to describe the problem and proposed solution (105.14 KB, image/jpeg)
2010-11-22 12:25 UTC, marxjohnson
Details
Proposed patch (4.35 KB, patch)
2014-07-23 21:11 UTC, mastero23
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marxjohnson 2010-11-22 12:25:06 UTC
Created attachment 103178 [details]
Image to describe the problem and proposed solution

When viewing the results of a query, there are 2 very similar icons (both boxes with a red cross) that become active when you select records from the result set. One is Drop Selected Records, and one is Truncate Table which deletes all the records in the table, whether they are in the results of the query or not.
The problem with having two such similar buttons so close together is that it makes it very easy to click the wrong one, and upon assuming you have done so, click "yes" on the confirmation dialogue.

I'm aware that this is partly down to user error and complacency, but in this case it's the interface's job to protect data from mistakes like this, especially given the power of the Truncate button.  Moving the buttons further apart (like having the Truncate table button on the far end of the bar) would make mistakes like this a lot less likely to happen.

Thanks!
Comment 1 snackr 2012-08-08 18:12:46 UTC
... or give an option to not show the truncate button at all.
Comment 2 mastero23 2014-07-23 21:11:00 UTC
Created attachment 148246 [details]
Proposed patch

This patch adds a popup menu to the toolbar. It contains one entry to toggle the truncate button visibility.
Comment 3 matthias42 2014-07-28 19:53:09 UTC
I have a counter suggestion: I find it counter intuitive, that defaults are set at arbitrary places in the netbeans gui.

I would vote to implement a Preferences Panel for SQL I see at least two options right now:

- Show/Hide "Truncate Table"-Button
- Default row fetch size

The latter is currently set to the last query size - this is dangerous. If you queried a table with small columns (data wise) and decided to query 500-5000 rows, you will be pretty annoyed when you just say "view data" on a table with big blobs. What do you think?
Comment 4 mastero23 2014-07-29 19:41:47 UTC
I don't think its that counter intuitive. The configuration of the main toolbar also works via popup menu.

Having a own preferences panel for SQL would be great. I can think of at least two more options:

- Show absolute row numbers (#245512)
- Always pack columns (#230166)
Comment 5 mastero23 2014-07-31 21:38:57 UTC
I opened a new issue for adding a preferences panel for Data View (#246175).
Comment 6 matthias42 2014-09-17 20:11:49 UTC
Removed PATCH_AVAILABLE keyword for now, as discussion in the new bug is on going, so this should be revisited after that.