Skip to content

Conversation

@jwunderl
Copy link
Member

@jwunderl jwunderl commented Feb 2, 2026

build https://arcade.makecode.com/app/3928b4381f0337f3cfdb490076b29faa86d52c1a-97e398c5f5

adds the target toggles from pxtjson to gitjson as well (which is only used for share as asset pack currently)
image

Could do a button that opens project settings instead, since description / other stuff going in there? Could go either way personally, toggle doesn't feel too out of place.

Does bump you down slightly the first time it's pressed since it immediately updates like this:
image

@jwunderl jwunderl requested review from a team and abchatra February 2, 2026 23:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for pxtJsonOptions (such as "Import as asset Pack") to the GitHub extension zone, making configuration toggles available in the GitHub UI that were previously only accessible in the project settings editor. The feature enables extension authors to configure project properties directly from the GitHub integration interface.

Changes:

  • Added togglePxtJsonOption method to GithubComponent class to handle checkbox toggle events
  • Integrated pxtJsonOptions rendering in the ExtensionZone component
  • Imported Checkbox component for toggle UI

jwunderl and others added 2 commits February 3, 2026 10:29
@abchatra
Copy link
Collaborator

abchatra commented Feb 3, 2026

This toggle looks good to me.

@jwunderl jwunderl merged commit 9059125 into master Feb 3, 2026
20 checks passed
@jwunderl jwunderl deleted the dev/jwunderl/ext-zone-import-as-asset-pack branch February 3, 2026 21:29
@THEb0nny
Copy link
Contributor

THEb0nny commented Feb 3, 2026

@jwunderl Is it possible to make a pxtjson text field? And how can I access it in the editor to read the value?

@riknoll
Copy link
Member

riknoll commented Feb 3, 2026

@THEb0nny only toggle switches are currently supported. What are you trying to do?

@THEb0nny
Copy link
Contributor

THEb0nny commented Feb 4, 2026

@riknoll I'd like to have a text field where I can specify the folder name for uploading the project to ev3. By default, it's uploaded to the BrkProg_SAVE path.
https://github.com/microsoft/pxt-ev3/blob/46e54b7751a1c5e591af3bdd68b95654af6a6187/editor/deploy.ts#L259C25-L259C37

I changed this constant, and the editor loaded it into ev3 using a new path, creating a folder.
Therefore, I would like to have a text field that, if filled in, would be used in the editor.

I tried to do this, but I didn't understand how to access the field from the project's json.pxt in deploy.ts.

As I understand it, I could do this even without a text field by specifying my property using the pxt.json text editor. But I don't know how to access the project field in deploy.ts. Can you help?

@riknoll
Copy link
Member

riknoll commented Feb 4, 2026

@THEb0nny the compile result object passed into that function should have a fileSystem property that contains the entire source of the compiled program including pxt.json

@THEb0nny
Copy link
Contributor

THEb0nny commented Feb 4, 2026

@riknoll I implemented it like this. But there is no pxt.json file...

export function deployCoreAsync(resp: pxtc.CompileResult) {
    const fileSystem = resp.fileSystem;
   
    console.log("All files в fileSystem:", Object.keys(fileSystem));
    
    const pxtJsonString = fileSystem["pxt.json"];
    
    if (!pxtJsonString) {
        throw new Error("pxt.json not found");
    }

console out:

    [
    "pxt_modules/base/pxt-core.d.ts",
    "pxt_modules/base/pxt-helpers.ts",
    "pxt_modules/base/fixed.ts",
    "pxt_modules/base/buffer.ts",
    "pxt_modules/base/shims.d.ts",
    "pxt_modules/base/enums.d.ts",
    "pxt_modules/base/math.ts",
    "pxt_modules/base/ns.ts",
    "pxt_modules/base/control.ts",
    "pxt_modules/base/interval.ts",
    "pxt_modules/base/gcstats.ts",
    "pxt_modules/base/poll.ts",
    "pxt_modules/base/console.ts",
    "pxt_modules/base/json.ts",
    "pxt_modules/base/templates.ts",
    "pxt_modules/base/eventcontext.ts",
    "pxt_modules/base/pause.ts",
    "pxt_modules/base/forever.ts",
    "pxt_modules/base/utfdecoder.ts",
    "pxt_modules/base/scheduling.ts",
    "pxt_modules/base/controlmessage.ts",
    "pxt_modules/base/perfcounters.ts",
    "pxt_modules/core/timer.ts",
    "pxt_modules/core/buttons.ts",
    "pxt_modules/core/indicator.ts",
    "pxt_modules/core/battery.ts",
    "pxt_modules/core/output.ts",
    "pxt_modules/core/core.ts",
    "pxt_modules/core/input.ts",
    "pxt_modules/core/shims.d.ts",
    "pxt_modules/core/enums.d.ts",
    "pxt_modules/core/dal.d.ts",
    "pxt_modules/core/ns.ts",
    "pxt_modules/core/integrator.ts",
    "pxt_modules/core/cooperate.ts",
    "pxt_modules/color-sensor/color.ts",
    "pxt_modules/color-sensor/ns.ts",
    "pxt_modules/gyro-sensor/gyro.ts",
    "pxt_modules/infrared-sensor/ir.ts",
    "pxt_modules/music/enums.d.ts",
    "pxt_modules/music/shims.d.ts",
    "pxt_modules/music/melodies.ts",
    "pxt_modules/music/music.ts",
    "pxt_modules/music/piano.ts",
    "pxt_modules/music/sounds.ts",
    "pxt_modules/music/ns.ts",
    "pxt_modules/screen/image.ts",
    "pxt_modules/screen/screenimage.ts",
    "pxt_modules/screen/text.ts",
    "pxt_modules/screen/frame.ts",
    "pxt_modules/screen/shims.d.ts",
    "pxt_modules/screen/fieldeditors.ts",
    "pxt_modules/screen/targetoverrides.ts",
    "pxt_modules/screen/ns.ts",
    "pxt_modules/screen/image.d.ts",
    "pxt_modules/screen/imagesoverrides.ts",
    "pxt_modules/touch-sensor/touch.ts",
    "pxt_modules/ultrasonic-sensor/ultrasonic.ts",
    "pxt_modules/ev3/ns.ts",
    "pxt_modules/ev3/brick.ts",
    "pxt_modules/ev3/startup.ts",
    "pxt_modules/ev3/images.ts",
    "pxt_modules/ev3/mood.ts",
    "pxt_modules/ev3/console.ts",
    "pxt_modules/ev3/shims.d.ts",
    "main.ts"
]

pxt.json not found

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.

5 participants