docs(pagination): Content updates for accuracy and relevance.#4849
docs(pagination): Content updates for accuracy and relevance.#4849mcoker merged 14 commits intopatternfly:mainfrom
Conversation
mcoker
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
How does breaking the guidance apart like this read to you?
Top pagination: Placed above the component it controls and aligned to the right.
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.
packages/documentation-site/patternfly-docs/content/components/pagination/pagination.md
Show resolved
Hide resolved
...mentation-site/patternfly-docs/content/design-guidelines/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
packages/documentation-site/patternfly-docs/content/components/pagination/pagination.md
Show resolved
Hide resolved
...mentation-site/patternfly-docs/content/design-guidelines/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
packages/documentation-site/patternfly-docs/content/components/pagination/pagination.md
Show resolved
Hide resolved
...mentation-site/patternfly-docs/content/design-guidelines/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
...mentation-site/patternfly-docs/content/design-guidelines/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
|
|
||
| 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. |
There was a problem hiding this comment.
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..."?
There was a problem hiding this comment.
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.
...mentation-site/patternfly-docs/content/design-guidelines/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
mcoker
left a comment
There was a problem hiding this comment.
Looks like img/mobile-pagination.svg has an issue and isn't rendering.
Left one comment, otherwise LGTM!
packages/documentation-site/patternfly-docs/content/components/pagination/pagination.md
Outdated
Show resolved
Hide resolved
mcoker
left a comment
There was a problem hiding this comment.
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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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 |
|
Your changes have been released in:
Thanks for your contribution! 🎉 |

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