Skip to content
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

[#198] the yaml editor allows to enter new Lines #273

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

lavocatt
Copy link
Collaborator

@lavocatt lavocatt commented Aug 14, 2024

Previously the yaml editor wasn't allowing us to add new lines. This was because at each keystroke the yaml file was formated automatically, removing unecessary lines..
This meant that the user had to use tricks like copy&pasting to get to a state the wanted to have.

To fix that, this commits reverts back to using the resource editor provided by the console. It has several advantages:

  • The use can edit the file as they want without bugs
  • There's documentation included from the CRDs when hovering properties

The main drawback is that the user needs to click on save to save their changes to the model, then needs to click on apply to apply their config (either creating or updating)

fixes #198

@lavocatt lavocatt force-pushed the yamleditor branch 2 times, most recently from fe4e948 to 9a2ded9 Compare August 14, 2024 14:47
@lavocatt
Copy link
Collaborator Author

This PR is currently blocked on https://issues.redhat.com/browse/OCPBUGS-38484

@lavocatt lavocatt marked this pull request as draft August 14, 2024 14:47
@lavocatt lavocatt force-pushed the yamleditor branch 2 times, most recently from 69ff645 to b372fd4 Compare September 5, 2024 12:45
@lavocatt lavocatt marked this pull request as ready for review September 5, 2024 12:45
@lavocatt
Copy link
Collaborator Author

lavocatt commented Sep 5, 2024

This PR is currently blocked on https://issues.redhat.com/browse/OCPBUGS-38484

Upgrading to patternfly5 fixed the issue for us.

@Msarawan
Copy link
Collaborator

Msarawan commented Sep 9, 2024

Hello @lavocatt , could you please rebase the branch with the main branch.

@lavocatt lavocatt force-pushed the yamleditor branch 2 times, most recently from e01fcd3 to de73446 Compare September 10, 2024 11:53
Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 46.68%. Comparing base (ab563a2) to head (de73446).

Files with missing lines Patch % Lines
src/reducers/7.12/reducer.ts 47.05% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #273      +/-   ##
==========================================
- Coverage   46.68%   46.68%   -0.01%     
==========================================
  Files          52       52              
  Lines        2296     2311      +15     
  Branches      645      652       +7     
==========================================
+ Hits         1072     1079       +7     
- Misses       1224     1232       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Previously the yaml editor wasn't allowing a user to add new lines. This
was because at each keystroke the yaml file got formatted automatically,
removing what formatting felt as unnecessary lines.. This meant that the
user had to use tricks like copy&pasting to get to a state the wanted to
have.

To fix that, this commits reverts back to using the resource editor
provided by the console. It has several advantages:
* The use can edit the file as they want without bugs
* There's documentation included from the CRDs when hovering properties

The main drawback is that the user needs to click on save to save their
changes to the model, then needs to click on apply to apply their
config (either creating or updating)

Other additions:
----------------

In order to make the logic of the buttons the same between the two
views, they have been extracted up a notch in the component hierarchy.

Warning modals have been added to help the user know if they are about
to lose some changes.

A reload button was added to the update broker page, so that the user
can reload the content of the existing broker.
Copy link
Collaborator

@Msarawan Msarawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All LGTM. Good work Thomas.

@Msarawan Msarawan merged commit b90f63c into artemiscloud:main Sep 10, 2024
5 checks passed
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.

The yaml editor doesn't allow a user to add new lines
2 participants