Skip to content

Conversation

@gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Nov 13, 2024

The basics

The details

Resolves

Fixes #5580

Proposed Changes

This PR updates the variable, dynamic variable, and procedure toolbox category definitions to use the newer JSON schema in place of the older XML-based format.

Reason for Changes

Support for XML will eventually be removed, and this serves as both eating our own dogfood and a practical example of implementing a dynamic category definition with JSON which third party developers may benefit from as a reference.

Deprecations

  • The Element[] return type of the flyoutCategory() method for each category is now deprecated. Users can opt-in to the new FlyoutItemInfo[] (JSON) return type by passing a second argument of false to the method. We expect to switch the default return type in v13.

@gonfunko gonfunko requested a review from a team as a code owner November 13, 2024 20:17
@gonfunko gonfunko requested a review from cpcallen November 13, 2024 20:17
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Nov 13, 2024
@rachel-fenichel
Copy link
Collaborator

Since we are not deleting the XML code yet, we should keep the old XML functions around.

They are exported, and external devs may be calling them from their own custom flyout categories. I think that means we need to add new functions to do all of the JSON work you're doing here, while marking the old functions as deprecated either in cod eor in comments.

@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor and removed breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Jan 8, 2025
@gonfunko gonfunko merged commit 80a6d85 into RaspberryPiFoundation:rc/v12.0.0 Jan 8, 2025
8 checks passed
@gonfunko gonfunko deleted the json-categories branch January 8, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants