Re: PoC: Little improvements to EditGrid - Enum ComboBox

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PoC: Little improvements to EditGrid - Enum ComboBox
Date: 2012-06-06 13:38:10
Message-ID: CAHHcreqsVteHx37sZt=qdEwc8bXY5vH0zxTHypTnZzOXK5aSUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

2012/6/6 Dave Page <dpage(at)pgadmin(dot)org>:
>> 2) show a datetime picker in columns of type date/time/timestamp;
>
> Hmm, nice idea in principle, but I'm not sure if there's a suitable
> control that will allow the flexibility required (fractional seconds,
> timezones etc). Obviously that's not needed in all cases, but we
> should be consistent, otherwise we'd get people asking why they can
> use a picker for timestamp but not timestamptz for example.

Yep, I'll try some layouts and behaviors and come back to listen to you.

>> 3) show a combo box in columns that has referential to another table;
>
> Also nice, but I think this one needs some careful handling. Perhaps
> limit the combo items to the first 500 or something, and still allow
> the user to manually type a value? We don't want to try to load 10
> million values into the combo!

[... cut ...]

>> - Which field should be displayed in the combo?
>>   Generally the value of a FK doesn't has enough information about
>> what it means, them you need another field (e.g  a description or
>> person_name field) to make sense.
>
> Well, you could use a grid instead of a combo box to allow the user to
> choose, and display the FK value in the first column, and the PK value
> from the referenced table in the second and subsequent rows. I think
> anything more than that is probably too domain specific.

Nice idea. Maybe the workflow could be:

1. user starts edit on a field that is a simple FK
2. we open the field and show a little button "[...]" in the right side
3. user place the value by hand and the already existing behavior is
used as expected
4. otherwise user click in the button
4.1. we open another frmEditGrid called with a special parameter
4.2. the special parameter enable double click in a record (or another event)
4.3. the new window shows data from referenced table
4.4. user search the field and double click it
4.5. this frmEdiGrid is closed and the primary key value is placed in
the original frmEditGrid respective field

Thoughts?

>> - How to play with composite referential keys? Should they be
>> supported, and if so how should be the behavior?
>>  It seems pretty dark to me how to bring values from two fields from
>> a FK in distinct combo boxes.
>
> Yeah, I don't really like the idea of trying to support that case. I
> can't see any sensible way to make it work nicely.

+1. I'm queuing it.

>> Well, this is just a start point and your opinions is very important.
>>
>> What do you think guys?
>
> I think it'll be a nice addition to the tool - thanks for working on it.

Thanks Dave!

> One additional suggestion you may want to include: bytea handling. For
> input, allow the user to select a local file as the contents of a
> bytea field. For output, it would be great if we could detect some
> common filetypes and offer viewers for them - e.g. detect that a bytea
> contains an image and allow the user to view it.

I liked it and I'll try something.

Best regards.
--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2012-06-06 15:22:07 Re: PoC: Little improvements to EditGrid - Enum ComboBox
Previous Message Dave Page 2012-06-06 09:05:30 Re: Upgrading the VC++ solution/project files