Skip to content

feat: implement ItemListView and fix async view rendering#438

Merged
tkuhn merged 12 commits intomasterfrom
feature/item-list-view-435
Apr 14, 2026
Merged

feat: implement ItemListView and fix async view rendering#438
tkuhn merged 12 commits intomasterfrom
feature/item-list-view-435

Conversation

@tkuhn
Copy link
Copy Markdown
Contributor

@tkuhn tkuhn commented Apr 13, 2026

Summary

  • Implements the ItemListView view type (QueryResultItemList + builder + HTML), with special handling for user_iri and template_iri columns, filter field, and pagination
  • Dispatches ITEM_LIST_VIEW in ViewList so it no longer throws an error on pages that use it
  • Fixes col-X class not being applied to the ApiResultComponent wrapper in the async loading path — it was only on the inner QueryResult, causing floated elements to escape their containers
  • Fixes page size being ignored when views are loaded via ViewList: QueryResultList, QueryResultItemList, and QueryResultNanopubSetBuilder now read from viewDisplay.getPageSize()
  • Fixes .listview img padding rule accidentally applying to user-icon/bot-icon images
  • Fixes bullet point not hidden for li containing a bot-icon
  • Makes bot-icon use the same tilted-square mask shape and gray background as user-icon

Test plan

  • Visit a page that uses ItemListView (e.g. /resource?id=.../r/home) and verify items render as a vertical list with correct icons and links
  • On first page load (cold cache), verify async-loaded views maintain correct column widths and don't appear side-by-side unexpectedly
  • Verify page size from view definition is respected (e.g. a view configured with page size 5 shows 5 items)
  • Verify bot icons appear with tilted-square shape (same as user icons) and no bullet point in lists

🤖 Generated with Claude Code

tkuhn and others added 12 commits April 13, 2026 15:04
…gation

- Add QueryResultItemList/Builder/HTML for the ItemListView type, with
  user_iri and template_iri column recognition, filter, and pagination
- Dispatch ITEM_LIST_VIEW in ViewList
- Fix col-X class not applied to ApiResultComponent wrapper in async
  loading path (moved from QueryResult constructor to each builder)
- Fix page size ignored when using ViewList: use viewDisplay.getPageSize()
  in QueryResultList, QueryResultItemList, and QueryResultNanopubSetBuilder
- Fix .listview img padding rule not to affect user-icon/bot-icon
- Fix bullet not hidden for li containing bot-icon
- Make bot-icon use same tilted-square mask shape and gray as user-icon

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace the four hardcoded views on the home page with a ViewList
driven by a maintained resource. The resource IRI defaults to
https://w3id.org/spaces/knowledgepixels/nanodash/r/home and can be
overridden via the NANODASH_HOME_RESOURCE environment variable.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ng row-section backgrounds

Also documents NANODASH_HOME_RESOURCE in docker-compose.override.yml.template.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… popular templates

- Remove double col nesting (HTML col-6 wrapper + builder col-X) that caused
  async-loaded views to render at 3/12 instead of 6/12
- Add ViewDisplay.withDisplayWidth() for explicit width override
- Switch popular-templates to QueryResultItemListBuilder to show only the
  template link, dropping the count column

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…serlist

Same double col-nesting issue as TemplateList: HTML col-6 wrappers plus
builder col-X caused async-loaded views to render at 3/12.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sort logic applied in FilteredQueryResultDataProvider.iterator() using
the shared sort state. AjaxFallbackHeadersToolbar replaces HeadersToolbar
so sort clicks refresh the table in-place via AJAX rather than triggering
a full page reload (which would re-initialize the AjaxLazyLoadPanel and
lose the sort state).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a column has a _label companion (e.g. template_iri_label for
template_iri), sort by the label text instead of the raw URI.
Also uses case-insensitive comparison.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Columns ending in template_iri are now rendered as links to
/publish?template=<iri>&template-version=latest, consistent with
how QueryResultItemList handles them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BookmarkablePageLink renders on the DataTable's span host element,
producing <span href="..."> which browsers don't style as a link.
Use Label with unescaped HTML instead (same pattern as QueryResultItemList)
to emit a real <a> tag regardless of the host element.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e cells

Applies to template_iri, regular IRI, multi-iri, and multi-val link cells.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Moved truncateLabel to Utils and applied it to NanopubItem's header link,
which is the main link in the nanopub set view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@tkuhn tkuhn marked this pull request as ready for review April 14, 2026 05:21
@tkuhn tkuhn merged commit fdc28ba into master Apr 14, 2026
8 checks passed
@tkuhn tkuhn deleted the feature/item-list-view-435 branch April 14, 2026 05:24
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 4.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant