Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkiaG-0000Np-3b for pgadmin-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 06:59:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkiaE-0006Id-Na for pgadmin-hackers@arkaria.postgresql.org; Thu, 03 Dec 2020 06:59:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkiaE-0006IW-Do for pgadmin-hackers@lists.postgresql.org; Thu, 03 Dec 2020 06:59:18 +0000 Received: from mail-qt1-x831.google.com ([2607:f8b0:4864:20::831]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kkiaB-0001fk-7t for pgadmin-hackers@lists.postgresql.org; Thu, 03 Dec 2020 06:59:16 +0000 Received: by mail-qt1-x831.google.com with SMTP id r6so701972qtm.3 for ; Wed, 02 Dec 2020 22:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mQciIRSIGXT8IezcmH/3n0NKjYA086OFK7RwQWKqEmk=; b=zoLH5nCpDZUdqmPbCNMNIG9WULFkwMlofwNaPVxdKvIu/FG1zfSdrNESu15py68keB Ii9uEq1iF3q7YD51jJcEAXe0DhTmNPwwuqm49xYF2q2SHE23/kynnDzEjA5Kvm8MLqg/ +oxqlUhhw6vB2xc1jB79UamBTapxuDm3B18xS77dRCZjtiVeBhb6x5fJgFpQbCkRXu4i QRAL2bvZ7KDVdEl5DcOGDNDVy8UurTGaB9rf2qcGec7UzV5hMgRDb5Wx2iYIfGgpiK9z FXzTdotuNNjVY3klnVkkO/MfsC7ezI57WaPn0W1rsxOcK0j8rYS5turzTRpNUvwJDSOZ wOGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mQciIRSIGXT8IezcmH/3n0NKjYA086OFK7RwQWKqEmk=; b=KCNOUrGckAsuRz6BvLn72nehxAKWIEcjIxmBZMW9/K5fG8rPQGvJ3W0j90nqRkqX7i qtle1mt4WMxHr/21NKBFhGn4GiFiQaRwm/0TwdGZ5gHSJaFPxKJx/qrGHXn41J0TVUiL JWktLFBlM4J0ccfxY8Hmu+lFDYHUNbJBEDEtTj8fKNrwHFXOTVv87fvG82TBPwtsPUp3 THQypycrufT6MUHB8xBXahwkQxk5wN31Y8cBDfhZxoqd7TF1sZTT8nUVWaC8inc277R6 9OaB1gIIqecXFdKnuYl9kTyFOP201uJkElW+AP4T72DaHuhv7kgr61otIszL+dhaI3OJ LSyg== X-Gm-Message-State: AOAM531c0KYMk6Lxj0rEuqnkPD33/bcjMO7FlKAmBkFpo/hQ8Kol/6hT NRBn3tSkVFs7vCdJcjEvO4hezx0BDio646z852iJPg56xaaZ6adiBbfcVdAtyGQgYfQza2VPOEq ptVJfimJuBBYvJna4RfvO6IWnZhNoai47VYF24+F7LVPIs6Lhcis8qFp2HWTDUo57zp1VVLt3nU BmE2oxbPJf8nML8U8sjP35/tdKMkenBTDf4lujGD/hgiWj4YPueIlsw+RSfK6Qc++7fehrdKNrH Q== X-Google-Smtp-Source: ABdhPJzLqS8NqqszSoi6S6aFb/TeCN74/AaMZyIJPcnE1U//SnCg9D+FE2H9mqrsxeZT1HG8g/FwCtV9b/agVy3xQ5U= X-Received: by 2002:ac8:1482:: with SMTP id l2mr1942255qtj.377.1606978753894; Wed, 02 Dec 2020 22:59:13 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rahul Shirsat Date: Thu, 3 Dec 2020 12:28:37 +0530 Message-ID: Subject: Re: pgAdmin 4 commit: Fixed an issue where the validation error message is To: Murtuza Zabuawala Cc: Akshay Joshi , pgadmin-hackers , Dave Page Content-Type: multipart/alternative; boundary="000000000000c9b95305b589e562" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000c9b95305b589e562 Content-Type: text/plain; charset="UTF-8" On Thu, Dec 3, 2020 at 11:18 AM Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hello, > > Another observation, > > + if(msg && handler) { > + msg = msg || _.values(handler.errorModel.attributes)[0]; > + > + handler.trigger('pgadmin-session:model:invalid', msg, handler); > + $(parentTr).addClass('error-in-grid'); > + } > + return this; > + }, 120); > + }, > > Here we are only making the model invalid, there is no logic to make it > valid again. > If there are multiple model errors in the list, and if user changes any of them, it used to clear every other invalid models in the list. To avoid this to happen, only invalid models are highlighted, rest others are taken care of by the child valid events running in parallel. > > > > On Thu, Dec 3, 2020 at 11:09 AM Murtuza Zabuawala < > murtuza.zabuawala@enterprisedb.com> wrote: > >> Hello, >> >> What is the reason for adding delay *setTimeout(, 120)*? >> >> This is causing issues in automation testing and makes buttons >> enable/disable with slight delay. >> >> Timeout was added for the reason that, even if the current changed model is valid, it should also check the rest of the invalid models in the list. Slight delay was added, so even if the current model becomes valid, it should highlight the invalid one iterating over the inner model list. > -- >> Regards, >> Murtuza Zabuawala >> *EDB* >> *POWER TO POSTGRES* >> https://www.edbpostgres.com >> >> >> On Fri, Oct 30, 2020 at 3:10 PM Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> Fixed an issue where the validation error message is shown twice. Fixes >>> #5736 >>> >>> Branch >>> ------ >>> master >>> >>> Details >>> ------- >>> >>> https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=183c83f0d2b2cb8dd33f9e8c41a030bc4cdaa4b2 >>> Author: Rahul Shirsat >>> >>> Modified Files >>> -------------- >>> docs/en_US/release_notes_4_28.rst | 1 + >>> web/pgadmin/browser/static/js/datamodel.js | 75 >>> +++++++++++++++++++++++++++++- >>> web/pgadmin/static/js/backform.pgadmin.js | 24 ++++------ >>> web/pgadmin/static/scss/_alert.scss | 6 +++ >>> 4 files changed, 90 insertions(+), 16 deletions(-) >>> >>> -- *Rahul Shirsat* Software Engineer | EnterpriseDB Corporation. --000000000000c9b95305b589e562 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Dec 3, 2020 at 11:18 AM Murtu= za Zabuawala <murt= uza.zabuawala@enterprisedb.com> wrote:
<= font size=3D"2">Hello,

Another observation,

+=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0if(msg=C2=A0&&=C2=A0handler)=C2=A0{
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0msg=C2=A0= =3D=C2=A0msg=C2=A0||=C2=A0_.values(handler.errorModel.attributes)[0];
=
+
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0han= dler.trigger('pgadmin-session:model:invalid',=C2=A0msg,=C2=A0handle= r);
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0$(p= arentTr).addClass('error-in-grid');
+=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0}
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0return=C2=A0this;
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0}= ,=C2=A0120);
+=C2=A0=C2=A0=C2=A0=C2=A0},

