Re: [pgadmin-hackers][patch] delete icon width in security labels form

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Joao De Almeida Pereira <jdealmeidapereira(at)pivotal(dot)io>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgadmin-hackers][patch] delete icon width in security labels form
Date: 2017-07-07 15:22:56
Message-ID: CA+OCxozF+q=rexMbV8ME_D24c235tAK3h_vkg0pXOh-Ah42NzQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Thu, Jul 6, 2017 at 4:13 PM, Joao De Almeida Pereira <
jdealmeidapereira(at)pivotal(dot)io> wrote:

> Hello Hackers,
>
> We found a discrepancy with the width of inserted columns in some backform
> tables. It is at least present in Create Table -> Security [tab] ->
> clicking [+] for new rows under each of Privileges and Security Labels. In
> this case, the cell containing the delete icon is spaced differently.
>
> After briefly investigating, it looks like width_percent_xx classes on too
> many columns is to blame. We've attached a patch that resolves the
> immediate issue by removing width_percent_50 from the last column of two
> schemas. It feels like columns are overconstrained since by themselves
> width percentages sum to 100%, but there is behavior that inserts
> additional columns beyond those specified in the schema. For instance, the
> unshifts in Backform.UniqueColCollectionControl.showGridControl in
> backform.pgadmin.js
>
> Let us know what you think of this removal of last-column constraint as an
> approach.
>

I think it's fine for a quick fix. Longer term, it may be worth coming up
with some more intelligent sizing, such as fixed space for the control
icons, then some sort of fixed unit for the rest, that can be used so that
it recalculates actual ratios on the fly.

Thanks, patch applied!

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-07-07 15:34:36 pgAdmin 4 commit: Fix handling of CREATE TABLE OF <type>. Fixes #2534
Previous Message pgAdmin 4 Jenkins 2017-07-07 15:07:52 Jenkins build is back to normal : pgadmin4-master-python33 #222