Skip to content

feat: implement current breadcrumbs item update logic, add roles#11700

Merged
web-padawan merged 9 commits into
mainfrom
breadcrumbs-step5
May 11, 2026
Merged

feat: implement current breadcrumbs item update logic, add roles#11700
web-padawan merged 9 commits into
mainfrom
breadcrumbs-step5

Conversation

@Artur-

@Artur- Artur- commented May 8, 2026

Copy link
Copy Markdown
Member

No description provided.

@Artur- Artur- requested a review from web-padawan May 8, 2026 09:25
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
@Artur-

Artur- commented May 8, 2026

Copy link
Copy Markdown
Member Author

I refactored the remaining task list so that all tasks/PRs should provide user value. Will update this PR accordingly soon enough

@Artur- Artur- force-pushed the breadcrumbs-step5 branch from a4bdcfb to 1deb2d0 Compare May 11, 2026 07:11
@Artur- Artur- changed the title feat(breadcrumbs): shadow DOM with list, overflow, and slots feat(breadcrumbs): render the trail May 11, 2026
Artur- added 3 commits May 11, 2026 10:24
Mirrors test/visual/base/breadcrumbs.test.js so the Lumo and Aura
baselines are exercised today. Tasks 7 and 8 will extend the imports
to include the per-theme breadcrumbs CSS and re-baseline.
Comment thread packages/breadcrumbs/test/visual/aura/breadcrumbs.test.js
Comment thread packages/breadcrumbs/test/breadcrumbs-item.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs-item.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs-item.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Replaces the broad MutationObserver with a SlotController for the
default slot plus a targeted MutationObserver only for `path` attribute
mutations on slotted items. Matches the TabsSlotController pattern.

Test cleanup per PR review:
- Drop unit tests that duplicate DOM snapshots (document order,
  current on last item, aria-current=page on nolink, no-current when
  all linked).
- Drop replaceChildren() variant — not a typical pattern in our suites.
- Drop tests asserting SVG content and custom-property cascade /
  currentColor resolution — those are CSS implementation details,
  covered by visual tests.
- Move the separator describe block from breadcrumbs-item.test.js to
  breadcrumbs.test.js so the item suite no longer imports
  vaadin-breadcrumbs.
- Rename `ARIA roles` describe to `role` with `default` and `custom`
  sub-suites to match button.test.ts.
@Artur- Artur- force-pushed the breadcrumbs-step5 branch from 1fab6a3 to 08827bf Compare May 11, 2026 09:14
Comment thread packages/breadcrumbs/test/dom/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/dom/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/dom/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Comment thread packages/breadcrumbs/test/breadcrumbs.test.js Outdated
Per PR review:
- Merge `trail` and `trail all-linked` snapshot suites into one `items`
  suite that starts from an all-linked fixture; the `with current` case
  removes `path` from the last item in the test rather than spinning up
  a second fixture.
- Drop the `shadow trail` snapshot — identical to `shadow default`.
- Drop the duplicate `current === false` assertion in the path-removal
  test; the prior test already covers that transition.
- Rename `appended` → `added` for consistency with sibling test suites.
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Comment thread packages/breadcrumbs/src/vaadin-breadcrumbs.js Outdated
Artur- and others added 2 commits May 11, 2026 15:02
Per PR review:
- Extract `__observeItem(node)` so `initAddedNode` and `teardownNode`
  no longer duplicate the per-item MutationObserver setup.
- Move `__updateCurrent()` into `ItemsSlotController` and read from
  `this.nodes` instead of re-filtering `host.children`. Initial state
  is now driven by the controller's own `initAddedNode` pass during
  `hostConnected`; the host no longer triggers it manually.
- Drop the host's `ready()` hook and add the controller from
  `firstUpdated()` instead. Rename `_itemsController` → `__itemsController`
  to match the convention for internal controllers.
@web-padawan web-padawan changed the title feat(breadcrumbs): render the trail feat: implement current breadcrumbs item update logic, add roles May 11, 2026
Comment thread packages/breadcrumbs/spec/implementation-notes.md Outdated
Update the Task 5 entry to describe the current implementation:
SlotController + per-controller MutationObserver (attributeFilter
['path'] only), `__updateCurrent` living on the controller and reading
`this.nodes`. Drop the obsolete subtree/childList notes and refresh the
commit SHA and date.
@sonarqubecloud

Copy link
Copy Markdown

@web-padawan web-padawan merged commit 9701650 into main May 11, 2026
12 of 13 checks passed
@web-padawan web-padawan deleted the breadcrumbs-step5 branch May 11, 2026 12:54
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 25.2.0-alpha7.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants