Repository navigation
fix(Pagination): visually indicate selected page size option (ENG-209973) - #1177
Open
bhavya-s-eightfold wants to merge 2 commits into
Open
bhavya-s-eightfold wants to merge 2 commits into
bhavya-s-eightfold wants to merge 2 commits into
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Author
|
needs_sandbox:2 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1177 +/- ##
=======================================
Coverage 85.46% 85.46%
=======================================
Files 1231 1231
Lines 21780 21780
Branches 8295 8295
=======================================
+ Hits 18614 18615 +1
Misses 3078 3078
+ Partials 88 87 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY:
The page size dropdown in Pagination ("10 / page", "20 / page", ...) showed no visual
selected state: the current page size looked identical to the other options, so users
(especially those with low vision, cognitive or memory limitations) could not tell which
option was selected.
Root cause: Octuple's Pagination builds the page-size menu items without setting
active,so MenuItem never applies its existing
.activestyle.Fix (Octuple PR #1177): set
active: item === _pageSizeon each page-size menu item. MenuItem then applies its existing.activebackground (--grey-background2-color, #d9dce1). Keyboard focus styling isunchanged and stays visually distinct from the selected state.
Because this is in the shared Octuple Pagination component, it fixes every paginated table
that uses the page-size dropdown (e.g. Skills Design table and Skills Design Activity Log).
JIRA TASK:
https://eightfoldai.atlassian.net/browse/ENG-209973
GATE/CONFIG:
NA
CHECKLIST:
(Jest unit test added in Octuple Pagination.test.tsx; it fails without the fix.)
TEST PLAN:
group_id used: demo@eightfolddemo-bhavya.com
Unit (Octuple):
npx jest src/components/Pagination→ 11/11 pass. New test "Pagination should visuallyindicate the selected page size option" asserts the current size option has the
activeclass and the other does not; it fails when the fix is removed.
Manual (local Octuple build synced into vscode, verified on dev box):
Expected: "50 / page" has a grey highlight; other options do not.
Expected: same as steps 2–3.
Regression:
28 suites / 393 tests / 71 snapshots passed.
10 → 20 updates rows (10 → 20) and pages (3 → 2); selected option highlight
follows the change.
Before (no selected indicator):

After (current page size highlighted):

Known note for reviewers: the selected background (#d9dce1) on white is ~1.4:1 contrast.
It reuses the existing Octuple Menu active token; a stronger indicator would need design input.