Skip to content

Conversation

@kmcfaul
Copy link
Contributor

@kmcfaul kmcfaul commented Aug 29, 2022

What: Closes #7356

Replaces the inline pagination demo with a full page pagination demo better matching core.
Also uses the updated data set in the table demos folder.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Aug 29, 2022

@tlabaj tlabaj requested review from mcarrano and mcoker September 1, 2022 15:33
@tlabaj tlabaj assigned mmenestr and unassigned mmenestr Sep 1, 2022
@tlabaj tlabaj requested a review from mmenestr September 1, 2022 15:34
Copy link
Member

@mcarrano mcarrano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @kmcfaul !

Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

};

const tableToolbar = (
<Toolbar usePageInsets id="compact-toolbar">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super small observation - the equivalent core demo here does not usePageInsets. Should they match or is the react version more correct in this case? @mcoker

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! @kmcfaul did it right, the core demo needs to be updated. We may have left off the inset because the default inset magically aligns these checkboxes

Screen Shot 2022-09-02 at 1 32 43 PM

@mcarrano should we remove that bulk select in the toolbar and move it to the table header? Like this example - https://www.patternfly.org/v4/components/table/html#checkboxes-and-actions-example

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, looking at the react bulk select demo, that toolbar isn't using page insets, either.

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh forgot to mention this, if you wrap these labels in a <div> or <span> or something, they won't stretch like this. It has to do with the way the table is displayed in mobile and the contents of the cells are converted to grid children - they stretch by default. If you wrap the children in some generic element, that element will stretch and its children won't.
Screen Shot 2022-09-02 at 1 43 34 PM

@mmenestr
Copy link
Collaborator

mmenestr commented Sep 8, 2022

Am I looking at the right demo? https://patternfly-react-pr-7896.surge.sh/components/table/react-demos/static-bottom-pagination-on-mobile/ I'm not seeing the pagination pop up in mobile view

@kmcfaul
Copy link
Contributor Author

kmcfaul commented Sep 9, 2022

@mmenestr It should be at the bottom of the page. The static modifier means it does not pop up as a sticky bar in a mobile view.

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mmenestr
Copy link
Collaborator

mmenestr commented Sep 9, 2022

Gotcha! I have one more small nitpick which is that when you expand the pagination menu it shows up below which forces you to scroll to see the menu. Wonder if we should have it open above?

Screen.Recording.2022-09-09.at.8.51.12.PM.mov

Copy link
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a couple of comments, neither are blockers.

titles={{
paginationTitle: `${variant} pagination`
}}
isStatic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is adding .pf-m-static to the top pagination, too. It isn't doing anything since it only styles .pf-c-pagination.pf-m-bottom but could be confusing as to why it's there.

https://github.com/patternfly/patternfly/blob/b6fdfb59baeeca10a5942c66c3ae208379a20a3f/src/patternfly/components/Pagination/pagination.scss#L139-L145



const renderPagination = (variant, isCompact) => (
<Pagination
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be out of scope but I noticed a spacing difference between core and react, and looks like it's due to a difference in the toggle between the core and react demos. We recently made an update to the plain text options menu (what's used in pagination) that makes the entire toggle clickable versus just the toggle icon. @thatblindgeye added that in #7192 as a perPageComponent="button" prop on <Pagination>, but our demos that reference <Pagination> are not using it.

I dunno if it makes sense to add that to this demo and have a separate issue to add it to the other demos - or handle it some other way, but wanted to mention it.

@tlabaj tlabaj merged commit e34279a into patternfly:main Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat(Table): Full screen demo for Static Bottom Pagination

8 participants