Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOdQU-000LaE-KF for pgadmin-support@arkaria.postgresql.org; Tue, 02 Jul 2024 13:20:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sOdQS-001uwY-Bi for pgadmin-support@arkaria.postgresql.org; Tue, 02 Jul 2024 13:20:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOcRC-001S3s-Hu; Tue, 02 Jul 2024 12:16:47 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sOcR9-00023u-GA; Tue, 02 Jul 2024 12:16:45 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-64b5617ba47so33602157b3.3; Tue, 02 Jul 2024 05:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719922603; x=1720527403; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4Ovqvl/K/Q1xZ3PRLueJcADqyvnQStJHygFSN0UC2Fw=; b=MJTtyfwmjibrphlS859Ia3ZugDfBti086UFhtSAcdqFcc5N1rB66JUY2nPjN9vFtLo WkMx8grmr9ML1vTzEKdD+0169E0iIHMmRaOfP7DTelHOMjGSevWCPYf9gsRN7Tpz0/YZ qC3IABe8nxQ9LSOoLgAfX5uTxl80J7KHPm0ODBvW5wqhzdBLWL1iBUX1A5SSXbT5pXrB XvFL39DOM+KmbD7fdGzyuX85YKZU69xEthi4WRb3wchXGDW++n+zvtTPBH54UiFFOP+k WQDkSt0Ci9nFL3MAEba2N40WT2APqKYSvltTXx74jQjqcmzVH5lBBfxOrgtcLgMdfIDF r1xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719922603; x=1720527403; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4Ovqvl/K/Q1xZ3PRLueJcADqyvnQStJHygFSN0UC2Fw=; b=kl+8SbKZTHyyd+EY3U5OZIL4DLlnuy8JHsEFtk2IAEfY9WvQ8UUwkyfEViVskcp6f2 HpakEzXyQCerTdxJh88d0P58iM9ZvD0YbQZfdFS277OsM8x952AZQK6dpjds52JslX5Y 0b8sMweOQMvbMFlx2ENYAcPaC7gJCcoYkuLweR8/wmTHwy3ypJQGkZ6nUMEQarJ54J/c C5NO5dFf3pqyfamJAinMP2m6sMl0JH1tR/ZjAEbQlkPdg10LII+ttHCT09G9Kz0kdHjT 5DaYx2MEN97vBdxp0aTb+1TfW63GWyrn4WnO7kc1vfl1A//bBQewjlcp7HJu1kuYbvVC neyQ== X-Forwarded-Encrypted: i=1; AJvYcCWPSU2El2GsSZj3vjvvpnZXyCiPxlDG4l+Bv51zpJUk6X19IfFpAUO6uHYgnOk1+6vRU6SgHx6IFGHlS65/FcShCO7vT6xzn7YUyuXMzjY/g/kDjtvb5EUK4r6FSclLhH1tIGMCkbJamxQWhrJ2gA== X-Gm-Message-State: AOJu0YxPaZZCcIM00GGTQGSpArVPGlvuqlQuPpgvCupSXrSuK9+6aKc8 enZmzDnZ4kC+iO8UuTlZDrXsvcsYhxCnJt9vbFz6MoxtryAo9ee9EPnZKK4E9vWg3rpEccQzood DBmvWhUke8RJBBNEKxFY/RwHOOSA= X-Google-Smtp-Source: AGHT+IHBApl1f/dIRq0RW860VNpxVlYUqOEzr+pnv1bNz6A6cOwNf7u9uTlp+u6RuK5A6PyeF0fAPKTzjHj2kCk7NMU= X-Received: by 2002:a81:7c46:0:b0:632:7161:d16c with SMTP id 00721157ae682-64c71ec64d5mr80523057b3.28.1719922602467; Tue, 02 Jul 2024 05:16:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Caughey Date: Tue, 2 Jul 2024 08:16:16 -0400 Message-ID: Subject: Re: Query tool data grid - Infinite scroll vs Pagination To: Usman Khan Cc: Aditya Toshniwal , pgAdmin Support , pgadmin-hackers , Dave Page Content-Type: multipart/alternative; boundary="000000000000c2eb2c061c42afab" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000c2eb2c061c42afab Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think there's a nice blend between pagination and infinite scrolling. The problem with the *current *infinite scrolling implementation is that the scroll baris scaled to the number of *rendered* rows, so as you scroll down (which renders another bunch of records), it keeps rescaling the scrollbar, so to get the next "page", you have to continually move to the scrollbar (as Aditya says, "*Many users who want access in between rows or last row struggle to do it as the user has to scroll and scroll.*") If instead the scrollbar were scaled to the total number of rows, (e.g., 1000 rather than the initial 25 rows that were rendered), then clicking (say) in the lower third of the scrollbar would would do enough fetching/rendering to display rows 601-625 (or such). Problem solved. Alternatively (or additionally), provide a "jump to row..." button (similar to what Usman is suggesting re pagination) that gives the user control to see a specific bunch of records quickly. But if the issue is that people don't like infinite scrolling because "the user has to scroll and scroll", then fix that specific UE issue, and people will be happy. The concern I have with a paginated solution is if the page represents the maximum number of rows rendered in the results pane, at any one time. Assume I can see 25 rows in the result pane. I.e., you show rows 1-25 for the first page, then you *only *show rows 26-50 for the second page, then *= only *show rows 27-50, etc. But when there is a cluster of records of interest between rows 640 and 655, then those records of interest are going to be spread between pages 25 and 26, and will constantly require flipping back and forth between pages. This would be possibly worse UE than the current "user has to scroll and scroll" issue. On the other hand, if your pagination solution includes letting someone nudge the rendered rows up or down a bit so that I can see rows 640-655 all at once (e.g., there's a field where I can type in that the current page should start at row 635, so I can see rows 640-655 all together), then I'm fine with that. However, if ultimately you decide to toss out infinite scrolling for pagination, then please make the (default?) page size be the number of rows you can actually see in the result pane, rather than some arbitrary number (e.g., 50). Having the page size equal to the number of rendered rows means I can quickly step through the pages and hopefully notice a record of interest.... If the page size is larger than the number of rendered rows, then as I step to the next page I *still *have to scroll down to see the last few rows, then step to the next page, then scroll down again, I.e., that would be hideous UE! So my vote preferences are: First choice: keep infinite scrolling, but simply fix the scrollbar scaling and/or give the user the means to quickly jump down by a page or to a specific page Second choice: use pagination, but *only *if there's the ability to see a specific chunk of records on a single page (rather than spread across two), and make the pagination size default to the number of records visible given the height of the result pane Cheers, Dave On Mon, 1 Jul 2024 at 04:35, Usman Khan wrote: > Hi Aditya > I vote for pagination, it would really be helpful for end users. > In addition to giving the user the ability to set page size, if he can > also select or enter what page he can jump to say 501, 990 etc it would b= e > helpful. > > On Fri, Jun 28, 2024 at 3:44=E2=80=AFPM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi, >> >> Unfortunately, there were only 3 responses to this. >> In that case, we will discuss internally and decide what to do. >> >> On Thu, Jun 20, 2024 at 2:46=E2=80=AFPM Aditya Toshniwal < >> aditya.toshniwal@enterprisedb.com> wrote: >> >>> Hi Everyone, >>> >>> Request you to share your opinion on this and respond on: >>> >>> https://docs.google.com/forms/d/e/1FAIpQLSdfJhNK8qXSe9mKcubZa8jjjYl0hiZ= Vxhv6GGJo8WJcYc27ug/viewform?usp=3Dsharing >>> >>> On Thu, Jun 20, 2024 at 1:36=E2=80=AFPM Dave Page w= rote: >>> >>>> Hi >>>> >>>> On Wed, 19 Jun 2024 at 13:42, Aditya Toshniwal < >>>> aditya.toshniwal@enterprisedb.com> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Query tool data grid currently pulls the data on load basis in >>>>> batches. For example, it will initially load only 1000 rows and once = a user >>>>> scrolls to the 1000th row, it will fetch the next batch of 1000. >>>>> Many users who want access in between rows or last row struggle to do >>>>> it as the user has to scroll and scroll. If someone grabs the scrolle= r and >>>>> pulls it down still it will be a good UX and the scrollbar may jump. = One >>>>> reported here - https://github.com/pgadmin-org/pgadmin4/issues/1780 >>>>> One more aspect to this is the in memory data of the query tool which >>>>> keep on increasing on each scroll, it affects the performance. >>>>> >>>>> I propose we should use pagination instead of infinite scroll with th= e >>>>> following advantages: >>>>> 1. Users can jump to any page they want. >>>>> 2. Users can change the page size on the grid directly. >>>>> 3. Memory will be used only for visible rows so performance >>>>> improvement. >>>>> 4. Predictable UI, no jumping scrollbars. >>>>> >>>>> Let me know what you think. >>>>> >>>> >>>> >>>> I think there are definite benefits, but there is the downside of >>>> having to scroll and click to browse results. Personally I'm fine with >>>> that, but I think you should probably poll pgadmin-support for opinion= s >>>> from more users. >>>> >>>> -- >>>> Dave Page >>>> pgAdmin: https://www.pgadmin.org >>>> PostgreSQL: https://www.postgresql.org >>>> EDB: https://www.enterprisedb.com >>>> >>>> >>> >>> -- >>> Thanks, >>> Aditya Toshniwal >>> pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* >>> >>> "Don't Complain about Heat, Plant a TREE" >>> >> >> >> -- >> Thanks, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Architect | *enterprisedb.com* >> >> "Don't Complain about Heat, Plant a TREE" >> > --000000000000c2eb2c061c42afab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think there's a nice blend between = pagination=C2=A0and infinite scrolling.

