Skip to content

Table chart pagination (#219) and text-search facet (#99) - #562

Open
namedgraph wants to merge 4 commits into
developfrom
feat/table-pagination
Open

namedgraph wants to merge 4 commits into
developfrom
feat/table-pagination

Conversation

@namedgraph

@namedgraph namedgraph commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Closes #219. Closes #99.

#219: a SELECT chart drawn as a Table pages its rows in the browser

  • Every chart type sends the same query, as stored, once; the result set is cached whole, as before. A view is what pages a query at the endpoint, so a chart never gets a LIMIT, OFFSET or COUNT added.
  • Only ldh:ResultSetChart in Table mode pages. It draws a slice of the held rows, $ldh:page-size at a time, and the view's pager under it: the same div.ldh-pager host and ldh:PagerControls markup, placed between the canvas and the footer. The "of N" total is the number of rows held.
  • Previous, Next and the page size move the page kept on the block's cache and redraw from the cache. A chart type picked anew redraws the held rows too: all of them for a plotted type, the first page for a Table. Nothing re-queries. Save is unchanged.
  • A paged Table's block body is uncapped like a paged view's (ldh.css), so the rows no longer run out under the pager once they outgrow the kit's 620px ceiling.
  • ldh:replace-limit/ldh:replace-offset now replace only the query's own LIMIT/OFFSET, not a subquery's (CHANGELOG Fixed).

#99: a facet on a string-ranged property filters by the text its value contains

  • The text facet is used when rdfs:range is xsd:string, rdf:langString or rdfs:Literal. It is a priority rule in ldh:FilterIn that delegates to the new ldh:FilterContains. There is no package hook yet.
  • It adds FILTER(isLiteral(?o) && CONTAINS(LCASE(STR(?o)), LCASE("…"))), standard SPARQL 1.1. Value-based, never label-based.
  • The pill markup moves into a shared ldh:FacetPill. A new ldh:ResetFacet serves the popover's Clear, the pill's ×, and Clear all.

Known limits

  • A Table over an unbounded query fetches every row, as a bar chart over it does; bound the query, or use a view.
  • Existing bug, not addressed here: Clear all re-filters only the first facet.

Verified

  • Browser-tested on a 45-row Table chart in a block: Next/Next/Previous page 1–20 → 21–40 → 41–45 → 21–40; 50 rows per page shows all 45 and hides the pager; Table → Bar chart empties the pager host; Bar chart → Table returns to the first page. The SPARQL request count stayed at the page load's throughout, and the console was clean.
  • The pager sits under the table at a row height that overflows the 620px cap (reproduced before the CSS fix, gone after).

Browser checklist

🤖 Generated with Claude Code

namedgraph and others added 2 commits November 18, 2026 22:15
… within its own LIMIT and from its own OFFSET

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… text their value contains

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
namedgraph and others added 2 commits November 20, 2026 22:30
…ws no longer run out under the pager

The design kit caps a block body that carries a pager at min(70vh, 620px) and expects a scroll box
inside it. The chart canvas is not one, so once the table outgrew the cap its rows left the block
under the pager. Same opt-out the grid view already has: the page scrolls the table, the pager
follows it in flow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…he same result set, and a view is what pages a query at the endpoint

The chart's query goes out once, as stored, and is cached whole, as before the pager. A Table
draws a slice of the held rows and the view's pager under it; the pager and the page size move
the slice on the block's cache and redraw. No query is wrapped, limited or counted for any chart
type, so a chart type picked anew redraws the held rows and never asks for them again. The
subquery wrapper and the chart's COUNT go, and the result-count response is back to a view's own.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant