Skip to content

Conversation

@johnnesky
Copy link
Contributor

The basics

The details

Resolves

Fixes: #2206

It also fixes an unreported bug where importing XML duplicated all blocks.

Proposed Changes

Adds a button between the editor tabs and the "Auto" checkbox to import the tab editor contents to the workspace, reusing the existing logic that is accessible via the right-click context menu or the ctrl-enter keyboard shortcut.

Also there was a bug in the existing logic for importing from XML, where the imported blocks would be added on top of any existing blocks in the workspace without first clearing the workspace. The logic has been updated to clear the workspace first.

The new button is hidden when a tab other than the XML or JSON tab is selected.

The new button looks like this:
image

Reason for Changes

It's hard for users to discover the option to import via the right click menu.

Test Coverage

N/A

Documentation

None, although having a visible button is an improvement over the context menu.

@johnnesky johnnesky requested a review from a team as a code owner February 1, 2025 02:17
@johnnesky johnnesky requested review from gonfunko and removed request for a team February 1, 2025 02:17
@gonfunko gonfunko merged commit fed7ee0 into RaspberryPiFoundation:master Feb 7, 2025
10 checks passed
@johnnesky johnnesky deleted the nesky_playground_import branch February 7, 2025 19:07
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.

auto deserialize JSON/XML in advanced playground

2 participants