Collapse the button-variant fork and the canvas's duplicate work
LoadingButton kept its own copy of buttonVariants, which had drifted past `brand` and the icon sizes; it imports Button's now, so the Connect / Re-pair button can show the loader instead of swapping its own label. DashboardView mounted a second LookProvider inside the one CanvasSurface already gives it and dropped `touch` on the way, so every widget on a touch panel read `useLook().touch` as false. The provider is now mounted once, by whatever owns the canvas root. useCanvasRoot resolved the palette twice per render — once for the theme class, once for the tokens — so useDashboardTheme takes the roles the caller already has. The bar assertions in widgets.spec.ts are scoped to the Load tile rather than the page, which held only because the unbound spare bar draws no rows.
This commit is contained in:
@@ -312,6 +312,10 @@ export const isPlaced = (widgets: WidgetDef[]) =>
|
||||
* is for — so its widgets are one arrangement rather than a stack of headed
|
||||
* grids. Pages and sections left the schema in 7ff29ca; a document written
|
||||
* the old way is flattened on read.
|
||||
*
|
||||
* Drawn below a `LookProvider` mounted by whatever owns the canvas root — the
|
||||
* surface, the editor, or the panel's stacked branch — rather than mounting a
|
||||
* second one here, which could only ever restate what that one already says.
|
||||
*/
|
||||
export function DashboardView({
|
||||
dashboard,
|
||||
@@ -366,14 +370,10 @@ export function DashboardView({
|
||||
</PaletteProvider>
|
||||
)
|
||||
|
||||
return (
|
||||
<LookProvider dashboard={dashboard}>
|
||||
{editing ? (
|
||||
grid
|
||||
) : (
|
||||
<LockedProvider dashboard={dashboard}>{grid}</LockedProvider>
|
||||
)}
|
||||
</LookProvider>
|
||||
return editing ? (
|
||||
grid
|
||||
) : (
|
||||
<LockedProvider dashboard={dashboard}>{grid}</LockedProvider>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user