Bug 1952545 - Selection issue when inserting YAML snippets
Summary: Selection issue when inserting YAML snippets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.8.0
Assignee: Christoph Jerolimov
QA Contact: Mohammed Saud
Srivaralakshmi Ramani
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-22 14:18 UTC by Christoph Jerolimov
Modified: 2021-09-15 17:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when users inserted a formatted *YAML* snippet in the *YAML* editor, the new selection did not match the new content in the snippet. The indentation was removed, and some random letters were seen in the selection. The current release fixes this issue. Now, the cursor remains in the position where it started and adds the missing indentation for the cursor end position. After inserting the *YAML* snippet, the new selection matches the new content. (link:https://bugzilla.redhat.com/show_bug.cgi?id=1952545[*BZ#1952545*])
Clone Of:
Environment:
Last Closed: 2021-07-27 23:02:56 UTC
Target Upstream Version:
Embargoed:
srr: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8741 0 None open Bug 1952545: Fix new selection after inserting a YAML snippet 2021-04-22 14:19:56 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:03:12 UTC

Description Christoph Jerolimov 2021-04-22 14:18:23 UTC
Clone of https://issues.redhat.com/browse/ODC-5777

Description of problem:
When the user inserts a YAML snippet the new snippet is tried to be selected but the selection doesn't match the new snippet.

Prerequisites (if any, like setup, operators/versions):
No additional prerequisites required

Steps to Reproduce
1. Open search
2. Search for resource Console, apiVersion operator.openshift.io/v1, select it
3. Select resource "cluster" and open the YAML tab (direct link: https://cluster/k8s/cluster/operator.openshift.io~v1~Console/cluster/yaml)
4. Open the sidebar and switch to the "Snippets" tab
5. Insert the available snippets at different intention levels

Actual results:
1. Selection after inserting the YAML snippet doesn't match the new content.
2. Multiple insertions change the YAML snippet and break the input.

Expected results:
1. Selection after inserting the YAML snippet should match the new content.
2. Multiple insertions should not change the YAML.

Reproducibility (Always/Intermittent/Only Once):
Always

Build Details:
OpenShift Console 4.7 or console master (tested with commit 2426fa124e8a7d59e80846c84ab69a6d6e2a0e9b)

Additional info:
None

Comment 2 Mohammed Saud 2021-04-30 12:25:52 UTC
Verified on:
Build: 4.8.0-0.nightly-2021-04-29-222100
Browser: Firefox 88

Comment 3 Srivaralakshmi Ramani 2021-06-03 14:12:51 UTC
Updated the Doc text field.

Comment 5 Srivaralakshmi Ramani 2021-06-09 12:18:55 UTC
Thanks Christoph for the LGTM.

Comment 8 errata-xmlrpc 2021-07-27 23:02:56 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.