feat: render /references as a proper view display#476
Merged
Conversation
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>
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.
Summary
Converts the
/referencespage from the bespokeExploreDataTableto the standard view-display pattern already used by/spaces(SpaceListPage) and/queries(QueryListPage): load a published resource view, build a sortable + filterableQueryResultTable, and pass the looked-up term through as therefquery parameter.Unlike
/spaces(a parameterless query), this view's query is parameterized — the page supplies the term at runtime vianew QueryRef(view.getQuery().getQueryId(), "ref", ref).QueryResultTableBuilderaccepts anyQueryRef, so parameterized standalone views work without changes.Published nanopubs (live)
get-uri-references— a view-friendly sibling of the rawfind-uri-referencesquery (which is left intact, asSearchPagestill uses it). Columns: part / subject / predicate / object / published_by / date / np ("^"np_label last),published_byresolved to thedct:creatorORCID.references-view—gen:TabularView, title "🔗 References (max. 100)". Standalone full-page view (nogen:appliesToInstancesOf).Changes
ReferencesPage.java: swapExploreDataTable.createComponent(...)for the 3-line view-display pattern.ReferencesPage.html: move thereftablediv out of the page'scol-12(the table component appends its owncol-12) so it sits directly under.row-section, matchingSpaceListPage.ExploreDataTable.java/.html—ReferencesPagewas 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 compilepasses. Theget-uri-referencesquery was tested live against a heavily-referenced URI (100 rows, fast, no timeout) before publishing.🤖 Generated with Claude Code