pgAdmin 4 commit: Use more sensible column sizes for the data output in

From: Dave Page <dpage(at)pgadmin(dot)org>
To: pgadmin-hackers(at)postgresql(dot)org
Subject: pgAdmin 4 commit: Use more sensible column sizes for the data output in
Date: 2016-12-12 10:13:50
Message-ID: E1cGNcE-00049X-Ob@gothos.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Use more sensible column sizes for the data output in the query tool. Fixes #1789

Per Akshay:

I have tried to get the width of the content but we are sending complete data as collection to the SlickGrid. We will have to fetch the content of each column and figure out the maximum length for that column by iterating all the rows is too expensive. Apart from that to set the width in 'ch' we will have to do it using css. With current implementation we are setting the column option of the SlickGrid from javascript code.

I have fixed this issue by setting the width of the columns based on data type. I have set the width of boolean column to 60, all the numeric/integer columns to 80 and for all other data types it is 20% of the container width as 33% is too wide.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=686237413cc64ee93bdf5844036150beb0fbe43d
Author: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>

Modified Files
--------------
.../sqleditor/templates/sqleditor/js/sqleditor.js | 51 ++++++++++++++++++++++
1 file changed, 51 insertions(+)

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2016-12-12 10:13:58 Re: [pgAdmin4][Patch]: RM 1789 Column width of data output panel should fit to data (as pgAdmin III)
Previous Message Dave Page 2016-12-12 10:06:37 Re: [pgAdmin4][Patch]: RM 2007: View Last 100 rows not working with Pgadmin4