Skip to content

Update hints to handle edge cases and reduce move hint frequency#823

Merged
microbit-grace merged 16 commits intobetafrom
hints
Mar 31, 2026
Merged

Update hints to handle edge cases and reduce move hint frequency#823
microbit-grace merged 16 commits intobetafrom
hints

Conversation

@microbit-grace
Copy link
Copy Markdown

@microbit-grace microbit-grace commented Mar 27, 2026

New edge cases considered:

  • Prioritise record hint for first action if first action has name, but no data samples.
  • Prioritise add action name hint for first action if first action does not have name or data samples.

Move hint visibility has been updated so that:

  • It cycles through 2s wobbling and 5s pausing four times. If the user has not moved the micro:bit, it disappears.
  • It does not get reinstated after reconnecting within a session.
  • It gets hidden after deleting action(s)/recording.
  • It gets hidden after being connected in testing model page.
  • It gets hidden if an action name input field changes.

Fixes #803

@github-actions
Copy link
Copy Markdown

Preview build will be at
https://review-createai.microbit.org/hints/

@microbit-grace microbit-grace marked this pull request as draft March 27, 2026 14:44
@microbit-grace microbit-grace marked this pull request as ready for review March 30, 2026 15:05
@microbit-grace
Copy link
Copy Markdown
Author

microbit-grace commented Mar 30, 2026

Rebased on top of latest beta changes to check longer text length when in different languages.

Comment thread src/pages/DataSamplesPage.tsx Outdated
dataSamplesHint.type === "move-microbit" &&
settings.toursCompleted.includes("Connect")
) {
setTimeout(() => setHasMoved(true), moveMicrobitHintTimeoutInSec * 1000);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setTimeout is not cleaned up. If the effect re-runs (e.g., user disconnects/reconnects, dialog opens/closes), a new timeout is scheduled each time without cancelling the previous one. Probably no actual harm because it's store state but I still think this should return a cleanup function. Might be easier if the effect is split in two.

Copy link
Copy Markdown

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One timeout tidy up but otherwise this looks good to me.

Copy link
Copy Markdown

@microbit-matt-hillsdon microbit-matt-hillsdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for working through these tweaks.

@microbit-grace microbit-grace merged commit 863b6f4 into beta Mar 31, 2026
1 check passed
@microbit-grace microbit-grace deleted the hints branch March 31, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants