Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-05-23 Thread Shruti B Iyer
Hi Dave,

git am is also helpful to apply a patch that was created using git
format-patch, which is how we created these four patches. git am will apply
the diff in the patch and also make a commit using the commit message
stored in the patch. Could you try it again using git am? If it still
doesn't work for you, we can try creating the diff files.

Thanks,
Shruti & Matt

On Tue, May 23, 2017 at 5:28 PM, Dave Page  wrote:

> Hi
>
> git am is for applying patches from mailbox files:
>
> Splits mail messages in a mailbox into commit log message, authorship
> information and patches, and applies them to the current branch.
>
> That doesn't seem like it'll help me as a gmail user. Can you fix the
> patches to apply with git apply please?
>
> On Tuesday, May 23, 2017, Shruti B Iyer  wrote:
>
>> Hi Dave,
>>
>> We see the same errors when doing *git apply* for each patch. However,
>> if you do *git am* for each patch, it should proceed.
>>
>> Thanks,
>> Shruti & Matt
>>
>> On Tue, May 23, 2017 at 4:55 PM, Dave Page  wrote:
>>
>>> Hi!
>>>
>>> Looks great! I found a few issues which I think should be addressed
>>> before we continue too far. Note that I haven't reviewed the code at
>>> this stage:
>>>
>>> - When dragging a selection, the bounding box doesn't line up with the
>>> bottom of the grid rows. Note that I couldn't screen shot this
>>> unfortunately. It's not broken as such - just looks wrong.
>>>
>>> - If I copy one or more rows, I'm unable to paste them in as new rows
>>> when editing table data.
>>>
>>> - The 0004 patch doesn't apply:
>>>
>>> (pgadmin4)snake:web dpage$ git apply
>>> ~/Downloads/0004-Introduces-XCellSelectionModel.patch
>>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:640:
>>> trailing whitespace.
>>> function scrollColumnIntoView(columnIndex) {
>>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:641:
>>> trailing whitespace.
>>>   var colspan = getColspan(row, columnIndex);
>>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:642:
>>> trailing whitespace.
>>>
>>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:643:
>>> trailing whitespace.
>>>   var left = columnPosLeft[columnIndex],
>>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:644:
>>> trailing whitespace.
>>> right = columnPosRight[columnIndex + (colspan > 1 ? colspan - 1
>>> : 0)],
>>> error: patch failed: web/pgadmin/static/vendor/slic
>>> kgrid/slick.grid.js:2794
>>> error: web/pgadmin/static/vendor/slickgrid/slick.grid.js: patch does
>>> not apply
>>>
>>> Thanks, Dave.
>>>
>>>
>>> On Tue, May 23, 2017 at 12:11 PM, Matthew Kleiman 
>>> wrote:
>>> > Hi Hackers!
>>> >
>>> > Attached are the updates to the query results grid, broken up into four
>>> > patches.
>>> >
>>> >
>>> > Description of the Completed Functionality After Applying All Four
>>> Patches
>>> > Currently the designed behavior is somewhere between excel like
>>> behavior and
>>> > not. As such we can describe the behavior as follows:
>>> >
>>> > Select columns by clicking on the header
>>> > Select rows by clicking on the row header (column 0)
>>> > You can drag and select with the mouse
>>> > You can select all with ctrl+a or by clicking the upper left cell
>>> > You can copy with ctrl+c or with the copy icon
>>> > you can increase or decrease the size of the selected area with
>>> shift+arrow
>>> > shift+arrow understands directionality, e.g. drag select from left to
>>> right
>>> > differs from drag select from right to left
>>> > Clicking anywhere outside of the selected area deselects the area and
>>> > reselects the new cell(s) clicked on
>>> >
>>> > Current potentially awkward but intentional functionality
>>> >
>>> > When you select multiple columns/rows by clicking on the header, then
>>> press
>>> > shift+arrow all but the last selected columns/rows are deselected
>>> >
>>> > Includes fixes for:
>>> > RM Bug #2348 - On resize of first/any column in "Query Tool/View Data"
>>> will
>>> > select/deselect all the rows/columns.
>>> > RM Bug #2344 - ctrl+v and ctrl+c need to work
>>> >
>>> >
>>> > Detailed Description of Each Patch
>>> >
>>> > 0001-Improves-user-s-ability-to-select-cells-in-query-res.patch -
>>> >
>>> >   - user can select columns
>>> >
>>> >   - user can modify column or row selection with shift+arrow
>>> >
>>> >   - user can select entire grid with ctrl+A or cmd+A
>>> >
>>> >   - user can copy from grid using keyboard shortcuts
>>> >
>>> > 0002-Drag-and-select-from-data-grid.patch -
>>> >
>>> > 0003-Removes-checkboxes-from-the-grid.patch -
>>> >
>>> > -  Changes header color to grey
>>> >
>>> > 0004-Introduces-XCellSelectionModel.patch -
>>> >
>>> > - header styles depend on the selection
>>> >
>>> > - show the correct row/column when scrolling up or left
>>> >
>>> > - fixes drag and drop when drop is done outside the grid
>>> 

Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-05-23 Thread Dave Page
Hi

git am is for applying patches from mailbox files:

Splits mail messages in a mailbox into commit log message, authorship
information and patches, and applies them to the current branch.

That doesn't seem like it'll help me as a gmail user. Can you fix the
patches to apply with git apply please?

On Tuesday, May 23, 2017, Shruti B Iyer  wrote:

> Hi Dave,
>
> We see the same errors when doing *git apply* for each patch. However, if
> you do *git am* for each patch, it should proceed.
>
> Thanks,
> Shruti & Matt
>
> On Tue, May 23, 2017 at 4:55 PM, Dave Page  > wrote:
>
>> Hi!
>>
>> Looks great! I found a few issues which I think should be addressed
>> before we continue too far. Note that I haven't reviewed the code at
>> this stage:
>>
>> - When dragging a selection, the bounding box doesn't line up with the
>> bottom of the grid rows. Note that I couldn't screen shot this
>> unfortunately. It's not broken as such - just looks wrong.
>>
>> - If I copy one or more rows, I'm unable to paste them in as new rows
>> when editing table data.
>>
>> - The 0004 patch doesn't apply:
>>
>> (pgadmin4)snake:web dpage$ git apply
>> ~/Downloads/0004-Introduces-XCellSelectionModel.patch
>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:640:
>> trailing whitespace.
>> function scrollColumnIntoView(columnIndex) {
>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:641:
>> trailing whitespace.
>>   var colspan = getColspan(row, columnIndex);
>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:642:
>> trailing whitespace.
>>
>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:643:
>> trailing whitespace.
>>   var left = columnPosLeft[columnIndex],
>> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:644:
>> trailing whitespace.
>> right = columnPosRight[columnIndex + (colspan > 1 ? colspan - 1 :
>> 0)],
>> error: patch failed: web/pgadmin/static/vendor/slic
>> kgrid/slick.grid.js:2794
>> error: web/pgadmin/static/vendor/slickgrid/slick.grid.js: patch does not
>> apply
>>
>> Thanks, Dave.
>>
>>
>> On Tue, May 23, 2017 at 12:11 PM, Matthew Kleiman > > wrote:
>> > Hi Hackers!
>> >
>> > Attached are the updates to the query results grid, broken up into four
>> > patches.
>> >
>> >
>> > Description of the Completed Functionality After Applying All Four
>> Patches
>> > Currently the designed behavior is somewhere between excel like
>> behavior and
>> > not. As such we can describe the behavior as follows:
>> >
>> > Select columns by clicking on the header
>> > Select rows by clicking on the row header (column 0)
>> > You can drag and select with the mouse
>> > You can select all with ctrl+a or by clicking the upper left cell
>> > You can copy with ctrl+c or with the copy icon
>> > you can increase or decrease the size of the selected area with
>> shift+arrow
>> > shift+arrow understands directionality, e.g. drag select from left to
>> right
>> > differs from drag select from right to left
>> > Clicking anywhere outside of the selected area deselects the area and
>> > reselects the new cell(s) clicked on
>> >
>> > Current potentially awkward but intentional functionality
>> >
>> > When you select multiple columns/rows by clicking on the header, then
>> press
>> > shift+arrow all but the last selected columns/rows are deselected
>> >
>> > Includes fixes for:
>> > RM Bug #2348 - On resize of first/any column in "Query Tool/View Data"
>> will
>> > select/deselect all the rows/columns.
>> > RM Bug #2344 - ctrl+v and ctrl+c need to work
>> >
>> >
>> > Detailed Description of Each Patch
>> >
>> > 0001-Improves-user-s-ability-to-select-cells-in-query-res.patch -
>> >
>> >   - user can select columns
>> >
>> >   - user can modify column or row selection with shift+arrow
>> >
>> >   - user can select entire grid with ctrl+A or cmd+A
>> >
>> >   - user can copy from grid using keyboard shortcuts
>> >
>> > 0002-Drag-and-select-from-data-grid.patch -
>> >
>> > 0003-Removes-checkboxes-from-the-grid.patch -
>> >
>> > -  Changes header color to grey
>> >
>> > 0004-Introduces-XCellSelectionModel.patch -
>> >
>> > - header styles depend on the selection
>> >
>> > - show the correct row/column when scrolling up or left
>> >
>> > - fixes drag and drop when drop is done outside the grid
>> >
>> >
>> > Thanks,
>> >
>> > Matt & Shruti
>> >
>> >
>> >
>> >
>> >
>> > --
>> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org
>> )
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgadmin-hackers
>> >
>>
>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The 

Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-05-23 Thread Shruti B Iyer
Hi Dave,

We see the same errors when doing *git apply* for each patch. However, if
you do *git am* for each patch, it should proceed.

Thanks,
Shruti & Matt

On Tue, May 23, 2017 at 4:55 PM, Dave Page  wrote:

> Hi!
>
> Looks great! I found a few issues which I think should be addressed
> before we continue too far. Note that I haven't reviewed the code at
> this stage:
>
> - When dragging a selection, the bounding box doesn't line up with the
> bottom of the grid rows. Note that I couldn't screen shot this
> unfortunately. It's not broken as such - just looks wrong.
>
> - If I copy one or more rows, I'm unable to paste them in as new rows
> when editing table data.
>
> - The 0004 patch doesn't apply:
>
> (pgadmin4)snake:web dpage$ git apply
> ~/Downloads/0004-Introduces-XCellSelectionModel.patch
> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:640:
> trailing whitespace.
> function scrollColumnIntoView(columnIndex) {
> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:641:
> trailing whitespace.
>   var colspan = getColspan(row, columnIndex);
> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:642:
> trailing whitespace.
>
> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:643:
> trailing whitespace.
>   var left = columnPosLeft[columnIndex],
> /Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:644:
> trailing whitespace.
> right = columnPosRight[columnIndex + (colspan > 1 ? colspan - 1 :
> 0)],
> error: patch failed: web/pgadmin/static/vendor/
> slickgrid/slick.grid.js:2794
> error: web/pgadmin/static/vendor/slickgrid/slick.grid.js: patch does not
> apply
>
> Thanks, Dave.
>
>
> On Tue, May 23, 2017 at 12:11 PM, Matthew Kleiman 
> wrote:
> > Hi Hackers!
> >
> > Attached are the updates to the query results grid, broken up into four
> > patches.
> >
> >
> > Description of the Completed Functionality After Applying All Four
> Patches
> > Currently the designed behavior is somewhere between excel like behavior
> and
> > not. As such we can describe the behavior as follows:
> >
> > Select columns by clicking on the header
> > Select rows by clicking on the row header (column 0)
> > You can drag and select with the mouse
> > You can select all with ctrl+a or by clicking the upper left cell
> > You can copy with ctrl+c or with the copy icon
> > you can increase or decrease the size of the selected area with
> shift+arrow
> > shift+arrow understands directionality, e.g. drag select from left to
> right
> > differs from drag select from right to left
> > Clicking anywhere outside of the selected area deselects the area and
> > reselects the new cell(s) clicked on
> >
> > Current potentially awkward but intentional functionality
> >
> > When you select multiple columns/rows by clicking on the header, then
> press
> > shift+arrow all but the last selected columns/rows are deselected
> >
> > Includes fixes for:
> > RM Bug #2348 - On resize of first/any column in "Query Tool/View Data"
> will
> > select/deselect all the rows/columns.
> > RM Bug #2344 - ctrl+v and ctrl+c need to work
> >
> >
> > Detailed Description of Each Patch
> >
> > 0001-Improves-user-s-ability-to-select-cells-in-query-res.patch -
> >
> >   - user can select columns
> >
> >   - user can modify column or row selection with shift+arrow
> >
> >   - user can select entire grid with ctrl+A or cmd+A
> >
> >   - user can copy from grid using keyboard shortcuts
> >
> > 0002-Drag-and-select-from-data-grid.patch -
> >
> > 0003-Removes-checkboxes-from-the-grid.patch -
> >
> > -  Changes header color to grey
> >
> > 0004-Introduces-XCellSelectionModel.patch -
> >
> > - header styles depend on the selection
> >
> > - show the correct row/column when scrolling up or left
> >
> > - fixes drag and drop when drop is done outside the grid
> >
> >
> > Thanks,
> >
> > Matt & Shruti
> >
> >
> >
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


Re: [pgadmin-hackers] [pgAdmin4][PATCH] Improvements to Query Results Grid User Experience

2017-05-23 Thread Dave Page
Hi!

Looks great! I found a few issues which I think should be addressed
before we continue too far. Note that I haven't reviewed the code at
this stage:

- When dragging a selection, the bounding box doesn't line up with the
bottom of the grid rows. Note that I couldn't screen shot this
unfortunately. It's not broken as such - just looks wrong.

- If I copy one or more rows, I'm unable to paste them in as new rows
when editing table data.

- The 0004 patch doesn't apply:

(pgadmin4)snake:web dpage$ git apply
~/Downloads/0004-Introduces-XCellSelectionModel.patch
/Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:640:
trailing whitespace.
function scrollColumnIntoView(columnIndex) {
/Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:641:
trailing whitespace.
  var colspan = getColspan(row, columnIndex);
/Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:642:
trailing whitespace.

/Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:643:
trailing whitespace.
  var left = columnPosLeft[columnIndex],
/Users/dpage/Downloads/0004-Introduces-XCellSelectionModel.patch:644:
trailing whitespace.
right = columnPosRight[columnIndex + (colspan > 1 ? colspan - 1 : 0)],
error: patch failed: web/pgadmin/static/vendor/slickgrid/slick.grid.js:2794
error: web/pgadmin/static/vendor/slickgrid/slick.grid.js: patch does not apply

Thanks, Dave.


On Tue, May 23, 2017 at 12:11 PM, Matthew Kleiman  wrote:
> Hi Hackers!
>
> Attached are the updates to the query results grid, broken up into four
> patches.
>
>
> Description of the Completed Functionality After Applying All Four Patches
> Currently the designed behavior is somewhere between excel like behavior and
> not. As such we can describe the behavior as follows:
>
> Select columns by clicking on the header
> Select rows by clicking on the row header (column 0)
> You can drag and select with the mouse
> You can select all with ctrl+a or by clicking the upper left cell
> You can copy with ctrl+c or with the copy icon
> you can increase or decrease the size of the selected area with shift+arrow
> shift+arrow understands directionality, e.g. drag select from left to right
> differs from drag select from right to left
> Clicking anywhere outside of the selected area deselects the area and
> reselects the new cell(s) clicked on
>
> Current potentially awkward but intentional functionality
>
> When you select multiple columns/rows by clicking on the header, then press
> shift+arrow all but the last selected columns/rows are deselected
>
> Includes fixes for:
> RM Bug #2348 - On resize of first/any column in "Query Tool/View Data" will
> select/deselect all the rows/columns.
> RM Bug #2344 - ctrl+v and ctrl+c need to work
>
>
> Detailed Description of Each Patch
>
> 0001-Improves-user-s-ability-to-select-cells-in-query-res.patch -
>
>   - user can select columns
>
>   - user can modify column or row selection with shift+arrow
>
>   - user can select entire grid with ctrl+A or cmd+A
>
>   - user can copy from grid using keyboard shortcuts
>
> 0002-Drag-and-select-from-data-grid.patch -
>
> 0003-Removes-checkboxes-from-the-grid.patch -
>
> -  Changes header color to grey
>
> 0004-Introduces-XCellSelectionModel.patch -
>
> - header styles depend on the selection
>
> - show the correct row/column when scrolling up or left
>
> - fixes drag and drop when drop is done outside the grid
>
>
> Thanks,
>
> Matt & Shruti
>
>
>
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



-- 
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: [pgadmin-hackers] [pgAdmin4] [PATCH] History Tab rewrite in React

2017-05-23 Thread Dave Page
On Tue, May 23, 2017 at 12:12 PM, Joao Pedro De Almeida Pereira
 wrote:
> Okay
>
> Can you try removing web/node_modules and web/yarn.lock, and running
> $ yarn install
> $ grunt tests
>
> We think this might be due to a bad version of phantomjs-prebuilt.
>
> If that still fails, can you try running grunt as "yarn run grunt tests"?

I'm on a different machine now, and here grunt just seems to never
exit when it's doing anything. For example, I ran this a few minutes
ago, it finished in seconds and has been sitting here ever since:

(pgadmin4)snake:web dpage$ grunt tests
Running "eslint:target" (eslint) task

Running "karma:unit" (karma) task

webpack: Compiled successfully.
webpack: Compiling...
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
webpack: wait until bundle finished:
(node:4902) DeprecationWarning: loaderUtils.parseQuery() received a
non-string value which can be problematic, see
https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major
version of loader-utils.
23 05 2017 16:41:54.549:WARN [karma]: No captured browser, open
http://localhost:9876/

webpack: Compiled successfully.
PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 87 of 88 (skipped 1)
SUCCESS (1.353 secs / 1.328 secs)

I'm quite unimpressed with it so far :-(

-- 
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: [pgadmin-hackers] [pgAdmin4][Patch]: Load module's JS files only when required

2017-05-23 Thread Dave Page
Hi

On Tue, May 23, 2017 at 2:45 PM, Joao Pedro De Almeida Pereira
 wrote:
> Hello
>
>
>>> I wrote few grunt tasks using r.js optimizer this weekend
>
>  How did it compare to webpack?
>
>> I am already starting to wonder if Grunt is the best way to do this
>> though. It might be easier (though not quite as efficient) to have the
>> Python module all return their static/template JS code at initialisation,
>> effectively dynamically building a single packed file containing nearly
>> everything.
>
> We could. Are you saying that the app should bundle js every run? To be
> fair, this is what we're currently doing with Grunt, but it feels like we
> should change this for non-development use.

For every non-debug run, it should check for changes in files, perhaps
by comparing the mtime of the packed file against all of the files it
would contain. However, that begs the question of what happens in an
installed instance, where the user running it likely doesn't have
permissions to re-pack the files if they're in the installation
directory. Perhaps packing should be done into a temp directory for
each user?

For debug runs, it should use the unpacked files in each module.

>> Yeah, though I think there are more considerations we haven't yet thought
>> of.
>
> Something we aren't clear on is the end-user use case of dropping modules
> into existing installations. Is this achieved via installer?

That's the intention, yes. It could be that the installer would
re-pack everything by calling a script we can supply, or the mechanism
I suggested above could handle it on next launch.

I'm actually thinking that maybe it would be easier to start with the
CSS files

-- 
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: [pgadmin-hackers] [pgAdmin4][Patch]: Load module's JS files only when required

2017-05-23 Thread Joao Pedro De Almeida Pereira
Hello


​I wrote few grunt tasks using r.js optimizer this weekend
>
>  How did it compare to webpack?

I am already starting to wonder if Grunt is the best way to do this though.
> It might be easier (though not quite as efficient) to have the Python
> module all return their static/template JS code at initialisation,
> effectively dynamically building a single packed file containing nearly
> everything.

We could. Are you saying that the app should bundle js every run? To be
fair, this is what we're currently doing with Grunt, but it feels like we
should change this for non-development use.

Yeah, though I think there are more considerations we haven't yet thought
> of.

Something we aren't clear on is the end-user use case of dropping modules
into existing installations. Is this achieved via installer?


George & Joao


On Mon, May 22, 2017 at 5:33 PM, Dave Page  wrote:

> Hi
>
> On Monday, May 22, 2017, Surinder Kumar 
> wrote:
>
>> Hi
>>
>> On Mon, May 22, 2017 at 4:22 PM, Dave Page  wrote:
>>
>>> Hi
>>>
>>> On Monday, May 22, 2017, Surinder Kumar 
>>> wrote:
>>>
 Hi

 As per pgAdmin4 design, template JS files can either be preloaded or
 load when a specific node expands (by adding for e.g.: when: 'server').

 The JS files of several modules found to be loaded when pgAdmin4 loads
 which results in increasing:

- the number of http requests
- latency(greater request time)
- pgAdmin4 load time

 *Tested on Firefox:*

 Before applying patch

- http requests - 143
- Content size - 3.4 MB
- Load time: 4.1s (onload: 524ms)

 After applying patch

- http requests: 68
- Content size: 2.1 MB
- Load time: 2.84s (onload: 481ms)

 This is great work!
>>>
>>> However (sorry!) - I'm planning on working on an alternative change on
>>> my flight in a couple of hours. Joao has broken the Grunt code out of the
>>> History tab patch for me to work with - the idea is something like:
>>>
>>> - We continue to migrate all the JS out of templates and into static
>>> files whereever possible, using the client-side translation.
>>>
>> ​Yes. It will be then easier to cover most of the JS code for minify if
>> client side ​translation is used.
>>
>
> Unfortunately, I looked at this on my flight and it looks like it'll be a
> mammoth task. Many/most JS files also currently use the url_for template
> function - so we need to figure out how to replace that with JS code first.
>
>
>>
>>> - We then have a set of Grunt tasks that will collect all the static JS,
>>> minimise it, and pack it into a single file to load at startup.
>>>
>> ​I wrote few grunt tasks using r.js optimizer this weekend which:
>>
>> 1. Finds all static JS file recursively into the modules using regex
>> pattern and then creates the tasks to minify each JS file and store its
>> 'min.js' in same directory and loads min.js when current_app.debug is False
>> else returns JS file.
>>
>
>> 2. A task to merge given list of CSS files into a single file and then
>> minify using 'grunt-contrib-cssmin' task and then insert that file with
>> 

Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4

2017-05-23 Thread Robert Eckhardt
On Tue, May 23, 2017 at 10:09 AM, Shirley Wang  wrote:

>
> It's possible to design for the range and list partitions and know we can
> achieve success because we understand how users would go through this
> workflow. Not sure about expressions.
>

Maybe to pile on this a bit.

When Shirley and I were discussing the workflows it was obvious when we
were looking at 'normal' range or list partition use cases. Generally the
only open question we had about the workflow was whether or not users would
be building tables net new or whether they were more likely to have a table
that was growing too large and therefore needed to create a new partitioned
table.

We couldn't think of a reason why a user would want to take the average of
two columns and partition by this derived value. It added to the question
of why/how a user would consider this as an idea a priori or whether this
would be an insight given analysis of existing data.

I assume this was supported for a specific use case. if you could share
that it would be awesome. I guess the long and short of it is, we are
having a difficult time imagining the workflow for this feature.

-- Rob