patternfly / patternfly-design

Use this repo to file all new feature or design change requests for the PatternFly project
114 stars 105 forks source link

Table: 'View more' button as an alternate to Pagination #1307

Closed andrew-ronaldson closed 1 month ago

andrew-ronaldson commented 1 month ago

Requesting new feature for the table component

In a recent thread there was an ask to include a View more button with the table component that can load in addition content as needed. With pagination the page reloads to pull in the next set of data and the view more action would potentially avoid refreshing the page.

Another benefit is being able to scroll up and down in one page vs navigating through pagination or manually adjusting the items per page menu.

This is a rough mock of the requested change. May require additional considerations.

Screenshot 2024-05-15 at 11 56 35 AM
jgiardino commented 1 month ago

The issue description is inaccurate based on my understanding of the questions we have.

there was an ask to include a View more button with the table component

The questions we have for PF is whether this is even a valid pattern to use.

The use of this pattern in the product today is based on a design pattern that exists in an upstream project. As we try to define guidelines around the different patterns for loading list items, the question within our team is whether the “view more” pattern is a pattern we should even recommend for other areas of the product, or is it just an artifact from pulling in the upstream project and not really a pattern we should recommend? And if the consensus is that this is a valid pattern, then our next question would be, when do we use this pattern vs pagination?

cc'ing @nding-anges

lboehling commented 1 month ago

Hey @jgiardino! Thanks for clarifying that question!

I think in reference to the examples you all shared, our suggestion is to stick with pagination.

We did discuss this topic during one of our most recent design shares, and it didn't seem like anyone had strong feelings around view more vs. pagination. We did discuss a potential guideline/use case for "view more" would be to use it if there is a smaller set/subset of data that doesn't justify needing the full pagination component (like ~2ish "pages") and/or if there is no room for a toolbar either above or below the table. Those guidelines would definitely match up to the use of "view more" in the nested table in an expandable row, as shown in the example, but we thought that including at least a bottom pagination on the parent table would be a better, more consistent approach.

jgiardino commented 1 month ago

Thanks for the update! This makes sense to me.

nding-anges commented 1 month ago

@jgiardino thanks for clarifying the question and @lboehling Thanks for the feedback.

andrew-ronaldson commented 1 month ago

Closed as resolved