Fix broken categories in pxtToolbox#1046
Conversation
|
I tried moving the namespace attributes into my libraries and it worked. To be honest I don't know why this works. 2024-02-07_00-30-43.mp4 |
|
I have corrected the Brick category as follows. I also thought that maybe I should move the files with the namespace brick from the core to the ev3 library. But this breaks the build, even though I specified the dependencies. 2024-02-07_13-33-55.mp4 |
|
@jwunderl hi, can you see the change? |
|
@abchatra a pls review is needed here |
|
@riknoll possible to review this? |
There was a problem hiding this comment.
Pull request overview
This PR addresses a regression where the MakeCode/PXT toolbox categories can break when certain extensions are added by relocating/adding the namespace-level toolbox metadata (colors, icons, groups) into the packages that own those namespaces more consistently.
Changes:
- Add toolbox metadata for the
musiccategory via a newlibs/music/ns.ts. - Move toolbox category metadata for
motors,sensors,control, andbrickfromlibs/ev3/ns.tsintolibs/core/ns.ts. - Minor whitespace/formatting adjustments in
libs/ev3/pxt.json.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| libs/music/ns.ts | Adds namespace annotations to stabilize the music toolbox category/groups. |
| libs/ev3/pxt.json | Formatting-only changes (no semantic change). |
| libs/ev3/ns.ts | Removes category metadata for namespaces now defined in core/music; keeps EV3-specific categories. |
| libs/core/ns.ts | Centralizes category metadata for core namespaces to avoid extension-order/category breakage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I created a fix for pxtToolbox which breaks when adding some extensions. This bug appeared during the first beta version. I have attached a video of how this happens.
I actually don't understand why this leads to such a bug and why my solution works.
But adding custom.ts solved the bug. I don't know why this happens either.
Another observation worth noting is that the extensions that come from github do not break the categories in pxtToolbox.
2024-02-07_00-24-41.mp4