Skip to content

home + liveSensorGraph rework on new ui libs, toggle sensor picker, restore core icons - #8

Merged
KierPalin merged 3 commits into
microbit-apps:version/1.9from
humanapp:eanders/version/1.9
Jun 24, 2026
Merged

KierPalin merged 3 commits into
microbit-apps:version/1.9from
humanapp:eanders/version/1.9

Conversation

@humanapp

Copy link
Copy Markdown

Summary

These are adjustments to microdata's Home and Live Sensor Graph screens -- refining how they use the new ui-controls framework and smoothing some rough edges (on both sides!). Going through the port surfaced several gaps in the framework, so this also includes companion changes to those libraries (in ui-core and ui-controls repos) to make the usage cleaner.

Home screen

  • Replaced the four hand-placed UiButtons and the manual left/right navigation with a single ui.UiRow. Layout and focus navigation come from the row, so the handleInput override is gone.

Live Sensor Graph

  • Moved the action buttons into a ui.UiRow.
  • Replaced the asymmetric Add/Remove flow with a sensor picker that toggles channels on and off -- multi-select, keyed by sensor name. Selected cells get a thick yellow border; the focus ring still marks the cursor.
  • The per-channel readout (name / value / unit) now uses ui.UiStack columns instead of absolute positioning.
  • Made the graph's center reference line dotted. It was reading as a data trace to my eye.

Icons

  • Restored the icons from user-interface-base into ui-core, and removed them from microdata.
  • Unused icons still tree-shake, since only referenced/mapped icons get pulled in.

Framework changes this surfaced (done in the ui-core & ui-controls repos)

Companion changes that made the above possible:

  • UiStack -- a simple row/column view container (labels previously had to be absolutely positioned).
  • UiRow content-measuring, plus a wrap option.
  • UiScreen.remove() -- there was no way to remove an added view.
  • UiPicker used as a grid; a button-style borderThickness for the selection mark.
  • UiMapAssets -- a tree-shake-friendly id-->bitmap resolver (entries can be a bitmap or a factory).
  • A slower default key-repeat interval.
  • The shared icon set relocated into ui-core.

Misc

  • I changed a dependency name in pxt.json (user-interface-base --> ui-controls). You should mkc install if working in vscode.
  • I believe I found and fixed the "Press A on screen load" startup crash. Please let me know if you can still repro.
  • Regarding "Maybe we want a way to enable different words in a label to have different colours.", we might consider using something like Minecraft's formatting codes to switch color and style mid-string, e.g. §0, §1, etc.

cc @thomasjball, @KierPalin

@thomasjball
thomasjball requested a review from KierPalin June 24, 2026 01:09
@KierPalin

Copy link
Copy Markdown

Thanks for the review @humanapp! These are great changes. I think we've made good progress in these past weeks and these fixes are helpful for the rest of the redesign too.

With regard to the label text colouring: It's a bit early to say whether or not it is a common issue or just something I needed here and I worry it might be a bit annoying to implement; but maybe we can talk about this more on call.

@KierPalin
KierPalin merged commit 5f0d321 into microbit-apps:version/1.9 Jun 24, 2026
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