Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ For current development version of Console, use `4.x.0-prerelease.n` packages.
For older 1.x plugin SDK packages, refer to "OpenShift Console Versions vs SDK Versions" compatibility
table in [Console dynamic plugins README](./README.md).

## 4.23.0-prerelease.6 - TBD

- Add an `onCancel` prop to `ResourceYAMLEditor` to allow overriding the default cancel behavior ([CONSOLE-5438], [#16941])

## 4.23.0-prerelease.5 - 2026-08-04

- **Deprecated**: The use of multiple predicates in the `useResolvedExtensions` hook is deprecated ([#16115], [CONSOLE-5065])
Expand Down Expand Up @@ -254,6 +258,7 @@ table in [Console dynamic plugins README](./README.md).
[CONSOLE-5361]: https://issues.redhat.com/browse/CONSOLE-5361
[CONSOLE-5415]: https://issues.redhat.com/browse/CONSOLE-5415
[CONSOLE-5424]: https://issues.redhat.com/browse/CONSOLE-5424
[CONSOLE-5438]: https://issues.redhat.com/browse/CONSOLE-5438
[OCPBUGS-19048]: https://issues.redhat.com/browse/OCPBUGS-19048
[OCPBUGS-30077]: https://issues.redhat.com/browse/OCPBUGS-30077
[OCPBUGS-31355]: https://issues.redhat.com/browse/OCPBUGS-31355
Expand Down Expand Up @@ -349,3 +354,4 @@ table in [Console dynamic plugins README](./README.md).
[#16726]: https://github.com/openshift/console/pull/16726
[#16750]: https://github.com/openshift/console/pull/16750
[#16762]: https://github.com/openshift/console/pull/16762
[#16941]: https://github.com/openshift/console/pull/16941
1 change: 1 addition & 0 deletions frontend/packages/console-dynamic-plugin-sdk/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2200,6 +2200,7 @@ A lazy loaded YAML editor for Kubernetes resources with hover help and completio
| `initialResource` | YAML/Object representing a resource to be shown by the editor. This prop is used only during the inital render. |
| `header` | Add a header on top of the YAML editor. |
| `onSave` | Callback for the Save button. Passing it will override the default update performed on the resource by the editor. |
| `onCancel` | Callback function to be called on cancel. Passing it will override the default behavior of the cancel button. |
| `readOnly` | Sets the YAML editor to read-only mode. |
| `create` | Editor will be on creation mode. Create button will replace the Save and Cancel buttons. If no onSave method defined, the 'Create' button will trigger the creation of the defined resource. Default: false |
| `onChange` | Callback triggered at any editor change. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ export const CodeEditor: ForwardRefExoticComponent<
* @param {ResourceYAMLEditorProps['initialResource']} initialResource - YAML/Object representing a resource to be shown by the editor. This prop is used only during the inital render.
* @param {ResourceYAMLEditorProps['header']} header - Add a header on top of the YAML editor.
* @param {ResourceYAMLEditorProps['onSave']} onSave - Callback for the Save button. Passing it will override the default update performed on the resource by the editor.
* @param {ResourceYAMLEditorProps['onCancel']} onCancel - Callback function to be called on cancel. Passing it will override the default behavior of the cancel button.
* @param {ResourceYAMLEditorProps['readOnly']} readOnly - Sets the YAML editor to read-only mode.
* @param {ResourceYAMLEditorProps['create']} create - Editor will be on creation mode. Create button will replace the Save and Cancel buttons. If no onSave method defined, the 'Create' button will trigger the creation of the defined resource. Default: false
* @param {ResourceYAMLEditorProps['onChange']} onChange - Callback triggered at any editor change.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,7 @@ export type ResourceYAMLEditorProps = {
initialResource: K8sResourceKind;
header?: string;
onSave?: (content: string) => void;
onCancel?: () => void;
readOnly?: boolean;
create?: boolean;
onChange?: (content: string) => void;
Expand Down
2 changes: 2 additions & 0 deletions frontend/public/components/droppable-edit-yaml.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ export const ResourceYAMLEditor: FC<ResourceYAMLEditorProps> = ({
initialResource,
header,
onSave,
onCancel,
readOnly,
create,
onChange,
Expand All @@ -171,6 +172,7 @@ export const ResourceYAMLEditor: FC<ResourceYAMLEditorProps> = ({
initialResource={initialResource}
header={header}
onSave={onSave}
onCancel={onCancel}
readOnly={readOnly}
create={create}
onChange={onChange}
Expand Down