microsoft / microsoft/pxt

Some extension subcategories can go missing

Open
#7,581 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
2.3k
Forks
641
Avg merge
12h 4m
Merged PRs (30d)
57

Description

Problem

Loading an extension and then loading a second extension that contains the first can lead to missing subcategories.

Repro Steps
  1. Open up a Microbit and reset the page or clear the __pxt_apis_microbit indexed db entry.
  2. Start a new project and load the makerbit-lcd1602 extension. You'll see a MakerBit category in the toolbox with LCD1602 and LCD2004 subcategories under it.
  3. Load the makerbit extension, which includes the same lcd1602 code. You'll now see that the LCD2004 category is gone while the LCD1602 category remains.

If you look for 2004 in the toolbox search bar, you'll still be able to find the LCD2004 blocks.

Expected Behavior

The expected behavior is that the LCD2004 subcategory should not disappear.

Note

The problem probably lies with how namespaces for extensions are defined.

After Loading Just the makerbit-lcd1602 extension

JustLCD

After loading the makerbit extension as well

MakerbitAndLcd

Searching for the LCD2004 blocks

image

Desktop:
  • OS: Windows 10 1909
  • Browser Microsoft Edge v. 86.0.622.56
  • makecode.microbit.org version: 3.0.43
  • Microsoft MakeCode version: 6.0.28
  • microbit runtime version: v2.2.0-rc6
Additional context

Refer to #7562 for additional context.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on the Microbit target by loading makerbit-lcd1602, then makerbit, and compare the toolbox categories with the toolbox search results. Start by tracing how extension namespaces and toolbox subcategories are defined and merged; issue #7562 provides additional context. Done means LCD2004 remains visible after both extensions are loaded.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.