Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dFlwE-0004Cb-6j for pgadmin-hackers@arkaria.postgresql.org; Tue, 30 May 2017 18:32:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dFlwD-0004fi-4B for pgadmin-hackers@arkaria.postgresql.org; Tue, 30 May 2017 18:32:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dFlvy-0004Gc-4A for pgadmin-hackers@postgresql.org; Tue, 30 May 2017 18:31:58 +0000 Received: from mail-ua0-x22b.google.com ([2607:f8b0:400c:c08::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dFlvq-0007wN-3g for pgadmin-hackers@postgresql.org; Tue, 30 May 2017 18:31:56 +0000 Received: by mail-ua0-x22b.google.com with SMTP id j17so56624628uag.3 for ; Tue, 30 May 2017 11:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tY+CaAswe6dE8esL6fmj9h/hMFQlMdKyT1iuKde0IMc=; b=yBDMYIW9bznaohmYVt8/lfLsWnqi1qoqq+VYN59XOrIeBqZae9Spk4eX6jYRxqR+ZO eVsC+H5OnXa1ODSuX+eMnoCUoK8vmE2/uADmHie93+QVww+V/ocUgu+3fL5dZUP06QXF xDYbhLKbxyC+nXKrrSDojpqdR/5RbYVEGWz924XZ1JJFEySkGxhmGu57jW2ZQCmC4ADH 8c59Wx3UMo6EwXZOOd90u+GglaQZagDjzzk7BbFPrTLsciJ7Ty7q6np2i8Y7b+ZtK9xg KOkpOzuHfHhnh/mkPRk9cpoEXjXTWHpGhwZ9kkyeca+9PsxmzEhB6009uH4ReNFe+yTO xxRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=tY+CaAswe6dE8esL6fmj9h/hMFQlMdKyT1iuKde0IMc=; b=NjXJE/+s5/ms0oQIoAK4Z4oRDTacpH9qWF8t22PP1FiiKbGdIjwlLmnfa2Vw71Mqpd grK5MoKUSqllJBuXx8nF92s31r+65b8zJ9EPgimMFiABz2WZpLL02ZtVOGne9Q3UzZWS IlDV1UNw3XdRDJhxx1yMwNe9pusTMBVfBqHf78Ky9DJ3uusMeJyyFCVCISfcUCtarPpZ BHSOPwPx/k54SausbGmIUiavUoO0VqwgXGidVTt6293a1UuUDB5KV92wiwVguOncIElF Wx/HQ6H4GeubWSQ2zfcVwUbrL5HfED2doE8u6Q9kUPqfayk0JB2Ib6aDbjJKTiUo89IC QB9g== X-Gm-Message-State: AODbwcBdzkGFmoExfVIGMVp2UPMwNUw2aYmWfA4gnVUwAH+G6gFlqc0Z XZYCOw282LqsuLUUx5zQRyNaJbWLr2lT X-Received: by 10.176.23.227 with SMTP id p35mr9229919uaf.155.1496169108214; Tue, 30 May 2017 11:31:48 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.47.13 with HTTP; Tue, 30 May 2017 11:31:07 -0700 (PDT) In-Reply-To: References: From: Joao Pedro De Almeida Pereira Date: Tue, 30 May 2017 14:31:07 -0400 Message-ID: Subject: Re: [pgAdmin4] [PATCH] History Tab rewrite in React To: Dave Page Cc: Matthew Kleiman , Murtuza Zabuawala , pgadmin-hackers Content-Type: multipart/alternative; boundary="f403043ef8903835920550c2040e" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --f403043ef8903835920550c2040e Content-Type: text/plain; charset="UTF-8" > > 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? 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 wrote: > Hi > > On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman > 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 > --f403043ef8903835920550c2040e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The motivation is simple - we want a solution that= works for the whole
app, can ha= ndle 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.
<= br>
The installer should pick up only the bundled Javascript and = should install it in the correct folders, this way there is no need to rewr= ite or process files in read-only directories of the end user machine.

Per the other thread on the subject (that Joao sugg= ested continuing
discussion on),= Surinder is currently looking into flask-webpack. I
spent some time playing with grunt and some other opt= ions last week.
We should continue the discussion a= bout 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.<= /div>
If we remove Grunt from this patch we will need to execute the fo= llowing command every time the application run:

yarn run eslint pgadmin/static/jsx/**/*.j= sx pgadmin/static/js/selection/*.js regression/javascript/**/*.jsx regressi= on/javascript/**/*.js *.js=C2=A0&& yarn run webpack -- --config web= pack.config.js && python web/pgAdmin4

An= d to run the jasmine tests:

yarn run eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/select= ion/*.js regression/javascript/**/*.jsx regression/javascript/**/*.js *.js= =C2=A0&&=C2=A0yarn run k= arma start

And to run the featur= e tests:

yarn ru= n eslint pgadmin/static/jsx/**/*.jsx pgadmin/static/js/selection/*.js regre= ssion/javascript/**/*.jsx regression/javascript/**/*.js *.js=C2=A0&&= ; yarn run webpack= =C2=A0-- --config=C2=A0webpack.c= onfig.js && python runtests.py

Is this a solution that is acceptable?=C2=A0

However; this patch is supposed to be about the history tab rew= rite.
Whatever solution we use f= or webpacking/transpiling/linting/minifying
etc, it should be a standalone change as it's decidedly non-tr= ivial.
We split this patch into 2 different commits= :
1 - Add React and all the tools needed to work with it, this in= cludes Grunt, Webpack and ESLint
2 - Change the history tab
=

Do you want a single commit for each of the following?= =C2=A0
=C2=A0 React (just adds the React library via yarn)
<= div>=C2=A0 Webpack (adds Webpack library via yarn and creates the webpack.c= onfig.js)
=C2=A0 ESLint (adds ESLint library via yarn, creates .e= slintrc config file, and corrects all lint errors that previously existed)<= /div>
=C2=A0 Grunt (adds Grunt library via yarn and creates Gruntfile.j= s config, creating a pipeline of the previous three libraries/tasks)
<= div>=C2=A0 Our change to History

Thanks
= Joao & Matt=C2=A0

On Tue, May 30, 2017 at 10:10 AM, Dave Page <dpage@pgadmi= n.org> wrote:
Hi

On Tue, May 30, 2017 at 2:47 PM, Matthew Kleiman <mkleiman@pivotal.io> 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 inste= ad 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 who= le
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<= br> 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

--f403043ef8903835920550c2040e--