Skip to content

feat(breadcrumb-trail): task 1 — package scaffolding and element shells#11593

Open
Artur- wants to merge 2 commits intomainfrom
breadcrumb-step1
Open

feat(breadcrumb-trail): task 1 — package scaffolding and element shells#11593
Artur- wants to merge 2 commits intomainfrom
breadcrumb-step1

Conversation

@Artur-
Copy link
Copy Markdown
Member

@Artur- Artur- commented Apr 28, 2026

Set up the experimental @vaadin/breadcrumb-trail package skeleton with three element shells (BreadcrumbTrail, BreadcrumbItem, BreadcrumbTrailOverlay), gated behind the breadcrumbTrailComponent feature flag. Render bodies and base styles are intentionally empty — filled in by subsequent tasks.

Artur- added 2 commits April 28, 2026 18:13
Set up the experimental @vaadin/breadcrumb-trail package skeleton with
three element shells (BreadcrumbTrail, BreadcrumbItem, BreadcrumbTrailOverlay),
gated behind the breadcrumbTrailComponent feature flag. Render bodies and
base styles are intentionally empty — filled in by subsequent tasks.
@sonarqubecloud
Copy link
Copy Markdown

import '../vaadin-breadcrumb-item.js';
import '../vaadin-breadcrumb-trail-overlay.js';

describe('vaadin-breadcrumb-trail feature flag (disabled)', () => {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't test this in other existing components so IMO having it here is not necessary.

* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really use ThemableMixin in new components? I forget the reason. I think we could use light DOM styles for new components in Lumo as well. Or what does this mixin do, actually?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need LumoInjectionMixin for Lumo, but using ThemableMixin is technically only needed to make the component work with the (deprecated) Flow shadow DOM injection mechanism via components folder.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then it definitely doesn't sound like something we should add to new components.

@jouni
Copy link
Copy Markdown
Member

jouni commented Apr 29, 2026

Why <vaadin-breadcrumb-trail> instead of just <vaadin-breadcrumbs>?

Similarly, we have <vaadin-tabs> that contains <vaadin-tab> items, instead of, for example, <vaadin-tab-bar>.

/**
* A mixin providing component-specific behavior for `<vaadin-breadcrumb-trail-overlay>`.
*
* Task 1 ships this as an identity mixin; Task 10 fills it in.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should aim to not list "Task 1" etc in the code, it just creates unnecessary noise in the diff.

*
* @polymerMixin
*/
export const BreadcrumbTrailOverlayMixin = (superClass) => class extends superClass {};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we don't necessarily need this mixin, e.g. AvatarGroupOverlay doesn't have it. The fact that most of components do have it is mainly a leftover from the pre-V25 Polymer / Lit code sharing.

Comment on lines +25 to +26
* This component is experimental and only registers when the
* `breadcrumbTrailComponent` feature flag is enabled:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove this from JSDoc of all components, as we generally don't list it there. IMO it is enough to have this note is in README and in docs.

import '../vaadin-breadcrumb-item.js';
import '../vaadin-breadcrumb-trail-overlay.js';

// The breadcrumb trail elements are experimental and only register when the
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment could be removed, setting feature flag in tests is self-explanatory.

@@ -0,0 +1,3 @@
import './src/vaadin-breadcrumb-trail-overlay.js';

export * from './src/vaadin-breadcrumb-trail-overlay.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no root-level entrypoints for internal component, so vaadin-breadcrumb-trail-overlay.js and vaadin-breadcrumb-trail-overlay.d.js need to be removed - keep src versions only.

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.

3 participants