Skip to content

feat: Add CnTimelineStages component#12

Merged
remko48 merged 4 commits intodevelopmentfrom
feature/timeline-stages-widget
Mar 31, 2026
Merged

feat: Add CnTimelineStages component#12
remko48 merged 4 commits intodevelopmentfrom
feature/timeline-stages-widget

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new CnTimelineStages Vue 2 component for visualizing sequential stage progression (e.g., case phases, pipeline leads)
  • Supports horizontal/vertical orientation, small/medium sizes, click interaction, keyboard navigation (roving tabindex), and full ARIA accessibility
  • Scoped slots (indicator, label) allow consumers to customize rendering per stage

New files

  • src/components/CnTimelineStages/CnTimelineStages.vue — Component SFC
  • src/components/CnTimelineStages/index.js — Re-export
  • src/css/timeline-stages.css — Global styles with cn- prefix

Props API

Prop Type Default Description
stages Array required [{ id, label, subtitle? }]
currentStage String/Number null Active stage ID
orientation String 'horizontal' 'horizontal' or 'vertical'
clickable Boolean false Enable click + keyboard interaction
size String 'medium' 'small' or 'medium'
ariaLabel String 'Progress stages' Accessible label

Test plan

  • Renders stages in order with track line connecting them
  • Completed/current/upcoming states derived correctly from currentStage
  • Horizontal and vertical orientation work
  • Small and medium sizes render correctly
  • Click emits stage-click only when clickable=true
  • Arrow keys move focus, Enter/Space activate (roving tabindex)
  • ARIA: role="list", role="listitem", aria-current="step"
  • Subtitle renders when provided, hidden when absent
  • Scoped slots override indicator and label
  • NL Design theme overrides apply via Nextcloud CSS variables

🤖 Generated with Claude Code

Abstract timeline/stages widget that visualizes progression through named
stages (completed, current, upcoming). Supports horizontal/vertical
orientation, click interaction, keyboard navigation, ARIA accessibility,
size variants, subtitles, and scoped slots for customization.
- URL sync (SPOT pattern): filter, search, sort, and page state is
  now synced to URL query parameters via router.replace(), enabling
  shareable filtered views. Reads URL state on mount for deeplink
  restoration. Opt-out via urlSync:false.

- objectStore option: consumers can pass their own Pinia store
  instance instead of using the library default (conduction-objects).
  Fixes dual-store bug where apps using createObjectStore('object')
  registered types in a different store than useListView consumed.

- Retry logic: onMounted retries fetchSchema/fetchCollection with
  backoff when the object type isn't registered yet, fixing the race
  condition between async store init and component mount.
Resolve all 27 merge conflicts by accepting main's versions, which include:
- CnAdvancedFormDialog, CnUserActionMenu, CnNotesCard, CnTasksCard components
- selectionPlugin, searchPlugin store plugins
- prefixUrl utility, extractId utility
- Route-based navigation in CnStatsBlock
- Improved CnTimelineStages with pre-computed stageStates, dot indicator, better JSDoc
- Enhanced useObjectStore with state/getters/actions extension points
- Updated specs with implementation status sections
- CodeMirror and vue-codemirror6 dependencies
- Jest mocks for @nextcloud/vue, vue-codemirror6, codemirror-lang-json
- structuredClone polyfill in test setup
@remko48 remko48 changed the base branch from main to development March 31, 2026 13:25
@remko48 remko48 merged commit 950ba44 into development Mar 31, 2026
1 of 2 checks passed
@remko48 remko48 deleted the feature/timeline-stages-widget branch March 31, 2026 13:29
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.

2 participants