Skip to content

feat: Pagination web component#11811

Open
lokesh wants to merge 17 commits intointernetarchive:masterfrom
lokesh:feat/web-component-pagination
Open

feat: Pagination web component#11811
lokesh wants to merge 17 commits intointernetarchive:masterfrom
lokesh:feat/web-component-pagination

Conversation

@lokesh
Copy link
Collaborator

@lokesh lokesh commented Feb 4, 2026

  • Adds <ol-pagination> web component
  • Updates Design Pattern Library documentation page (see existing) to showcase web components

Note: This PR does not replace any usages of the existing pagination UI. That will be a follow-up.

Related issues:

Technical

Introduces new Lit web component with the following features:

  • Dual navigation modes: URL-based (renders SEO-friendly anchor tags) and event-based (fires update:page event). Currently we are only using URL-based pagination as far as I can tell.
  • A11y - Adds ARIA attributes and semantic landmark which were previously missing.
  • Keyboard support - Adds arrow key plus home/end keyboard support as this is a composite component. Missing in current implementation.
  • Mobile rendering - More compact listing fixes the wrapping on mobile.
  • Reusability - Makes this a business-logic free UI component, no tight coupling with $changequery.

Restructures design.html with interactive examples for component (event-based, URL-based, edge cases) and component (height-based, line-based, custom button text, background colors, small labels)

Testing

Visit URL /developers/design to see the new pagination component.

Screenshot

Existing pagination on the left, new on the right:
image

Old /developers/design on the left, and new on the right:
Frame 427318914

Stakeholders

@RayBB @mekarpeles @cdrini @jimchamp

lokesh and others added 11 commits December 23, 2025 16:03
…e and package.json; update package-lock.json to include lit dependencies.
…; include script for lit-components in footer
…nation display and enhance design documentation with examples.
Resolved conflicts:
- Makefile: use upstream's vite-lit.config.mjs naming
- lit/index.js: keep both OlPagination and OLReadMore components
- footer.html: use upstream's script attribute ordering
- package.json: use upstream's vite-lit.config.mjs naming
- page-design.less: combine index.less import with upstream's typography styles
…l; update styles in page-design.less for improved clarity and presentation. Added event handling for page selection and refined example structure for better user experience.
…ng for improved clarity and user experience. Updated pagination and colors sections with better organization and additional examples. Introduced new styles for design pattern headers and examples.
…eaning up HTML structure for improved maintainability and clarity.
…ing the build process and eliminating legacy support code.
…i18n support for button text and add a new example for height-based truncation.
…syntax, and update design.html examples to improve styling and consistency for the ol-read-more component.
// Import components to register them as custom elements
import './OLReadMore.js';
// Export components (importing also registers them as custom elements)
export { OLReadMore } from './OLReadMore.js';
Copy link
Collaborator Author

@lokesh lokesh Feb 4, 2026

Choose a reason for hiding this comment

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

This code change does not impact the existing implementation of ol-read-more, but switching to doing an export makes future testing, tree-shaking, and other programmatic tasks easier.

lokesh and others added 2 commits February 4, 2026 10:10
…unctions for the ol-colors, ol-pagination, and ol-read-more components. This improves localization capabilities and consistency across examples.
@lokesh lokesh added the Theme: Design Issues related to UI design, branding, etc. [managed] label Feb 4, 2026
lokesh and others added 4 commits February 4, 2026 14:13
…ml to streamline content and improve clarity.
…er width, and focus outline, enhancing consistency and maintainability.
…ly, border width, and focus outline, enhancing consistency and maintainability."

This reverts commit dec1d12.
@lokesh lokesh requested a review from mekarpeles February 6, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Theme: Design Issues related to UI design, branding, etc. [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant