public inbox for [email protected]  
help / color / mirror / Atom feed
From: Akshay Joshi <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4] [Patch] Implementation of the Data Grid and Query Tool
Date: Thu, 7 Apr 2016 14:37:19 +0530
Message-ID: <CANxoLDemUxkGL_z6=OPkA=3E-+ZDDmA3oht2wgDoCmurVv3JYQ@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoz4ejTML6cjwMvOLd7vg4Dcd1koz30StnH_huND61gdzg@mail.gmail.com>
References: <CANxoLDe8fRZ=m8NGPc0=YQLS0vTc4-L5xmjyn2J2V1jUt937Mg@mail.gmail.com>
	<CA+OCxoz4ejTML6cjwMvOLd7vg4Dcd1koz30StnH_huND61gdzg@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hi

On Wed, Apr 6, 2016 at 8:28 PM, Dave Page <[email protected]> wrote:

> Hi
>
> On Tue, Apr 5, 2016 at 10:20 AM, Akshay Joshi <
> [email protected]> wrote:
>
>> Hi All
>>
>> I have implemented the Data Grid and Query Tool as one component.
>>
>> *Functionality working for Data Grid*:
>>
>>    - Add/Update/Delete rows if object is editable.
>>    - Copy row
>>    - Paste row
>>    - Refresh
>>    - Client Filter provided by the Backgrid.
>>    - Filter (User specified, By cell Selection, Exclude Selection
>>    - Add Limit to the query result
>>    - Download the data as CSV.
>>
>> *Todo's for the Data Grid*:
>>
>>    - Find a way to select backgrid cell when rows are not editable. If
>>    backgrid rows are not editable then Filter by selection and Exclude
>>    selection won't work
>>
>> *Functionality working for Query Tool*:
>>
>>    - Execute sql query.
>>    - Execute the Highlighted sql.
>>    - Cancel the running query.
>>    - Download the data as CSV
>>
>> *Todo's for the Query Tool*:
>>
>>    - Open as SQL file.
>>    - Save to SQL file.
>>    - Auto Commit/ Rollback.
>>    - Output Panel should be resizable, so that user can
>>
>> Attached is the patch file. Please review it and let me know the review
>> comments if any.
>>
>
> Initial feedback based on my playing with it, and discussion with Ashesh:
>
> - The View Data menu option should be on the Object menu
>

   OK.


> , which should mirror the Context menu, except options should be disabled
> when not applicable instead of hidden.
>

     Context menu code is generic code, to do this we need to change that
code and it impacts other menu items like (Connect/Disconnect server,
Connect/Disconnect Database etc ...)

>
> - The Query Tool menu icon should be a glyphicon, to match the others.
>

   There is no glyphicon available which match the Query Tool icon. I have
found one like below which is "database-search" or can you please suggest
some other icon.
       [image: Inline image 1]

- Please merge the functionality of the Refresh and Execute buttons into
> one button. We shouldn't have two buttons that do essentially the same
> thing.
>

    I have modified the button toolbar, we will show buttons on the toolbar
specific to the module (QueryTool/EditGrid). Please refer the attached
screenshots (QueryTool and EditGrid).


> - In Edit Grid mode, the History panel should log all queries (SELECTs,
> UPDATEs, DELETEs etc) as it would in the Query Tool.
>
> - In Edit Grid mode, the Messages panel should display any messages from
> the most recent action  as it would in the Query Tool.
>

   OK.

>
> - Please add an SQL button. This should show/hide the SQL panel in *both*
> Query Tool and Edit Grid modes. In Edit Grid mode, that textbox should be
> read-only, but should display the SQL used (including any LIMIT/FILTER
> clauses)
>

    I think we don't need an SQL button, because I have added a Splitter to
split SQL panel and Output Panel, so user can any time resize the SQL/Output
panel. Please refer the attached screenshots (QueryTool and EditGrid).

>
> - Please remove the border from the SQL box, such that it fills all
> available space.
>

   Done. Please refer the attached screenshots (QueryTool and EditGrid).

>
> - The Filter box should be in a modal overlay over the top of the SQL
> box/Results tabs as required. Those elements should be grayed whilst it is
> open.
>

   Done. Please refer the attached screenshot (Filter).

>
> - Please adjust the height of the Delete icon in the Edit Grid, such that
> it doesn't force the row height to be higher than it should be.
>

   OK.

>
> - If a field has been edited, but not saved, can we highlight it somehow?
> Maybe make the text dark blue?
>

   OK, not sure right now but will try.

>
> - I think the names of the tabs are far too long. Can we change them to
> "Query 1", "Query 2" etc, then rename them to the filename if the user
> saves/loads a file?
>

   I personally feel it's been difficult for user to identify the tab if we
will give names like "Query 1" . What we can do in case of edit grid we
will only show the servername-objectname (remove database and schema) or
only objectname, and in case of query tool we will show servername-
databasename. What do you think?


> - Ashesh and I discussed changing the History tab to be a grid, showing:
> Date/Time, Query (first line only), Rows affected, Runtime and Status, in a
> row per query executed. Ashesh suggested using a sub-form that can be
> expanded for each row, which could show the full query and error details
> (SQL State etc). New rows should be added to the top of the list.
>
> - We should add an "Edit" button, which opens a drop-down menu. This would
> eventually include options as found on the Edit menu in the pgAdmin3 query
> tool, such as the "Clear SQL" option.
>
> - Errors should be highlighted in the SQL box - a marker in the margin to
> note the line, and spellcheck-style underlining for the error word.
>

    OK.

>
> - Query results should have spaces converted to "&nbsp;", so that proper
> indenting is maintained (for example, on EXPLAIN queries).
>

    Instead of converting spaces to "&nbsp;" we can have css style
"white-space: pre-wrap;". I have tested it and works fine.

>
> - The "Add Row" button only works if you're on the last page of the
> resultset.
>

   OK.

>
> - Can the "Copy Row" button also populate the clipboard with CSV data for
> the row?
>

   This required some research, not sure at the moment.

>
> - In Edit mode, we need to be able to represent/set values to NULL.
>

   This will be taken care as part of multi-type rendering task.

>
> - If I shutdown my pgAdmin server, then execute a query, I get no error, 0
> rows displayed, and a message in the messages panel saying:
>
> Total query runtime: 46 msec
> 3 rows retrieved.
>
> If I restart the server, the query will execute correctly, however I
> should see appropriate messages when it's not running.
>
> - The layout of the result tabs should be maintained if new Query Tool or
> Edit Grid tabs are opened.
>

   OK.

>
> Thanks!
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>



-- 
*Akshay Joshi*
*Principal Software Engineer *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


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


Attachments:

  [image/png] image.png (2.4K, 3-image.png)
  download | view image

  [image/png] Edit-Grid.png (130.6K, 4-Edit-Grid.png)
  download | view image

  [image/png] Filter.png (125.8K, 5-Filter.png)
  download | view image

  [image/png] Query-Tool.png (70.9K, 6-Query-Tool.png)
  download | view image

view thread (18+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin4] [Patch] Implementation of the Data Grid and Query Tool
  In-Reply-To: <CANxoLDemUxkGL_z6=OPkA=3E-+ZDDmA3oht2wgDoCmurVv3JYQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox