Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Pgadmin Hackers > Behavioral issu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 7 Topic 4498 of 4688
Post > Topic >>

Behavioral issues in data grid: unsaved data, sort/filter

by brandstetter@[EMAIL PROTECTED] (Erwin Brandstetter) Apr 25, 2008 at 09:51 PM

Hi developers! Hi Dave!

Testing pgAdmin v.1.8.2 (Feb 5 2008), rev: 7050, on WinXP; host: pg 
8.2.7 and 8.3.1 on Debian Etch

If I change data in the data grid and try to close the window or refresh 
before saving, I get a warning:
    There is unsaved data in a row.
    Do you want to store to the database?
Which is a very welcome feature. However, this behaviour is unreliable 
for various reasons.
I compile this re****t after I have lost data in a complex operation 
handling multiple tables when I did not pay close attention. The 
recovery is painful. It is probably save to assume, that if I was not 
fully aware of the nuances in behavior, then hardly any user is.


I'll best demonstrate with a simple test-case:

CREATE TABLE test
( id integer primary key,
  txt1 text,
  txt2 text);

INSERT INTO test
VALUES(1,'foo', 'bar'), (2,'foo2', 'bar2'), (3,'foo3', 'bar3');

Actually, this is only included for completeness. You can use any table 
with any data.

Now, open the data grid on this table and do stuff.
I added what happens at attempts to close/refresh as comment after each
line

    - click a field once, selected             -- exit without warning, OK
    - click it a 2nd time, enter edit mode with all data selected      
   -- exit leaves edit mode, issues a FALSE warning about unsaved data 
(no data was changed)
or - press <F2>, enter edit mode with all data selected         -- the
same
    - click a 3rd time, unselect data, position cursor         -- the same
    - change data         -- exit leaves edit mode, issues  warning, OK

    - move on with <tab>, leave edit mode, next field selected         
-- exit without warning, DATA LOST
or - move on with <****ft><tab>, leave edit mode, prev. field selected   
      -- the same (probably due to a known issue we have been discussing 
like a year ago.)
or - move on by clicking another field of the same row, leave edit mode, 
new field selected         -- exit with warning, OK
or - move on by clicking another field of of another row, leave edit 
mode, auto-save row, new field selected         -- exit without warning,
OK

IF you change more fields, the warning will be given in any case.


Well, almost any case. There is still the sort/filter dialog. Try one of 
the following with unsaved changes:
    - add a new filter, press [OK]         -- DATA LOST without warning, 
regardless if the row is still displayed
    - edit a present filter, press [OK]         -- DATA LOST without 
warning, regardless if the row is still displayed
    - open a present filter, but do not change, press [OK]         -- 
nothing happens, data are not refreshed, which is wrong for a different 
reason: the underlying data may have changed. Pressing [OK] on a filter 
means the user wants to apply it.
    - open a present filter, add irrelevant whitespace somewhere in the 
middle, press [OK]         -- filter is reapplied, as it should be. But 
DATA LOST without warning

Similar problems when changing sort order.


How it should be:
~~~~~~~~~~~~
- Do not warn, if data has not changed
- Do warn, if data has changed. Not only at attempts to close the 
window, but also on any attempt to requery, including sort/filter.
   While being at it, requery _every_ time [OK] is clicked - as opposed 
to [Cancel] - in the sort/filter dialog.
    It is futile to check for changes in filter/sort, as the underlying 
data may have changed, and it is confusing if a meaningless whitespace 
makes all the difference.
    The user can always click [Cancel] if he does not want to requery.


Regards
Erwin

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
 




 7 Posts in Topic:
Behavioral issues in data grid: unsaved data, sort/filter
brandstetter@[EMAIL PROTE  2008-04-25 21:51:15 
Re: Behavioral issues in data grid: unsaved data, sort/filter
dpage@[EMAIL PROTECTED]   2008-05-02 12:03:09 
Re: Behavioral issues in data grid: unsaved data,
brandstetter@[EMAIL PROTE  2008-05-02 17:33:50 
Re: Behavioral issues in data grid: unsaved data, sort/filter
dpage@[EMAIL PROTECTED]   2008-05-02 17:03:20 
Re: Behavioral issues in data grid: unsaved data, sort/filter
dpage@[EMAIL PROTECTED]   2008-05-02 22:48:42 
Re: Behavioral issues in data grid: unsaved data,
brandstetter@[EMAIL PROTE  2008-05-03 01:57:50 
Re: Behavioral issues in data grid: unsaved data, sort/filter
dpage@[EMAIL PROTECTED]   2008-05-03 08:18:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 7:01:01 CDT 2008.