Skip to content

Commit f322b68

Browse files
Upgrade @microbit/ui to 0.1.0-alpha.15
The pin catches up with the library work classroom's migration added, so the `../ui` symlink this app has been carrying since `dense-preset` landed is no longer needed. AGENTS.md now describes linking as a local-development arrangement rather than as the current state, since which mode is in force will change often. Three library renderings change here, all deliberate corrections: Tooltip takes Chakra's colour, padding and radius (fba05fb), Icon sets Chakra's vertical-align itself rather than relying on Panda's preflight (2f7e18a), and Avatar shows its fallback until a photo loads (c80530d). The Icon change is what moves `va_middle` earlier in the documentation-content snapshot: the same three atomic classes in a different order, since the component now supplies the property the call site used to be alone in setting. Modal's isOpen/onClose became a union in the library and broke prop-forwarding shells, but this app has none — the eight affected files were all in ml-trainer. Verified: typecheck, lint, 217 unit tests, production build.
1 parent d6937d6 commit f322b68

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

AGENTS.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ apply to new code. The private theme package is the sibling repo
1111
symlink locally — re-create it after `npm install`). The visual fidelity
1212
harness is `npm run fidelity` (see `bin/fidelity.mjs`).
1313

14-
`@microbit/ui` is currently **also** consumed via a manual symlink to
15-
`../ui/packages/ui`, because classroom's migration is adding to the library
16-
and this app tracks those changes (`panda.config.ts` imports
17-
`@microbit/ui/dense-preset`, which the pinned published version predates).
18-
Re-create that symlink after `npm install` too, and regenerate clean
19-
afterwards (`rm -rf styled-system && npm run panda`) — incremental codegen
20-
does not detect external preset changes. Both go away when the pin moves to
21-
the next published alpha.
14+
`@microbit/ui` is consumed as the **published package**, pinned in
15+
`package.json`. To develop against a local `../ui` checkout instead — what you
16+
want whenever a change spans the library and this app — symlink
17+
`node_modules/@microbit/ui` to `../ui/packages/ui`, the same arrangement as the
18+
theme package above. Re-create it after `npm install` (which restores the pinned
19+
version), and regenerate clean afterwards (`rm -rf styled-system && npm run
20+
panda`) — incremental codegen does not detect external preset changes.
21+
`resolve.dedupe` in `vite.config.ts` is what stops the symlinked package loading
22+
its own copies of React and friends, so leave it in place either way.
2223

2324
## Commands
2425

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@codemirror/view": "^6.26.3",
2222
"@microbit/microbit-connection": "^1.0.0",
2323
"@microbit/microbit-fs": "^0.10.0",
24-
"@microbit/ui": "0.1.0-alpha.14",
24+
"@microbit/ui": "0.1.0-alpha.15",
2525
"@sanity/block-content-to-react": "^3.0.0",
2626
"@sanity/image-url": "^1.0.1",
2727
"@testing-library/jest-dom": "^5.14.1",

src/documentation/common/DocumentationContent.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe("DocumentationContent", () => {
4141
];
4242
const view = render(<DocumentationContent blocks={content} />);
4343
expect(view.container.innerHTML).toMatchInlineSnapshot(
44-
`"<div class="d_flex flex-d_column gap_3 mt_3"><p><a href="https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4" target="_blank" rel="nofollow noopener" class="cursor_pointer td_none ring_none trs-prop_background-color,_border-color,_color,_fill,_stroke,_opacity,_box-shadow,_transform trs-dur_normal hover:td_underline focusVisible:focus-shadow_outline c_brand.600">Read more about ASCII<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="w_1em h_1em d_inline-block lh_1em flex-sh_0 fill_currentColor mb_0.333em ml_1 va_middle" focusable="false" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z"></path></svg></a>.</p></div>"`
44+
`"<div class="d_flex flex-d_column gap_3 mt_3"><p><a href="https://www.bbc.co.uk/bitesize/guides/zscvxfr/revision/4" target="_blank" rel="nofollow noopener" class="cursor_pointer td_none ring_none trs-prop_background-color,_border-color,_color,_fill,_stroke,_opacity,_box-shadow,_transform trs-dur_normal hover:td_underline focusVisible:focus-shadow_outline c_brand.600">Read more about ASCII<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 24 24" class="w_1em h_1em d_inline-block lh_1em flex-sh_0 fill_currentColor va_middle mb_0.333em ml_1" focusable="false" aria-hidden="true" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M10 6V8H5V19H16V14H18V20C18 20.5523 17.5523 21 17 21H4C3.44772 21 3 20.5523 3 20V7C3 6.44772 3.44772 6 4 6H10ZM21 3V11H19L18.9999 6.413L11.2071 14.2071L9.79289 12.7929L17.5849 5H13V3H21Z"></path></svg></a>.</p></div>"`
4545
);
4646
});
4747

0 commit comments

Comments
 (0)