public inbox for [email protected]  
help / color / mirror / Atom feed
From: Matthew Kleiman <[email protected]>
To: Surinder Kumar <[email protected]>
Cc: Joao Pedro De Almeida Pereira <[email protected]>
Cc: Dave Page <[email protected]>
Cc: Murtuza Zabuawala <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4] [PATCH] History Tab rewrite in React
Date: Wed, 31 May 2017 16:29:35 -0400
Message-ID: <CAFS4TJZtCDqoenHREPC7PEopwYVyPGUh0_9WtxQKNV2w_WLAjw@mail.gmail.com> (raw)
In-Reply-To: <CAM5-9D-wS-9qwMwvpUCwc8s=KumY+k8pkM7tOt1eysuFvq3n-w@mail.gmail.com>
References: <CAFS4TJYDRi6fs+wrhkj89gFe3xaFOkoApCK+AU2O4DfU2XfXog@mail.gmail.com>
	<CAKKotZQSTtJVkBKMeFi9vTrPugBEbEE38dhbbn-hr+hpd0Qzbw@mail.gmail.com>
	<CA+OCxowChMtZzaSwrG5Sganh4LiMQcgL7BpoqhTxZga30DqDXw@mail.gmail.com>
	<CAKKotZRmvbScMdUtjMgUJdRe-EXaqDoDbYBxrMZrkbVDVR_iUg@mail.gmail.com>
	<CA+OCxow3e=q9w_e=Kkw1ebZJ82EM8RyFmiTaXihdqhX6HbzZhw@mail.gmail.com>
	<CAFS4TJapVubRP_BK01GwYjfN7zpaTbCMX+CROC4mV93aL08DOg@mail.gmail.com>
	<CA+OCxozPDpP_5zdLjOSQhiGHgzE-QDsFv8-WyC8-XTxf5+uSJg@mail.gmail.com>
	<CAE+jjakzXbzvtai0Z2q0bXfecMhDzZwtn+p8mQwV7kfRGPON_Q@mail.gmail.com>
	<CA+OCxoxkM--KjFWt7FkJm+mrL5sA9jdZ59YN7=n=2ZMrkH8iSg@mail.gmail.com>
	<CAFS4TJaZA0U_BtiUBdx1jT6Z5bQzMQbjhwrjimDLgfkTb=gWJg@mail.gmail.com>
	<CAE+jjakrsf7f41LyCy6BWvjrsH9FyKK98koO0MgUkR0qmbk-uw@mail.gmail.com>
	<CA+OCxoxH+5gAjw17rWQb-jqNBeQGgOs4Q=GZ7KEwdmGHOQrsBw@mail.gmail.com>
	<CAHowoHZJtKn8F9XuiK2yFT=_OcgG7Ctx83iiFab17PwexajfDQ@mail.gmail.com>
	<CA+OCxozz7pbMQi_h-USovgwA2XkVzpeAUuK-zcro4La-_KjgtA@mail.gmail.com>
	<CAFS4TJYRuaRkHguU_BkMAa4vv7Xy_aa37B4M4HSbJ0h2QpmcFA@mail.gmail.com>
	<CA+OCxozdD8_4uyu9f+CJTjtH0x8bcKoeNMtRDcSHXSKStAPwbQ@mail.gmail.com>
	<CAE+jjakmryMDovhh+OMsw=FSTj5W62CuhbdQS4WpjcLSs9jO4g@mail.gmail.com>
	<CAM5-9D-wS-9qwMwvpUCwc8s=KumY+k8pkM7tOt1eysuFvq3n-w@mail.gmail.com>
List-Unsubscribe:  <mailto:[email protected]?body=unsub%20pgadmin-hackers>

Hey Surinder,

Is it possible to run the task listed above by configuring them in
> "scripts" in package.json file and running concurrently ?


That would be cleaner than what we proposed. We could use the yarn run
<https://yarnpkg.com/lang/en/docs/cli/run/; feature to do just what you are
suggesting. It works the same as in npm.
Something like the following:
In package.json -
"scripts": {
  "linter": "eslint pgadmin/static/jsx/**/*.jsx
pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx
regression/javascript/**/*.js *.js"
}

To call it on the command line -
yarn run linter

- Matt

On Wed, May 31, 2017 at 12:35 AM, Surinder Kumar <
[email protected]> wrote:

