Skip to content

docs(pagination): Content updates for accuracy and relevance.#4849

Merged
mcoker merged 14 commits intopatternfly:mainfrom
edonehoo:iss4795
Feb 3, 2026
Merged

docs(pagination): Content updates for accuracy and relevance.#4849
mcoker merged 14 commits intopatternfly:mainfrom
edonehoo:iss4795

Conversation

@edonehoo
Copy link
Collaborator

@edonehoo edonehoo commented Nov 4, 2025

Closes #4795

I ended up doing a bigger revamp of this page, because it was pretty outdated and I felt like it needed a little more than just the smaller clarifications

@patternfly-build
Copy link
Collaborator

patternfly-build commented Nov 4, 2025

Preview: https://pf-org--pr-4849-site.surge.sh

@edonehoo edonehoo changed the title Iss4795 docs(pagination): Content updates for accuracy and relevance. Nov 5, 2025
@edonehoo edonehoo requested review from lboehling and mcoker November 6, 2025 15:02
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.

Sweet action! I left some comments, and a number are about images. Let me know if you want help taking screenshots or setting up demos for a good screenshot.

1. **Top pagination:** Always right-align pagination in the top toolbar, above content views.
1. **Top pagination:** Placed above the component it controls and aligned to the right.

2. **Bottom pagination:** Placed below the component it controls. Right-aligned for desktop views and center-aligned for mobile. If you want bottom pagination to be sticky so that it remains in view as users scroll through long content, place it directly after the component it controls and refer to the [React sticky pagination](/components/pagination#sticky) or [HTML sticky pagination](/components/pagination/html#bottom-sticky) examples for implementation guidance.
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW it's center-aligned and should be sticky on mobile by default, so the pagination should always be placed directly after the thing it applies to so the sticky positioning works on mobile. You probably know this but the sticky variants make it sticky on desktop, too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How does breaking the guidance apart like this read to you?

  1. Top pagination: Placed above the component it controls and aligned to the right.

  2. Bottom pagination: Placed directly after the component it controls. On desktop, bottom pagination is right-aligned by default. On mobile, bottom pagination is center-aligned and sticky by default.

To make either top or bottom pagination sticky, so that it remains in view as users scroll through long content, refer to the React sticky pagination or HTML sticky pagination examples for implementation guidance.


When using pagination in mobile views, follow these best practices:
- As shown in this example, place a pagination summary above the component it controls and a mobile pagination below the component.
- Do not use full pagination in both the top and bottom toolbars.
Copy link
Contributor

Choose a reason for hiding this comment

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

2 things about this:

  • Bottom pagination shouldn't go in a toolbar, it should just be used on its own.
  • Unless I'm misreading it, doesn't this conflict with the text above saying to "add a second full pagination..."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The "add a second full pagination..." is in reference to desktop I think, whereas this list is meant to be mobile-specific rules. I also think I misinterpreted your notes from the issue RE point 2.

How do these edits seem?

When using pagination in mobile views, follow these best practices:

  • Use a top-pagination summary and bottom pagination.
  • Only use full pagination for top navigation on mobile when you can't use bottom pagination, or when you can only use the bottom-pagination summary (instead of a full bottom pagination).
  • Never use full pagination for both the top and bottom pagination on mobile.

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.

Looks like img/mobile-pagination.svg has an issue and isn't rendering.

Left one comment, otherwise LGTM!

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.

It all looks good to me! Left one comment. Also an aside, but did you mean to export the images as SVGs? Typically for a screenshot, you'd use a JPG if possible, or a PNG if you need sharp lines and things since JPG can create some fuzziness if the quality is too low due to compression. SVGs are usually just for icons and really simple images with simple shapes. Particularly best for things that need to scale in size without any loss of quality (like icons)

### Mobile

Mobile pagination is formatted differently in order to conserve space. On mobile, full pagination will collapse to a pagination summary with an item count. [Learn how to customize overflow menu breakpoints in our toolbar design guidelines](/components/toolbar/design-guidelines).
On mobile, pagination adapts in order to better conserve space. When switching from desktop to mobile, top pagination will collapse to a pagination summary with an item count and bottom pagination will adapt to a more compact design. [Learn how to customize overflow menu breakpoints in our toolbar design guidelines](/components/toolbar/design-guidelines).
Copy link
Contributor

Choose a reason for hiding this comment

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

Just an opinion, but I would probably only link the "toolbar design guidelines" text? It's more concise (easier to read) and accurately describes the resulting page. I also wonder why it's here - there is no mention of doing anything with overflow menus? There is a line in the desktop section that may be a more appropriate spot for this link?

When used in a toolbar, pagination may leave limited room for other items like filters or bulk selectors. These additional items should automatically move into an [overflow menu](/components/toolbar/design-guidelines#overflow-menu) as needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm yeah, maybe it's not needed here. I know that the link/mention of overflow was originally in the desktop section before I hacked away at the doc - I may have just accidentally placed it within the mobile section too. I'll remove this and leave the link in the desktop section

@edonehoo
Copy link
Collaborator Author

edonehoo commented Dec 9, 2025

did you mean to export the images as SVGs? Typically for a screenshot, you'd use a JPG if possible, or a PNG if you need sharp lines and things since JPG can create some fuzziness if the quality is too low due to compression. SVGs are usually just for icons and really simple images with simple shapes. Particularly best for things that need to scale in size without any loss of quality (like icons)

Oh interesting, yes the majority of images across our website are SVGs, because they're images exported from Figma. We've tried exporting them as SVGs instead, but they were coming out a little fuzzy too. I remember this issue you made about image consistency across the site - I could experiment with PNGs again and retry that approach in a separate PR that also addresses your issue

@edonehoo edonehoo requested a review from mcoker December 15, 2025 14:20
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.

Looks 🔥. The only little thing is the first screenshot under placement -> desktop has a big ol' caret icon. Is that an easy fix? We can merge this and create a follow up if you prefer, just lemme know.

Image

@edonehoo edonehoo requested a review from nicolethoen February 3, 2026 20:25
@mcoker mcoker merged commit fceca82 into patternfly:main Feb 3, 2026
5 checks passed
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/ast-helpers@1.4.0-alpha.334
  • @patternfly/documentation-framework@6.33.8

Thanks for your contribution! 🎉

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.

Docs - Update content for mobile pagination in design guidelines

3 participants