Обсуждение: [PATCH] Enhancement in sql-field control [pgAdmin4]

Поиск
Список
Период
Сортировка

[PATCH] Enhancement in sql-field control [pgAdmin4]

От
Surinder Kumar
Дата:
Hi,

I have updated the backform control for sql-field.

Following are the enhancements:
1. Added border to control which was missing earlier.
2. Allows user to provide height to sql-field control by specifying extraClasses field in model schema.
3. Defined new classes for sql-field control height in overrides.css
4. Added scrollbar to the control.

Usage: 

  id: 'definition', label:'{{ _("Definition") }}', cell: 'string',
  type: 'text', mode: ['create', 'edit'], group: 'Definition',
  control: Backform.SqlFieldControl, extraClasses:['custom_height_css_class']
}


Please review the attached patch and commit if it looks good.


Thanks,
Surinder Kumar
Вложения

Re: [PATCH] Enhancement in sql-field control [pgAdmin4]

От
Dave Page
Дата:
On Fri, Mar 18, 2016 at 2:36 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi,
>
> I have updated the backform control for sql-field.
>
> Following are the enhancements:
> 1. Added border to control which was missing earlier.
> 2. Allows user to provide height to sql-field control by specifying
> extraClasses field in model schema.
> 3. Defined new classes for sql-field control height in overrides.css
> 4. Added scrollbar to the control.
>
> Usage:
>
> {
>   id: 'definition', label:'{{ _("Definition") }}', cell: 'string',
>   type: 'text', mode: ['create', 'edit'], group: 'Definition',
>   control: Backform.SqlFieldControl,
> extraClasses:['custom_height_css_class']
> }
>
>
> Please review the attached patch and commit if it looks good.

Thanks. Why is it full width, unlike other controls? That seems like
it needs fixing.

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

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

Вложения

Re: [PATCH] Enhancement in sql-field control [pgAdmin4]

От
Surinder Kumar
Дата:
Hi,

Please find updated patch.

On Fri, Mar 18, 2016 at 9:18 PM, Dave Page <dpage@pgadmin.org> wrote:
On Fri, Mar 18, 2016 at 2:36 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi,
>
> I have updated the backform control for sql-field.
>
> Following are the enhancements:
> 1. Added border to control which was missing earlier.
> 2. Allows user to provide height to sql-field control by specifying
> extraClasses field in model schema.
> 3. Defined new classes for sql-field control height in overrides.css
> 4. Added scrollbar to the control.
>
> Usage:
>
> {
>   id: 'definition', label:'{{ _("Definition") }}', cell: 'string',
>   type: 'text', mode: ['create', 'edit'], group: 'Definition',
>   control: Backform.SqlFieldControl,
> extraClasses:['custom_height_css_class']
> }
>
>
> Please review the attached patch and commit if it looks good.

Thanks. Why is it full width, unlike other controls? That seems like
it needs fixing.
It doesn't need full width. so I have fixed it. 

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

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

Вложения

Re: [PATCH] Enhancement in sql-field control [pgAdmin4]

От
Dave Page
Дата:
On Mon, Mar 21, 2016 at 5:01 AM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi,
>
> Please find updated patch.
>
> On Fri, Mar 18, 2016 at 9:18 PM, Dave Page <dpage@pgadmin.org> wrote:
>>
>> On Fri, Mar 18, 2016 at 2:36 PM, Surinder Kumar
>> <surinder.kumar@enterprisedb.com> wrote:
>> > Hi,
>> >
>> > I have updated the backform control for sql-field.
>> >
>> > Following are the enhancements:
>> > 1. Added border to control which was missing earlier.
>> > 2. Allows user to provide height to sql-field control by specifying
>> > extraClasses field in model schema.
>> > 3. Defined new classes for sql-field control height in overrides.css
>> > 4. Added scrollbar to the control.
>> >
>> > Usage:
>> >
>> > {
>> >   id: 'definition', label:'{{ _("Definition") }}', cell: 'string',
>> >   type: 'text', mode: ['create', 'edit'], group: 'Definition',
>> >   control: Backform.SqlFieldControl,
>> > extraClasses:['custom_height_css_class']
>> > }
>> >
>> >
>> > Please review the attached patch and commit if it looks good.
>>
>> Thanks. Why is it full width, unlike other controls? That seems like
>> it needs fixing.
>
> It doesn't need full width. so I have fixed it.

Thanks - applied with some minor style changes for consistency.

There were a couple of minor issues that I didn't have time to fix -
I've added a TODO for that to our internal Kanban chart:

- The field is slightly wider than others, approx 3px at each end.
Ideally this just needs a margin adjustment, but that's messing up the
wrapping.

- The corners look a little odd.


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

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