Skip to content

feat: render /references as a proper view display#476

Merged
tkuhn merged 1 commit into
masterfrom
feat/references-page-as-view-display
May 29, 2026
Merged

feat: render /references as a proper view display#476
tkuhn merged 1 commit into
masterfrom
feat/references-page-as-view-display

Conversation

@tkuhn
Copy link
Copy Markdown
Contributor

@tkuhn tkuhn commented May 29, 2026

Summary

Converts the /references page from the bespoke ExploreDataTable to the standard view-display pattern already used by /spaces (SpaceListPage) and /queries (QueryListPage): load a published resource view, build a sortable + filterable QueryResultTable, and pass the looked-up term through as the ref query parameter.

Unlike /spaces (a parameterless query), this view's query is parameterized — the page supplies the term at runtime via new QueryRef(view.getQuery().getQueryId(), "ref", ref). QueryResultTableBuilder accepts any QueryRef, so parameterized standalone views work without changes.

Published nanopubs (live)

  • Query get-uri-references — a view-friendly sibling of the raw find-uri-references query (which is left intact, as SearchPage still uses it). Columns: part / subject / predicate / object / published_by / date / np ("^" np_label last), published_by resolved to the dct:creator ORCID.
  • View references-viewgen:TabularView, title "🔗 References (max. 100)". Standalone full-page view (no gen:appliesToInstancesOf).

Changes

  • ReferencesPage.java: swap ExploreDataTable.createComponent(...) for the 3-line view-display pattern.
  • ReferencesPage.html: move the reftable div out of the page's col-12 (the table component appends its own col-12) so it sits directly under .row-section, matching SpaceListPage.
  • Delete ExploreDataTable.java / .htmlReferencesPage was its only caller.

Behavior notes

The table now gains sortable headers, a live filter, and the view-display dropdown menu. Two intentional differences vs. the old table: "published by" links to the publisher's ORCID rather than a resolved short username, and current-term bold-highlighting is dropped.

Test

mvn compile passes. The get-uri-references query was tested live against a heavily-referenced URI (100 rows, fast, no timeout) before publishing.

🤖 Generated with Claude Code

Replace the bespoke ExploreDataTable on the /references page with the
standard view-display pattern used by /spaces and /queries: load a
published resource view, build a sortable/filterable QueryResultTable,
and pass the looked-up term as the `ref` query parameter.

The view is backed by two newly published nanopubs:
- query get-uri-references (view-friendly columns: part / subject /
  predicate / object / published_by / date / np), a sibling of the raw
  find-uri-references query (left intact, still used by SearchPage)
- references-view (gen:TabularView, title "🔗 References (max. 100)")

ExploreDataTable.java/.html are deleted (ReferencesPage was the only
caller). The reftable div is moved out of the page's col-12 so the
table's own appended col-12 no longer nests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tkuhn tkuhn merged commit 7ef2721 into master May 29, 2026
8 checks passed
@tkuhn tkuhn deleted the feat/references-page-as-view-display branch May 29, 2026 11:36
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