Bug 1932472 - Edit Form/YAML switchers cause weird collapsing/code-folding issue
Summary: Edit Form/YAML switchers cause weird collapsing/code-folding issue
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: 4.8.0
Assignee: Andrew Ballantyne
QA Contact: Gajanan More
Srivaralakshmi Ramani
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-24 16:50 UTC by Andrew Ballantyne
Modified: 2021-09-15 17:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when selecting the *YAML* tab, the `metadata.managedFields` section did not collapse immediately. This was due to an issue with the *Form* or *YAML* switcher for pages such as *Pipeline Builder* and *Edit HorizontalPodAutoscaler* (HPA). As a result, the part of the document where you tried to type collapsed. The `metadata.managedFields` section remained as is, and the cursor was reset to the starting position to the top left of the *YAML* editor. The current release fixes this issue. Now, upon loading the *YAML*, the `metadata.managedFields` section collapses immediately.
Clone Of:
Environment:
Last Closed: 2021-07-27 22:48:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8964 0 None open Bug 1932472: Allow ManagedFileds Code Folding on Form/YAML Switcher 2021-05-18 16:59:50 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:48:34 UTC

Description Andrew Ballantyne 2021-02-24 16:50:36 UTC
Description of problem:

When editing a resource through a form/yaml switcher AND it has a managedFields property under metadata, the first characters you type into the editor cause that section of the YAML to collapse/code-fold.

How reproducible:
Always but only on an edit operation AND when managedFields exists (which I think is always?).

Steps to Reproduce:

Could only find two places this impacted, but we should look for more to verify we fix all locations.

Pipeline Builder (Pipeline Screen):
1. Create/have a Pipeline
2. Use the kebab option "Edit Pipeline"
3. Switch to the YAML view
4. Edit any section in `spec`

HPA (Topology Screen):
1. Create a Deployment resource with CPU limits (ie, via the add flow)
2. Using the Kebab on the Topology screen, select Add HPA
3. Add a CPU HPA % and save the form
4. Edit the HPA you created
5. Switch to the YAML view
6. Edit any section in `spec`

Actual results:
The section you edited collapses as soon as you type anything

Expected results:

- The managedFields field to be collapsed on load (like the YAML tab on details pages)
- There to be no auto-collapse of the section as you are typing

Additional info:

As far as I know this is only impacting DevConsole Form/Yaml switcher but as a result of changes to the YAML component to collapse managedFields on selection of the YAML tab on details pages of resources.

Comment 1 Andrew Ballantyne 2021-05-18 14:21:11 UTC
Sorry, actually a medium severity, it collapses the edited group so it impacts the user's ability to modify the YAML.

Comment 3 Debsmita Santra 2021-05-21 16:23:36 UTC
verified on 4.8.0-0.nightly-2021-05-21-101954

Comment 10 errata-xmlrpc 2021-07-27 22:48:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438


Note You need to log in before you can comment on or make changes to this bug.