fix: address bottom pagination bugs - #8498
Conversation
WalkthroughPagination removes bottom plain modifier support from the template and documentation, then updates bottom pagination backgrounds and glass-theme shadows for sticky, static, and responsive variants. ChangesPagination bottom behavior
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview: https://pf-pr-8498.surge.sh A11y report: https://pf-pr-8498-a11y.surge.sh |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/patternfly/components/Pagination/pagination.scss (1)
70-98: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAdd missing transparent background for glass theme and fix stylelint error.
The PR objective states: "Ensure bottom pagination in glass has a transparent background when sticky on mobile by default". However, the variable assignment
--#{$pagination}--m-bottom--BackgroundColor: transparent;is missing from the glass theme block. Without this,.pf-m-bottomon glass defaults to the solidsticky-defaultbackground on mobile.Additionally, standard CSS rules (enforced by Stylelint's
no-invalid-position-declaration) require declarations to appear before nested rules. The current placement of the:where(:root.pf-v6-theme-glass) &nested rule before the subsequent CSS variables and@mediaqueries triggers a static analysis error.Move the glass theme block to the end of the
pf-rootmixin and include the missing background property.🛠️ Proposed fix
- :where(:root.pf-v6-theme-glass) & { - --#{$pagination}--m-sticky-stuck--BorderRadius: var(--pf-t--global--border--radius--glass--default); - --#{$pagination}--m-sticky-stuck--BoxShadow: var(--pf-t--global--box-shadow--sm); - --#{$pagination}--m-sticky--BorderRadius: var(--#{$pagination}--m-sticky--BorderRadius--glass); - --#{$pagination}--m-sticky--BoxShadow: var(--pf-t--global--box-shadow--sm); - --#{$pagination}--m-bottom--BoxShadow: var(--pf-t--global--box-shadow--sm); - --#{$pagination}--m-bottom--m-sticky--BoxShadow: var(--pf-t--global--box-shadow--sm); - } - // page menu --#{$pagination}__page-menu--Display--base: block; --#{$pagination}__page-menu--Display: none; --#{$pagination}--m-display-summary__page-menu--Display: none; --#{$pagination}--m-display-full__page-menu--Display: var(--#{$pagination}__page-menu--Display--base); --#{$pagination}--m-bottom__page-menu--Display: var(--#{$pagination}__page-menu--Display--base); --#{$pagination}__page-menu--md--Display: var(--#{$pagination}__page-menu--Display--base); `@media` screen and (min-width: $pf-v6-global--breakpoint--md) { --#{$pagination}--m-bottom--BackgroundColor: transparent; --#{$pagination}--m-bottom--BoxShadow: none; --#{$pagination}--m-bottom--BorderBlockStartWidth: 0; --#{$pagination}__page-menu--Display: var(--#{$pagination}__page-menu--md--Display); --#{$pagination}__nav--Display: inline-flex; --#{$pagination}__total-items--Display: none; } `@media` screen and (min-width: $pf-v6-global--breakpoint--xl) { --#{$pagination}__scroll-button--Width: var(--#{$pagination}__scroll-button--xl--Width); } + + :where(:root.pf-v6-theme-glass) & { + --#{$pagination}--m-sticky-stuck--BorderRadius: var(--pf-t--global--border--radius--glass--default); + --#{$pagination}--m-sticky-stuck--BoxShadow: var(--pf-t--global--box-shadow--sm); + --#{$pagination}--m-sticky--BorderRadius: var(--#{$pagination}--m-sticky--BorderRadius--glass); + --#{$pagination}--m-sticky--BoxShadow: var(--pf-t--global--box-shadow--sm); + --#{$pagination}--m-bottom--BoxShadow: var(--pf-t--global--box-shadow--sm); + --#{$pagination}--m-bottom--m-sticky--BoxShadow: var(--pf-t--global--box-shadow--sm); + --#{$pagination}--m-bottom--BackgroundColor: transparent; + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/patternfly/components/Pagination/pagination.scss` around lines 70 - 98, Update the pf-root mixin by moving the :where(:root.pf-v6-theme-glass) & nested block after all declarations and media queries, then add --#{$pagination}--m-bottom--BackgroundColor: transparent; to that glass-theme block. Preserve the existing glass-specific variables and responsive rules.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/patternfly/components/Pagination/pagination.scss`:
- Around line 70-98: Update the pf-root mixin by moving the
:where(:root.pf-v6-theme-glass) & nested block after all declarations and media
queries, then add --#{$pagination}--m-bottom--BackgroundColor: transparent; to
that glass-theme block. Preserve the existing glass-specific variables and
responsive rules.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: a666dbe0-7edd-4867-b1ca-7409e04432d3
📒 Files selected for processing (3)
src/patternfly/components/Pagination/examples/Pagination.mdsrc/patternfly/components/Pagination/pagination.hbssrc/patternfly/components/Pagination/pagination.scss
💤 Files with no reviewable changes (2)
- src/patternfly/components/Pagination/pagination.hbs
- src/patternfly/components/Pagination/examples/Pagination.md
|
🎉 This PR is included in version 6.6.0-prerelease.23 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* fix: address bottom pagination bugs * fix: round border-radius on default bottom in glass
* fix: address bottom pagination bugs * fix: round border-radius on default bottom in glass
* fix: address word-break/overflow-wrap bug (#8487) * chore(input group): add radius modifier (#8483) * fix(table): nested table sorting (#8491) * fix(tree-view): revert caret rotations (#8490) * fix(a11y): ignore target-size rule for WCAG 2.2 bump (#8493) * fix(tree): update tree table and DLS tree toggle icon direction (#8502) * fix: update disabled description to use text color token (#8497) * fix(plain actions): update tokens to vertical-plain (#8495) * fix: address bottom pagination bugs (#8498) * fix: address bottom pagination bugs * fix: round border-radius on default bottom in glass * chore(primary details): fix drawer and toolbar (#8509) * fix(modal): footer action spacing (#8526) --------- Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Co-authored-by: Andrew Ronaldson <aronalds@redhat.com> Co-authored-by: Jake Miller <jake83miller@gmail.com> Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> Co-authored-by: Jake Miller <jakmille@redhat.com>
fixes #8348
Visual regression reports. These are only the ones with failures, which are HC dark (the floating background is different between dark and dark-highcontrast) and all glass glass themes. There are a couple of errant border diffs in HC light theme, but I believe those are just false positives. Those failed in the last report with a subtle thickness in the border width
Summary by CodeRabbit
Bug Fixes
Documentation