Forces a shrink step on everything it wraps, instead of letting toolbars measure their own width.
Intended for stories and tests: measuring needs a layout engine, which jsdom does not have. In
the app, render toolbars without this and let them measure themselves.
It sets both shrink-step contexts, so it works whether or not a toolbar sits between it and the
component under test. A toolbar inside it reads the override and republishes that same value to
its descendants; a component that only reads a step picks the value up directly, with no toolbar
needed in between.
The override applies to the whole subtree and no toolbar resets it, so every nested toolbar
beneath it is pinned to value — not just the nearest one. Wrap the narrowest subtree that needs
it.
Forces a shrink step on everything it wraps, instead of letting toolbars measure their own width.
Intended for stories and tests: measuring needs a layout engine, which jsdom does not have. In the app, render toolbars without this and let them measure themselves.
It sets both shrink-step contexts, so it works whether or not a toolbar sits between it and the component under test. A toolbar inside it reads the override and republishes that same value to its descendants; a component that only reads a step picks the value up directly, with no toolbar needed in between.
The override applies to the whole subtree and no toolbar resets it, so every nested toolbar beneath it is pinned to
value— not just the nearest one. Wrap the narrowest subtree that needs it.