> On Wed, May 31, 2017 at 12:01 AM, Joao Pedro De Almeida Pereira <
> [email protected]> wrote:
>
>> The motivation is simple - we want a solution that works for the whole
>>> app, can handle debug vs. release execution, pluggable modules, and
>>> installations in read-only directories.
>>
>> With the current configuration of Grunt, all the requirements you mention
>> are available.
>> The tasks on Grunt should only be run under development or before we are
>> creating the installer.
>>
>
>
>> The installer should pick up only the bundled Javascript and should
>> install it in the correct folders, this way there is no need to rewrite or
>> process files in read-only directories of the end user machine.
>>
>> Per the other thread on the subject (that Joao suggested continuing
>>> discussion on), Surinder is currently looking into flask-webpack. I
>>> spent some time playing with grunt and some other options last week.
>>
>> We should continue the discussion about flask-webpack or Grunt or any
>> other Build system in the other thread, but we need to have some decision
>> because this patch needs a build system.
>> If we remove Grunt from this patch we will need to execute the following
>> command every time the application run:
>>
>> yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js
>> regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn
>> run webpack -- --config webpack.config.js && python web/pgAdmin4
>>
>> And to run the jasmine tests:
>>
>> yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js
>> regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn
>> run karma start
>>
>> And to run the feature tests:
>>
>> yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js
>> regression/javascript/**/*.jsx regression/javascript/**/*.js *.js && yarn
>> run webpack -- --config webpack.config.js && python runtests.py
>>
>> Is this a solution that is acceptable?
>>
>
> As per my knowledge, Grunt can run the tasks and bundle the JS and CSS
> files (using r.js which is not preferred). But Webpack can not do both. It
> can only bundle files, it has to be used with either Grunt or Gulp to
> execute tasks.
>
> Is it possible to run the task listed above by configuring them in
> "scripts" in package.json file and running concurrently ?
>
> scripts: {
>  "task-name1": "yarn run eslint filename",
> ​ ​
> "task-name2": "yarn run karma start", so on...
> }
>
> and run them using following command:
> npm run task-name1
>
>
>>
>> However; this patch is supposed to be about the history tab rewrite.
>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>
>> We split this patch into 2 different commits:
>> 1 - Add React and all the tools needed to work with it, this includes
>> Grunt, Webpack and ESLint
>> 2 - Change the history tab
>>
>> Do you want a single commit for each of the following?
>>   React (just adds the React library via yarn)
>>   Webpack (adds Webpack library via yarn and creates the
>> webpack.config.js)
>>   ESLint (adds ESLint library via yarn, creates .eslintrc config file,
>> and corrects all lint errors that previously existed)
>>   Grunt (adds Grunt library via yarn and creates Gruntfile.js config,
>> creating a pipeline of the previous three libraries/tasks)
>>   Our change to History
>>
>> Thanks
>> Joao & Matt
>>
>> On Tue, May 30, 2017 at 10:10 AM, Dave Page <[email protected]> wrote:
>>
>>> Hi
>>>
>>> On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <[email protected]>
>>> wrote:
>>> > Hi Dave,
>>> >
>>> > We are currently using the Grunt taskrunner to run the following tasks:
>>> >
>>> > lint the javascript code
>>> > start javascript tests
>>> > invoke webpack to transpile and bundle js and jsx files
>>> > minify javascript
>>> >
>>> > In order to remove Grunt from the application, we will need some other
>>> tool
>>> > to execute these listed tasks.
>>> >
>>> > There are other tools available, like Gulp.js, that we could use
>>> instead of
>>> > Grunt. We would like to understand your motivation for removing Grunt
>>> so we
>>> > can find a better solution.
>>>
>>> The motivation is simple - we want a solution that works for the whole
>>> app, can handle debug vs. release execution, pluggable modules, and
>>> installations in read-only directories.
>>>
>>> Per the other thread on the subject (that Joao suggested continuing
>>> discussion on), Surinder is currently looking into flask-webpack. I
>>> spent some time playing with grunt and some other options last week.
>>>
>>> However; this patch is supposed to be about the history tab rewrite.
>>> Whatever solution we use for webpacking/transpiling/linting/minifying
>>> etc, it should be a standalone change as it's decidedly non-trivial.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>


view thread (45+ 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], [email protected], [email protected], [email protected]
  Subject: Re: [pgAdmin4] [PATCH] History Tab rewrite in React
  In-Reply-To: <CAFS4TJZtCDqoenHREPC7PEopwYVyPGUh0_9WtxQKNV2w_WLAjw@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