Skip to content

feat(view-controls): add headless view-controls docs and Nuxt pager wiring#460

Open
StirStudios wants to merge 7 commits intodrunomics:2.xfrom
StirStudios:feature/view-filters
Open

feat(view-controls): add headless view-controls docs and Nuxt pager wiring#460
StirStudios wants to merge 7 commits intodrunomics:2.xfrom
StirStudios:feature/view-filters

Conversation

@StirStudios
Copy link
Copy Markdown
Contributor

@StirStudios StirStudios commented Mar 20, 2026

Summary

  • add headless, UI-agnostic view-controls guidance in playground/VIEW_CONTROLS.md
  • add useDrupalCeViewControls example composable for filtering, sorting, and pagination state
  • wire drupal-view--default pagination to route query updates
  • update DrupalViewsPagination to use NuxtLink-based page navigation with update:current support
  • harden test/e2e/errorhandling.test.ts against transient socket startup failures in CI

Why

  • provides a documented reference implementation teams can reuse without locking into a specific UI library
  • keeps pagination URL-driven and shareable while preserving component-level update events
  • reduces flaky CI failures caused by intermittent app-start timing issues during e2e fetch calls

Scope

  • playground/docs + pagination component + related e2e reliability improvements
  • no API contract changes in the module runtime

Validation

  • CI e2e suite for this PR (Node 22)

@StirStudios StirStudios changed the title Feature/view filters feat(view-controls): add headless view-controls docs and Nuxt pager wiring Mar 20, 2026
@fago
Copy link
Copy Markdown
Contributor

fago commented Apr 14, 2026

wow, this seems pretty interesting. As I understand this makes pagination all client-side driven? but wouldn'T that be the case with regular nuxt-links anyway?

Could you share a bit more on the why, what this enables over the existing pagination?

@StirStudios
Copy link
Copy Markdown
Contributor Author

For us, this goes beyond just pagination, and also beyond treating a View as a standalone page.

We embed Views as paragraph bundles, which means we can have multiple Views on a single page — each needing its own pagination and filtering.

This is how we’re using it now:

https://github.com/StirStudios/nuxtjs-drupal-stir/blob/main/app/components/global/drupal-view–default.vue
https://github.com/StirStudios/nuxtjs-drupal-stir/blob/main/app/composables/useDrupalViewControls.ts

With that setup, you can support much more complex filtering.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants