feat: implement current breadcrumbs item update logic, add roles#11700
Merged
Conversation
web-padawan
reviewed
May 8, 2026
Member
Author
|
I refactored the remaining task list so that all tasks/PRs should provide user value. Will update this PR accordingly soon enough |
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.
web-padawan
reviewed
May 11, 2026
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.
web-padawan
reviewed
May 11, 2026
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.
web-padawan
reviewed
May 11, 2026
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
reviewed
May 11, 2026
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.
|
web-padawan
approved these changes
May 11, 2026
Collaborator
|
This ticket/PR has been released with Vaadin 25.2.0-alpha7. |
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.



No description provided.