-
Notifications
You must be signed in to change notification settings - Fork 388
feat(editor): fix bug in save & apply logic #3597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(editor): fix bug in save & apply logic #3597
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: blazethunderstorm The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this issue is waiting on input from the design team, will set to draft for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this, be sure to keep the branch up to date with main, squash all merge commits, and use the commit/PR title format described in our commit guidelines
@@ -480,6 +480,42 @@ export default function EditorDialog(props: EditorDialogProps) { | |||
</FormGroup> | |||
</Grid> | |||
</Grid> | |||
<Box display="flex" gap={2} pb={2}> | |||
<Button variant="outlined" component="label"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice if the button matched the styling of the rest of the app, it stands out a bit too much currently
@@ -480,6 +480,42 @@ export default function EditorDialog(props: EditorDialogProps) { | |||
</FormGroup> | |||
</Grid> | |||
</Grid> | |||
<Box display="flex" gap={2} pb={2}> | |||
<Button variant="outlined" component="label"> | |||
Upload YAML |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use translation for text like this: t('translation|Upload YAML')
} | ||
}} | ||
> | ||
Load from URL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here: t('translation|Load from URL')
<Button | ||
variant="outlined" | ||
onClick={async () => { | ||
const url = prompt('Enter URL to load YAML from:'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here with the translation, this isn't accessible atm
setCode({ code: text, format: 'yaml' }); | ||
setError(''); | ||
} catch (err) { | ||
setError(`Failed to fetch YAML: ${(err as Error).message}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here with the translation
Summary
This PR proicdes the option to add yaml file from local or from url also
Related Issue
Fixes #3488
Changes
Added two buttons:
Upload YAML – lets you choose a .yaml file from your system and loads it into the editor.
Load from URL – lets you paste a link to a YAML file, fetches it, and shows it in the editor.
Steps to Test
Open the YAML editor in the app
click on create button
Click on load or uplaod yaml
file is openend like yaml is loaded save and apply
Screenshots (if applicable)
Screencast.from.2025-07-08.20-24-29.mp4
Notes for the Reviewer