Skip to content

[breadcrumbs] Task 5: Breadcrumbs — Mode enum, constructors, mode switching #9481

Description

@web-padawan

Implementation task 5 of the Breadcrumbs Flow component (spec-driven development pipeline).

What to do:

  • Add the public nested Mode enum (ROUTER, MANUAL) and the two constructors: Breadcrumbs() (defaults to Mode.ROUTER) and Breadcrumbs(Mode)
  • Implement getMode() and setMode(Mode) with the symmetric clear-and-rewire contract: both transitions discard existing children; ROUTER → MANUAL also unregisters the navigation listener (once it exists, Task 7); MANUAL → ROUTER triggers an initial trail build
  • setMode with the current mode value is a no-op
  • The Mode.ROUTER guard on add/remove/removeAll is NOT added here — it lands in Task 6 (the inherited child-management methods are already available from Task 1). Router listener wiring lands in Task 7; here setMode(ROUTER) only flips the internal flag and clears children.

Spec references:

Depends on #9377 (Task 1).

Part of vaadin/web-components#7960

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions