Loading workspace insights... Statistics interval
7 days30 daysLatest CI Pipeline Executions
dbc43f02 feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton (#4510)
Commerce plugins (CommerceLayer, SFCC, etc.) had no way to remove a
selected resource once added. This adds a Close icon button next to the
existing edit button that clears the selection and updates the content
JSON, matching the pattern used by the reference field type.
https://www.loom.com/share/10758e859af547dca10fad16fa4bb71e
## Description
## Summary
- Adds a Close (X) icon button next to the existing edit (pencil) button
in `ResourcesPickerButton` so users can remove a selected resource
- Clears `resourceHandle`, `resourceId`, `resourceInfo` and calls
`onChange(null)` to update the content JSON
- Applies to all commerce plugins (CommerceLayer, Shopify, SFCC, etc.)
since they share `@builder.io/plugin-tools`
## Test plan
- [ ] Load a commerce plugin (e.g. CommerceLayer) locally via `npm
start`
- [ ] Add a product/resource field to a model and select a product
- [ ] Verify both edit (pencil) and remove (X) buttons appear on the
selected resource
- [ ] Click the X button and verify the resource is removed from the UI
and cleared from the content JSON
- [ ] Verify clicking "Choose {resourceName}" allows re-selecting a new
resource after removal
_Screenshot_
If relevant, add a screenshot or two of the changes you made.
Before:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 33 40 PM"
src="https://github.com/user-attachments/assets/deb2033c-be5b-4b8c-9185-73ceb8ee6fac"
/>
After fix:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 34 43 PM"
src="https://github.com/user-attachments/assets/adb76b2f-1fd5-402c-95aa-ac5b1e23bb9e"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the `CustomReactEditorProps.onChange`
type to accept `null`, which may require downstream TypeScript updates,
and adjusts CommerceLayer’s build pipeline dependencies/plugins.
>
> **Overview**
> Adds a **remove (Close/X) action** to `ResourcesPickerButton` so a
previously selected commerce resource can be cleared; it resets local
selection state and calls `onChange(null)`.
>
> Updates the shared editor prop type to allow `null` values, bumps
`@builder.io/plugin-tools` to `0.0.10`, and updates the CommerceLayer
plugin to consume it while also tweaking Rollup config/deps (adds
`@rollup/plugin-commonjs` and marks `@builder.io/sdk` as external).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
63b86d67f41bf0fd3170df682fe09269d9ddd645. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> e3784411 feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton (#4510)
Commerce plugins (CommerceLayer, SFCC, etc.) had no way to remove a
selected resource once added. This adds a Close icon button next to the
existing edit button that clears the selection and updates the content
JSON, matching the pattern used by the reference field type.
https://www.loom.com/share/10758e859af547dca10fad16fa4bb71e
## Description
## Summary
- Adds a Close (X) icon button next to the existing edit (pencil) button
in `ResourcesPickerButton` so users can remove a selected resource
- Clears `resourceHandle`, `resourceId`, `resourceInfo` and calls
`onChange(null)` to update the content JSON
- Applies to all commerce plugins (CommerceLayer, Shopify, SFCC, etc.)
since they share `@builder.io/plugin-tools`
## Test plan
- [ ] Load a commerce plugin (e.g. CommerceLayer) locally via `npm
start`
- [ ] Add a product/resource field to a model and select a product
- [ ] Verify both edit (pencil) and remove (X) buttons appear on the
selected resource
- [ ] Click the X button and verify the resource is removed from the UI
and cleared from the content JSON
- [ ] Verify clicking "Choose {resourceName}" allows re-selecting a new
resource after removal
_Screenshot_
If relevant, add a screenshot or two of the changes you made.
Before:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 33 40 PM"
src="https://github.com/user-attachments/assets/deb2033c-be5b-4b8c-9185-73ceb8ee6fac"
/>
After fix:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 34 43 PM"
src="https://github.com/user-attachments/assets/adb76b2f-1fd5-402c-95aa-ac5b1e23bb9e"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the `CustomReactEditorProps.onChange`
type to accept `null`, which may require downstream TypeScript updates,
and adjusts CommerceLayer’s build pipeline dependencies/plugins.
>
> **Overview**
> Adds a **remove (Close/X) action** to `ResourcesPickerButton` so a
previously selected commerce resource can be cleared; it resets local
selection state and calls `onChange(null)`.
>
> Updates the shared editor prop type to allow `null` values, bumps
`@builder.io/plugin-tools` to `0.0.10`, and updates the CommerceLayer
plugin to consume it while also tweaking Rollup config/deps (adds
`@rollup/plugin-commonjs` and marks `@builder.io/sdk` as external).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
63b86d67f41bf0fd3170df682fe09269d9ddd645. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> dbc43f02 feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton (#4510)
Commerce plugins (CommerceLayer, SFCC, etc.) had no way to remove a
selected resource once added. This adds a Close icon button next to the
existing edit button that clears the selection and updates the content
JSON, matching the pattern used by the reference field type.
https://www.loom.com/share/10758e859af547dca10fad16fa4bb71e
## Description
## Summary
- Adds a Close (X) icon button next to the existing edit (pencil) button
in `ResourcesPickerButton` so users can remove a selected resource
- Clears `resourceHandle`, `resourceId`, `resourceInfo` and calls
`onChange(null)` to update the content JSON
- Applies to all commerce plugins (CommerceLayer, Shopify, SFCC, etc.)
since they share `@builder.io/plugin-tools`
## Test plan
- [ ] Load a commerce plugin (e.g. CommerceLayer) locally via `npm
start`
- [ ] Add a product/resource field to a model and select a product
- [ ] Verify both edit (pencil) and remove (X) buttons appear on the
selected resource
- [ ] Click the X button and verify the resource is removed from the UI
and cleared from the content JSON
- [ ] Verify clicking "Choose {resourceName}" allows re-selecting a new
resource after removal
_Screenshot_
If relevant, add a screenshot or two of the changes you made.
Before:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 33 40 PM"
src="https://github.com/user-attachments/assets/deb2033c-be5b-4b8c-9185-73ceb8ee6fac"
/>
After fix:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 34 43 PM"
src="https://github.com/user-attachments/assets/adb76b2f-1fd5-402c-95aa-ac5b1e23bb9e"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the `CustomReactEditorProps.onChange`
type to accept `null`, which may require downstream TypeScript updates,
and adjusts CommerceLayer’s build pipeline dependencies/plugins.
>
> **Overview**
> Adds a **remove (Close/X) action** to `ResourcesPickerButton` so a
previously selected commerce resource can be cleared; it resets local
selection state and calls `onChange(null)`.
>
> Updates the shared editor prop type to allow `null` values, bumps
`@builder.io/plugin-tools` to `0.0.10`, and updates the CommerceLayer
plugin to consume it while also tweaking Rollup config/deps (adds
`@rollup/plugin-commonjs` and marks `@builder.io/sdk` as external).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
63b86d67f41bf0fd3170df682fe09269d9ddd645. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> 57944488 feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton (#4510)
Commerce plugins (CommerceLayer, SFCC, etc.) had no way to remove a
selected resource once added. This adds a Close icon button next to the
existing edit button that clears the selection and updates the content
JSON, matching the pattern used by the reference field type.
https://www.loom.com/share/10758e859af547dca10fad16fa4bb71e
## Description
## Summary
- Adds a Close (X) icon button next to the existing edit (pencil) button
in `ResourcesPickerButton` so users can remove a selected resource
- Clears `resourceHandle`, `resourceId`, `resourceInfo` and calls
`onChange(null)` to update the content JSON
- Applies to all commerce plugins (CommerceLayer, Shopify, SFCC, etc.)
since they share `@builder.io/plugin-tools`
## Test plan
- [ ] Load a commerce plugin (e.g. CommerceLayer) locally via `npm
start`
- [ ] Add a product/resource field to a model and select a product
- [ ] Verify both edit (pencil) and remove (X) buttons appear on the
selected resource
- [ ] Click the X button and verify the resource is removed from the UI
and cleared from the content JSON
- [ ] Verify clicking "Choose {resourceName}" allows re-selecting a new
resource after removal
_Screenshot_
If relevant, add a screenshot or two of the changes you made.
Before:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 33 40 PM"
src="https://github.com/user-attachments/assets/deb2033c-be5b-4b8c-9185-73ceb8ee6fac"
/>
After fix:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 34 43 PM"
src="https://github.com/user-attachments/assets/adb76b2f-1fd5-402c-95aa-ac5b1e23bb9e"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the `CustomReactEditorProps.onChange`
type to accept `null`, which may require downstream TypeScript updates,
and adjusts CommerceLayer’s build pipeline dependencies/plugins.
>
> **Overview**
> Adds a **remove (Close/X) action** to `ResourcesPickerButton` so a
previously selected commerce resource can be cleared; it resets local
selection state and calls `onChange(null)`.
>
> Updates the shared editor prop type to allow `null` values, bumps
`@builder.io/plugin-tools` to `0.0.10`, and updates the CommerceLayer
plugin to consume it while also tweaking Rollup config/deps (adds
`@rollup/plugin-commonjs` and marks `@builder.io/sdk` as external).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
63b86d67f41bf0fd3170df682fe09269d9ddd645. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> dbc43f02 feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton (#4510)
Commerce plugins (CommerceLayer, SFCC, etc.) had no way to remove a
selected resource once added. This adds a Close icon button next to the
existing edit button that clears the selection and updates the content
JSON, matching the pattern used by the reference field type.
https://www.loom.com/share/10758e859af547dca10fad16fa4bb71e
## Description
## Summary
- Adds a Close (X) icon button next to the existing edit (pencil) button
in `ResourcesPickerButton` so users can remove a selected resource
- Clears `resourceHandle`, `resourceId`, `resourceInfo` and calls
`onChange(null)` to update the content JSON
- Applies to all commerce plugins (CommerceLayer, Shopify, SFCC, etc.)
since they share `@builder.io/plugin-tools`
## Test plan
- [ ] Load a commerce plugin (e.g. CommerceLayer) locally via `npm
start`
- [ ] Add a product/resource field to a model and select a product
- [ ] Verify both edit (pencil) and remove (X) buttons appear on the
selected resource
- [ ] Click the X button and verify the resource is removed from the UI
and cleared from the content JSON
- [ ] Verify clicking "Choose {resourceName}" allows re-selecting a new
resource after removal
_Screenshot_
If relevant, add a screenshot or two of the changes you made.
Before:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 33 40 PM"
src="https://github.com/user-attachments/assets/deb2033c-be5b-4b8c-9185-73ceb8ee6fac"
/>
After fix:
<img width="1470" height="762" alt="Screenshot 2026-04-13 at 8 34 43 PM"
src="https://github.com/user-attachments/assets/adb76b2f-1fd5-402c-95aa-ac5b1e23bb9e"
/>
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Moderate risk because it changes the `CustomReactEditorProps.onChange`
type to accept `null`, which may require downstream TypeScript updates,
and adjusts CommerceLayer’s build pipeline dependencies/plugins.
>
> **Overview**
> Adds a **remove (Close/X) action** to `ResourcesPickerButton` so a
previously selected commerce resource can be cleared; it resets local
selection state and calls `onChange(null)`.
>
> Updates the shared editor prop type to allow `null` values, bumps
`@builder.io/plugin-tools` to `0.0.10`, and updates the CommerceLayer
plugin to consume it while also tweaking Rollup config/deps (adds
`@rollup/plugin-commonjs` and marks `@builder.io/sdk` as external).
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
63b86d67f41bf0fd3170df682fe09269d9ddd645. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com>