feat(breadcrumbs-flow): task 6 — Mode.ROUTER guard on child management #9485
feat(breadcrumbs-flow): task 6 — Mode.ROUTER guard on child management #9485web-padawan wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3063ad7 to
1dfcb57
Compare
|
| } | ||
|
|
||
| @Override | ||
| public <V extends @Nullable Object, S extends Signal<V>> void bindChildren( |
There was a problem hiding this comment.
Once a binding is active you can not go back to having children automatically controlled by the component. So in some way, changing the mode must fail once this has been called. There might be some internals that could be checked whether a child binding is active, rather than adding another state variable.
|
|
||
| private Mode mode; | ||
|
|
||
| private boolean routerUpdateInProgress; |
There was a problem hiding this comment.
The name is somewhat misleading because it's also used when clearing children upon switching the mode.
| } | ||
|
|
||
| @Test | ||
| void routerMode_add_throws() { |
There was a problem hiding this comment.
Can we combine the test cases into one as is done above? Seems a bit excessive at the moment.
There was a problem hiding this comment.
Does this test mode-specific behavior and should thus maybe be in BreadcrumbsModeTest?



Description
Fixes #9482
Depends on #9483
Task 6 of the Breadcrumbs SDD - based on tasks reorder in vaadin/web-components#11912.
Added overrides to disallow manual children modifications when using
Mode.ROUTER.Type of change