microsoft / pxt-robotis

Microsoft MakeCode for ROBOTIS
https://5d8c71b7-aa36-4a68-a9cb-288b989efb08.pxt.io/
MIT License
4 stars 7 forks source link

When adding an item to bannedCategories, the related block is not visible. #39

Open kjsii123 opened 4 years ago

kjsii123 commented 4 years ago

<robotis-cm-550/pxt.json> 스크린샷 2020-04-03 오후 12 31 51

<screen-st7735/targetoverrides.ts> 스크린샷 2020-04-03 오후 12 32 31

![스크린샷 2020-04-03 오후 12 32 55](https://user-images.githubusercontent.com/12948544/78322755-9bfa8c80-75aa-11ea-80e6-2d2c84ace869.png) result: ![스크린샷 2020-04-03 오후 12 35 10](https://user-images.githubusercontent.com/12948544/78323086-bc771680-75ab-11ea-8046-e5885bb0675d.png) I created an image related block (using targetoverrides on screen--st7735). And if don't put any items in bannedCategories like the image above, the block will be exposed. **[Issue]** ![스크린샷 2020-04-03 오후 12 48 02](https://user-images.githubusercontent.com/12948544/78323167-fb0cd100-75ab-11ea-8732-f88dd1330b54.png) ![스크린샷 2020-04-03 오후 12 48 07](https://user-images.githubusercontent.com/12948544/78323169-fcd69480-75ab-11ea-86d7-c4843acde1d4.png) After that, the image category was unnecessary, so I applied “image” to the forbidden category. Then the "image" category was successfully removed, but I had the problem that the blocks I made were not exposed. **Does this issue occur when a class related to a category entered in bannedCategories is used in a block? If so, what should I do to expose the blocks I create and not the Image category?** Thanks in advance for your help.
pelikhan commented 4 years ago

How do i repro this?

kjsii123 commented 4 years ago
  1. Add screen-st7735 "to pxt.json dependencies.
  2. Create a block using background_image_picker.   -Refer to the export function robotisBackgroundimage of <screen-st7735 / targetoverrides.ts> among the images above.
  3. Add images to the bannedCategories item of pxtarget.json "runtime".
  4. build
pelikhan commented 4 years ago

Could you create a branch or pull requests with the changes so that I can try this out?

kjsii123 commented 4 years ago

https://github.com/kjsii123/pxt-robotis/tree/category-filter

I uploaded it to this branch.