Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6gDi-00016b-8G for pgadmin-hackers@arkaria.postgresql.org; Fri, 05 May 2017 16:36:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d6gDh-0003NV-9M for pgadmin-hackers@arkaria.postgresql.org; Fri, 05 May 2017 16:36:41 +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 1d6gDS-0002yr-Sm for pgadmin-hackers@postgresql.org; Fri, 05 May 2017 16:36:27 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d6gDP-0005x9-9D for pgadmin-hackers@postgresql.org; Fri, 05 May 2017 16:36:25 +0000 Received: by mail-wm0-x22d.google.com with SMTP id w64so28678627wma.0 for ; Fri, 05 May 2017 09:36:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NZdnewrPv/vWX6ehk4s0UNQa2WGlyev78RuJwHJNjZw=; b=FwumcSacjOCxt+fyn4m3A6pD3Fjd5IiLMq1Eoug0zjDX4P/zvs/6ZZQK6TaeD9ZAdP 2LXyauUSYWhZzalZOoR7dVsvjgCCgjPaMvTMXCARVR8Z8P1hLWB1XOrT1kD+MPJAZYD/ pI+lct2VhTQTg6jUgpYQImZLacnhACSZkDSrvkmMtPMmCiUqVlmMHeW5yXD/oidx/3Xn 6Dt3Ql8/+MfP1/84zeS6I20EJDx1PTLI/MqO+DqNoGHusUDas5XGTaQ7N9RgRuQf4PNA hiC4yPbvmbtn9xlotwz3c7mOHvY6xAdOVbJ4wC/5J9rqncXuoV5bp5E0uDd88t/CKt4g 7hig== 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=NZdnewrPv/vWX6ehk4s0UNQa2WGlyev78RuJwHJNjZw=; b=pNw1yeBbfxvM0hfepp8bBOTmcrPAFRUo6lKeS4s0KxgvF/AF9WmXSt4OKgE0ZTepRm tqII2eGpjuYdeRoKKAdkgx1Us0FH3EuvPqPQVtSmlVi66Hpuie/54lIYjMOpCFrwsDaY PR5HQQElt4ZwG2141R4zeCRLS0LZZKJ9otZJ/gsm4gwiMG8NRbQd2KfH0fUS4Din8d69 EulEM6XoluNeO5dtL4w4KvqtyyEmaN05C3KAZwUaxbpqlfREZwPBpOYkr0C4Gs2EYwmi 1V8CTXUGjh6RnnwE9w/9XHL0610Dv43GBeny9dGPZU5W2OdSMcRrTZUYWyq5hI25J1Fn 77jA== X-Gm-Message-State: AODbwcA6q8REDo1Ql+fOJyy2IDLUIx3+lCbmT+wfx50XQks3XBGk0W7T eJqwu8Oq8yXnLyiRn+ac7LdVY+h0ZuEI X-Received: by 10.28.167.3 with SMTP id q3mr6169657wme.134.1494002181341; Fri, 05 May 2017 09:36:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.136.70 with HTTP; Fri, 5 May 2017 09:36:00 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Fri, 5 May 2017 22:06:00 +0530 Message-ID: Subject: Re: [pgAdmin4][PATCH] SlickGrid column resize triggers column select To: Sarah McAlear Cc: Ashesh Vashi , pgadmin-hackers , Matthew Kleiman Content-Type: multipart/alternative; boundary=001a114ba6045031ae054ec97d2d X-Pg-Spam-Score: -2.6 (--) 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 --001a114ba6045031ae054ec97d2d Content-Type: text/plain; charset=UTF-8 Sure. --Murtuza On Fri, May 5, 2017 at 8:55 PM, Sarah McAlear wrote: > Hi Murtuza and Ashesh! > > We are currently working on a number of features related to the query > results grid. Some of the changes we are working on is that the checkboxes > are going away. The implementation of this patch will have to change based > on this. We noticed that 5 Javascript Tests are failing, in part because > this patch introduces a new bug with the selection of rows. > > Replication steps: > - select a column > - select a row > > Now notice that the checkbox for the column is still checked, even though > the column's cells are no longer selected. > > One of the tests that was failing was covering this behavior. > Unfortunately there was a typo in the naming of the test (it originally was > called "ColumnSelector selecting columns when a row is selected deselects > the row" but should have been called "ColumnSelector selecting columns when > a row is selected deselects the *column*"), but we have copied it with > the correct naming below: > > describe("when a row is selected", function () { > beforeEach(function () { > var selectedRanges = [new Slick.Range(0, 0, 0, 1)]; > rowSelectionModel.setSelectedRanges(selectedRanges); > }); > > it("deselects the column", function () { > container.find('.slick-header-column')[1].click(); > var selectedRanges = rowSelectionModel.getSelectedRanges(); > > expect(selectedRanges.length).toBe(1); > > var column = selectedRanges[0]; > > expect(column.fromCell).toBe(1); > expect(column.toCell).toBe(1); > expect(column.fromRow).toBe(0); > expect(column.toRow).toBe(9); > }) > }); > > > > Since we are finishing up this feature anyway, if this bug can wait > another week, we can take it into our backlog and address it and submit the > fix with our next patch. > > > Thanks! > Matt & Sarah > > On Fri, May 5, 2017 at 5:54 AM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi, >> >> PFA patch to fix the issue where in SlickGrid column resize also triggers >> 'onHeaderClick' event and triggers column selection, In this >> scenario before drag event which column is under mouse gets selected, So to >> fix the issue we will check if header checkbox is clicked. >> RM#2348 >> >> Please review. >> >> -- >> Regards, >> Murtuza Zabuawala >> EnterpriseDB: 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 >> >> > --001a114ba6045031ae054ec97d2d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sure.

--Murtuza

On Fri, May 5, 2017 at 8:55 PM, Sarah McAlear <sm= calear@pivotal.io> wrote:
Hi Murtuza and Ashesh!
We are currently working on a number of features related to= the query results grid. Some of the changes we are working on is that the = checkboxes are going away. The implementation of this patch will have to ch= ange based on this. We noticed that 5 Javascript Tests are failing, in part= because this patch introduces a new bug with the selection of rows.
<= div>
Replication steps:
- select a column
- select a row

Now notice that the checkbox for t= he column is still checked, even though the column's cells are no longe= r selected.

One of the tests that was failing was = covering this behavior. Unfortunately there was a typo in the naming of the= test (it originally was called "ColumnSelector selecting columns when= a row is selected deselects the row" but should have been called &quo= t;ColumnSelector selecting columns when a row is selected deselects the = column"), but we have copied it with the correct naming below:
describe(<=
span style=3D"color:rgb(106,135,89)">"when a row is selected", function () {
beforeEach(function () {
var selectedRanges =3D [new Slick.Range(0, 0, 0, 1)];
rowSelectionModel.setSe= lectedRanges(selectedRanges);
});

it(&qu= ot;deselects the column",= function () {
container.find('.slick-header-column'= )[1].click();=
var selectedRanges =3D rowSe= lectionModel.getSelectedRanges<= /span>();

<= /span>expect(selectedRanges.<= span style=3D"color:rgb(152,118,170)">length).toBe(1<= /span>);

var colu= mn =3D selectedRanges[0];

expect(column.fromCell).to= Be(1);
expect(column.toCell
).toBe(1= );
expect(column.fromRow).toBe(0);
expect(column.toRow).toBe(9);
})
});


Since we= are finishing up this feature anyway, if this bug can wait another week, w= e can take it into our backlog and address it and submit the fix with our n= ext patch.=C2=A0


Thanks!
Matt &a= mp; Sarah

On Fri, May 5, 2017 at 5:54 AM, Murtuza Zabuawala <= ;mu= rtuza.zabuawala@enterprisedb.com> wrote:
Hi,

PFA patch to fix= the issue where in SlickGrid column resize also triggers 'onHeaderClic= k' event and triggers column selection, In this scenario=C2=A0before dr= ag event which column is under mouse gets selected, So to fix the issue we = will check if header checkbox is clicked.
RM#2348

<= /div>
Please review.

--Regards,


--
Sent via pgadmin-hackers mailing list (
pgadmin-hackers@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-ha= ckers



--001a114ba6045031ae054ec97d2d--