Here we are= only making the model invalid, there is no logic to make it valid again.
=C2=A0
=C2=A0If there are= multiple model errors in the list, and if user changes any of them, it use= d to clear every other=C2=A0invalid models in the list. To avoid this to ha= ppen, only=C2=A0invalid models are highlighted, rest others=C2=A0are taken = care of by the child valid events running in parallel.



On Thu, Dec 3, 2020 at 11:09 AM Murtuza Zabuawala <murtuza.za= buawala@enterprisedb.com> wrote:
Hello,

What is the reason for adding delay=C2= =A0setTimeout(<func>, 120)?

This is causing issues in automation = testing and makes buttons enable/disable with slight delay.

=C2=A0 =C2=A0 =C2=A0Timeout w= as added for the reason that, even if the current changed model is valid, i= t should also check the rest of the invalid models in the list. Slight dela= y was added, so even if the current model becomes valid, it should highligh= t the invalid one iterating over the inner model list.
--Regards,
Murtuza Zabuawala
EDB
POWER TO POSTGRES
=


On Fri, Oct 30, 2020 at 3:10 PM Aks= hay Joshi <akshay.joshi@enterprisedb.com> wrote:
Fixed an issue where the validation erro= r message is shown twice. Fixes #5736

Branch
------
master

Details
-------
https://git.postgresql.org/gitweb?p=3Dpgadmin4.git;a=3Dcommitdi= ff;h=3D183c83f0d2b2cb8dd33f9e8c41a030bc4cdaa4b2
Author: Rahul Shirsat <rahul.shirsat@enterprisedb.com>

Modified Files
--------------
docs/en_US/release_notes_4_28.rst=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0= 1 +
web/pgadmin/browser/static/js/datamodel.js | 75 +++++++++++++++++++++++++++= ++-
web/pgadmin/static/js/backform.pgadmin.js=C2=A0 | 24 ++++------
web/pgadmin/static/scss/_alert.scss=C2=A0 =C2=A0 =C2=A0 =C2=A0 |=C2=A0 6 ++= +
4 files changed, 90 insertions(+), 16 deletions(-)



--
Rahul Shirsat
Software Engineer=C2=A0|=C2=A0EnterpriseDB=C2=A0Corporation.=
--000000000000c9b95305b589e562--