Skip to content

Commit d7db7d7

Browse files
Upgrade to @microbit/ui@0.1.0-alpha.22 (#1252)
Tooltips now wait ~1.5s before their first appearance, react-aria's warmup, which the library had been overriding to 0 for Chakra parity. The wait is per bout of interest rather than per control — a global warm flag opens every tooltip after the first instantly — so the toolbar no longer fires a tooltip at a pointer merely crossing New, Send, Save and Reset, and the drag hints on code blocks and API signatures stay out of the way while reading. ProjectNameEditable opts out with delay={0}: its trigger is a pencil and nothing else, so the tooltip is the only visible explanation and a wait reads as broken. That is the rule for the whole family — pass 0 where the tooltip is the label, leave the default where the control already says what it is. Tooltips also linger ~500ms after mouse-out rather than closing instantly, which is what lets the pointer move onto one to read it (WCAG 1.4.13).
1 parent a532547 commit d7db7d7

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

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.21",
24+
"@microbit/ui": "0.1.0-alpha.22",
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/project/ProjectNameEditable.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const ProjectNameEditable = ({
4141
label={intl.formatMessage({ id: "edit-name-project-hover" })}
4242
placement="top start"
4343
key="button"
44+
// The button is a pencil and nothing else, so the tooltip is its only
45+
// visible explanation: no warmup.
46+
delay={0}
4447
>
4548
<IconButton
4649
size="md"

0 commit comments

Comments
 (0)