Обсуждение: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

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

[pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Surinder Kumar
Дата:
Hi

Added support for Columns resizable in query tool. It allows user to resize the table columns as much as needed.

We are using Backgrid Sizeable Columns plugin:

with one change in library on line no 185:
moved the following trigger event out of if condition:

if (newWidth != oldWidth) {

}


and added one additional parameter offset.
//Trigger event

view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);


We are listening to this trigger event in sqleditor.js file where we need offset
to calculate new table width on every resize event.

hence, here is the patch attached.

Please review.


Thanks,
Surinder Kumar

Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Dave Page
Дата:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Surinder Kumar
Дата:
Hi, 

forgot to attach patch.
Please find attached patch.

On Fri, May 27, 2016 at 4:37 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:
Hi

Added support for Columns resizable in query tool. It allows user to resize the table columns as much as needed.

We are using Backgrid Sizeable Columns plugin:

with one change in library on line no 185:
moved the following trigger event out of if condition:

if (newWidth != oldWidth) {

}


and added one additional parameter offset.
//Trigger event

view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);


We are listening to this trigger event in sqleditor.js file where we need offset
to calculate new table width on every resize event.

hence, here is the patch attached.

Please review.


Thanks,
Surinder Kumar

Вложения

Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Surinder Kumar
Дата:


On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.
yes, sure. 

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


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

Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Surinder Kumar
Дата:
Hi

Please find updated patch with following changes:
  1. Replaced the outdated code for Backgrid Sizeable Columns plugin with https://github.com/FortesSolutions/backgrid-sizeable-columns library because the updated code is available here.
  2. I have figured out to calculate offset using the parameters of listener provided, so we need not to tweak the original library code.

On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:


On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.
yes, sure. 

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


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


Вложения

Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Ashesh Vashi
Дата:

On Fri, May 27, 2016 at 6:27 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:

Hi

Please find updated patch with following changes:
  1. Replaced the outdated code for Backgrid Sizeable Columns plugin with https://github.com/FortesSolutions/backgrid-sizeable-columns library because the updated code is available here.
  2. I have figured out to calculate offset using the parameters of listener provided, so we need not to tweak the original library code.
As per our conversation, the sizeHandler is not calculating the position without resizing.
It should calculate the position even after rendering is completed.

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:


On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.
yes, sure. 

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


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




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


Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Surinder Kumar
Дата:
Hi,

Please find updated patch with following changes:
1. the sizeHandler is not calculating the position without resizing
2. Apply sizeable columns to history grid in query tool.
3. Table column Label and Type should not be in single line. Currently Backgrid displays column and type in a single line considering it as text.
we have to extend headerCell class and override its render method to fix this.

Please review.

On Mon, May 30, 2016 at 11:36 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:

On Fri, May 27, 2016 at 6:27 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:

Hi

Please find updated patch with following changes:
  1. Replaced the outdated code for Backgrid Sizeable Columns plugin with https://github.com/FortesSolutions/backgrid-sizeable-columns library because the updated code is available here.
  2. I have figured out to calculate offset using the parameters of listener provided, so we need not to tweak the original library code.
As per our conversation, the sizeHandler is not calculating the position without resizing.
It should calculate the position even after rendering is completed.
Fixed. 

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:


On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.
yes, sure. 

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


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




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



Вложения

Re: [pgAdmin4][Patch]: RM#1243 - Columns on the Query Tool should be sizeable

От
Ashesh Vashi
Дата:

On Tue, May 31, 2016 at 1:56 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:

Hi,

Please find updated patch with following changes:
1. the sizeHandler is not calculating the position without resizing
2. Apply sizeable columns to history grid in query tool.
3. Table column Label and Type should not be in single line. Currently Backgrid displays column and type in a single line considering it as text.
we have to extend headerCell class and override its render method to fix this.
Thanks - committed!

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



Please review.

On Mon, May 30, 2016 at 11:36 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:

On Fri, May 27, 2016 at 6:27 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:

Hi

Please find updated patch with following changes:
  1. Replaced the outdated code for Backgrid Sizeable Columns plugin with https://github.com/FortesSolutions/backgrid-sizeable-columns library because the updated code is available here.
  2. I have figured out to calculate offset using the parameters of listener provided, so we need not to tweak the original library code.
As per our conversation, the sizeHandler is not calculating the position without resizing.
It should calculate the position even after rendering is completed.
Fixed. 

--

Thanks & Regards,

Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company



On Fri, May 27, 2016 at 5:00 PM, Surinder Kumar <surinder.kumar@enterprisedb.com> wrote:


On Fri, May 27, 2016 at 4:43 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Fri, May 27, 2016 at 12:07 PM, Surinder Kumar
<surinder.kumar@enterprisedb.com> wrote:
> Hi
>
> Added support for Columns resizable in query tool. It allows user to resize
> the table columns as much as needed.
>
> We are using Backgrid Sizeable Columns plugin:
> https://github.com/WRidder/backgrid-sizeable-columns
>
> with one change in library on line no 185:
> moved the following trigger event out of if condition:
>
> if (newWidth != oldWidth) {
>
> }
>
>
> and added one additional parameter offset.
> //Trigger event
>
> view.columns.trigger("resize", columnModel, newWidth, oldWidth, offset);
>
>
> We are listening to this trigger event in sqleditor.js file where we need
> offset
> to calculate new table width on every resize event.

Please ensure any changes to third party libraries are submitted upstream.
yes, sure. 

> hence, here is the patch attached.

ENOATTACHMENT!

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

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


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




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