Implement pagination web component on Trending page#12035
Merged
cdrini merged 7 commits intointernetarchive:masterfrom Mar 20, 2026
Merged
Implement pagination web component on Trending page#12035cdrini merged 7 commits intointernetarchive:masterfrom
cdrini merged 7 commits intointernetarchive:masterfrom
Conversation
Rename custom event from update:page to ol-pagination-change with structured detail object. Add self-update of currentPage with cancelable support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated the OlPagination component's documentation to clarify the behavior of the baseUrl property and its fallback to the current page URL. Improved examples to demonstrate analytics tracking and the handling of the ol-pagination-change event. Adjusted text for better clarity on navigation options.
Added a new OlPagination component for improved pagination functionality. Updated the trending template to utilize the new component, replacing the previous pager implementation. Enhanced CSS for pagination styling and adjusted mybooks list margin for better layout.
for more information, see https://pre-commit.ci
lokesh
commented
Mar 6, 2026
| * @prop {String} labelPagination - Aria label for the navigation landmark (default: "Pagination") | ||
| * | ||
| * @fires update:page - Fired when a page is selected, detail contains the page number | ||
| * @fires ol-pagination-change - Fired when a page is selected. detail: { page: Number } |
Collaborator
Author
There was a problem hiding this comment.
Updated event name to use web component convention, previously it was using a Vue custom event naming convention.
Resolve conflicts in OlPagination.js (JSDoc comment), design.html (analytics tracking demo), and messages.pot (i18n string) — keeping our branch's improved analytics tracking example and preventDefault behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cdrini
approved these changes
Mar 20, 2026
Collaborator
cdrini
left a comment
There was a problem hiding this comment.
Lgtm! Tested on testing on FF+Win
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.
Adds
<ol-pagination>, a Lit web component, to the trending page as a first integration.role="navigation",aria-current, per-button labels, keyboard nav (arrows, Home, End). Old macros have none of this.<a>tags for SEO by default, plus anol-pagination-changeevent for SPA-style use. Old macros only do full-page nav.1 ... 5 6 7 ... 50when in the middle. More standard UX.Changes
OlPagination.js— Lit component with a11y, keyboard nav, URL/event modesOlPagination.html— Templetor macro wrapper for server-side usagetrending.html— Switched to new componentTesting
/trending/now— pagination renders and navigates correctlyScreenshot