The problem with the current infinite scrolling implem= entation is that the scroll baris scaled to the number of *rendered* rows, = so as you scroll down (which renders another bunch of records), it keeps re= scaling=C2=A0the scrollbar, so to get the next "page", you have t= o continually move to the scrollbar (as Aditya says, "Many users who want access in between row= s or last row struggle to do it as the user has to scroll and scroll.&q= uot;)
<= br>
If instead the scrollbar were scaled to th= e total number of rows, (e.g., 1000 rather than the initial 25 rows that we= re rendered), then clicking (say) in the lower third of the scrollbar would= would do enough fetching/rendering to display rows 601-625 (or such).=C2= =A0 Problem solved.

Alternatively (or = additionally), provide a "jump to row..." button (similar to what= Usman is suggesting re pagination) that gives the user control to see a sp= ecific bunch of records quickly.

But i= f the issue is that people don't like infinite scrolling because "= the user has to scroll and scroll", then fix that specific UE issue, a= nd people will be happy.

The concern I have with a= paginated solution is if the page represents the maximum number of rows re= ndered in the results pane, at any one time.=C2=A0 Assume I can see 25 rows= in the result pane.=C2=A0 I.e., you show rows 1-25 for the first page, the= n you only show rows 26-50 for the second page, then only sho= w rows 27-50, etc. But when there is a cluster of records of interest betwe= en rows 640 and 655, then those records of interest are going to be spread = between pages 25 and 26, and will constantly require flipping back and fort= h between pages.=C2=A0 This would be possibly worse UE than the current &qu= ot;user has to scroll and scroll" issue.=C2=A0 On the other hand, if y= our=C2=A0pagination solution includes letting someone nudge the rendered ro= ws up or down a bit so that I can see rows 640-655 all at once (e.g., there= 's a field where I can type in that the current page should start at ro= w 635, so I can see rows 640-655 all together), then I'm fine with that= .

However, if ultimately=C2=A0you decide to toss o= ut infinite scrolling for pagination, then please make the (default?) page = size be the number of rows you can actually see in the result pane, rather = than some arbitrary number (e.g., 50).=C2=A0 Having the page size equal to = the number of rendered rows means I can quickly step through the pages and = hopefully notice a record of interest.... If the page size is larger than t= he number of rendered rows, then as I step to the next page I still = have to scroll down to see the last few rows, then step to the next page, t= hen scroll down again,=C2=A0 I.e., that would be hideous UE!

=
So my vote preferences are:

First choic= e: keep infinite scrolling, but simply fix the scrollbar scaling and/or giv= e the user the means to quickly jump down by a page or to a specific page
Second choice: use pagination, but only if there's the = ability to see a specific chunk of records on a single page (rather than sp= read across two), and make the pagination size default to the number of rec= ords visible given the height of the result pane

Cheers,
Dave


On Mon, 1 Jul 2024 = at 04:35, Usman Khan <umk555@gmail.c= om> wrote:
Hi Aditya
I vote for pagination, it would really be = helpful for end users.
In addition to giving the user the ability= to set page size, if he can also select or enter what page he can jump to = say 501, 990 etc it would be helpful.=C2=A0

On Fri, Jun 28, 2024= at 3:44=E2=80=AFPM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com&= gt; wrote:
Hi,

Unfortunately, there were only 3 responses to this.
In that case, we will discus= s=C2=A0internally and decide what to do.

On Thu, Jun 20, 2024 at 2:46= =E2=80=AFPM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrot= e:

On Thu, Jun 20, 2024 at 1:36=E2=80=AFPM Dave Page <= dpage@pgadmin.org> wrote:
Hi

Hi Hackers,

Query tool data g= rid currently pulls the data on load basis in batches. For example, it will= initially load only 1000 rows and once a user scrolls to the 1000th row, i= t will fetch the next batch of 1000.
Many users who want access in between rows or last row struggl= e to do it as the user has to scroll and scroll. If someone grabs the scrol= ler and pulls it down still it will be a good UX and the scrollbar may jump= . One reported here -=C2=A0https://github.com/pgadmin-org/pgadmin4/i= ssues/1780
One = more aspect to this is the in memory data of the query tool which keep on i= ncreasing on each scroll, it affects the performance.

I propose we should use pagination instead of infinite scroll wi= th the following advantages:
1. Users can jump to any page they want.
2. Users can change the page size on the grid directl= y.
3. Memory will be use= d only for visible rows so performance improvement.
4. Predictable UI, no jumping scrollbars.
=

Let me know what=C2=A0you think.


I think there are d= efinite benefits, but there is the downside of having to scroll and click t= o browse results. Personally I'm fine with that, but I think you should= probably poll pgadmin-support for opinions from more users.

=
--


--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Software Architect=C2=A0| enterprisedb.com

--
Thanks,
Aditya Toshniwal
pgAdmin Hacker=C2=A0| Sr. Software Architect=C2=A0| enterprisedb.com