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
Implementation task 5 of the Breadcrumbs Flow component (spec-driven development pipeline).
What to do:
Modeenum (ROUTER,MANUAL) and the two constructors:Breadcrumbs()(defaults toMode.ROUTER) andBreadcrumbs(Mode)getMode()andsetMode(Mode)with the symmetric clear-and-rewire contract: both transitions discard existing children;ROUTER → MANUALalso unregisters the navigation listener (once it exists, Task 7);MANUAL → ROUTERtriggers an initial trail buildsetModewith the current mode value is a no-opMode.ROUTERguard onadd/remove/removeAllis 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; heresetMode(ROUTER)only flips the internal flag and clears children.Spec references:
Depends on #9377 (Task 1).
Part of vaadin/web-components#7960