Skip to content

paginationNav() cannot replicate paginationLinks() Bootstrap markup — missing prepend/append/anchorDivider/alwaysShowAnchors/class args #2715

@bpamiri

Description

@bpamiri

Severity: high (for any Bootstrap-styled 3.x app). The advertised 1:1 replacement is missing most of the arg surface that made the legacy helper useful.

Surfaced by: titan Phase 2.4 (Wheels 4.0 upgrade), 2026-05-15.

Description

The upgrade guide and _upgrade-docs/PLAN.md-style migration notes frame paginationNav() as the canonical replacement for paginationLinks(). But paginationNav() is missing arguments that paginationLinks() had and that real-world Bootstrap-styled pagination relies on:

  • prepend / append — wrap the page-number list with outer markup
  • prependToPage / appendToPage — wrap each page number in <li class=\"page-item\">…</li>
  • anchorDivider — separator between page numbers
  • alwaysShowAnchors — show first/prev/next/last anchors conditionally
  • addActiveClassToPrependedParent — push the active class onto the <li> wrapper
  • class for the page-number anchors (only navClass exists for the outer <nav>)

Result: paginationNav() emits <nav class=\"pagination\">link link link</nav> with no <ul> and bare anchors. Real 3.x apps that styled pagination with the standard Bootstrap idiom (<ul class=\"pagination\"><li class=\"page-item\">…</li></ul>) cannot do a like-for-like swap — their pagination renders unstyled.

Workaround used in titan

Drop down to the underlying primitive pageNumberLinks() (which kept those args), build the <nav><ul> wrapper inline. See the titan worktree at peter/wheels-4-phase-2.4-paginationnav for the working pattern.

Suggested fix

One or both:

  1. Add prependToPage / appendToPage / innerWrap args to paginationNav() and pass them through to its internal pageNumberLinks call. This restores like-for-like swap for Bootstrap markup.
  2. Add an "Migrating Bootstrap-styled pagination" section to the upgrade guide showing the composed-primitive pattern (firstPageLink / previousPageLink / pageNumberLinks / nextPageLink / lastPageLink) as the documented path for apps that can't use the simplified paginationNav wrapper.

Per-finding from titan's Phase 2.4 work: Bootstrap-styled apps are the dominant 3.x pattern. This is the upgrade path most apps will hit.

cc @bpamiri

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions