Bug 2015472 - Form and YAML view switch button should have distinguishable status
Summary: Form and YAML view switch button should have distinguishable status
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.10.0
Assignee: mmensahs
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-19 10:00 UTC by Yadan Pei
Modified: 2022-03-10 16:20 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:20:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10671 0 None open set checked data attribute 2021-12-15 17:38:18 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:20:43 UTC

Description Yadan Pei 2021-10-19 10:00:34 UTC
Description of problem:
hard to differentiate the switch status of 'Form view' and 'YAML view' button on operand creation page

Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2021-10-16-173656

How reproducible:
Always

Steps to Reproduce:
1. Check the switch status of 'Form view' and 'YAML view' on operand creation page
2.
3.

Actual results:
No matter which view is selected, the Xpath expression $x("//input[@data-test='YAML view-radio-input' and @checked]") always return true since the 'checked' property doesn't reveal the real status  
<input type="radio" data-test="Form view-radio-input" value="form">
<input type="radio" data-test="YAML view-radio-input" value="yaml" checked="">

Expected results:
`checked` property should reveal the real status,  it should only be added when the input is checked and removed when the input is unchecked

Additional info:
https://github.com/openshift/console/blob/22c6951efe7c4bca87f3f934063b9f4dcb0a4058/frontend/packages/console-shared/src/components/synced-editor/editor-toggle.tsx#L11~L33

Comment 1 mmensahs 2021-11-30 14:02:23 UTC
Based on the Patternfly documentation for radio buttons and what is shown when the radio example is inspected in DevTools, this is working as intended.

Comment 2 mmensahs 2021-11-30 14:04:25 UTC
(In reply to mmensahs from comment #1)
> Based on the Patternfly documentation for radio buttons and what is shown
> when the radio example is inspected in DevTools, this is working as intended.

https://www.patternfly.org/v4/components/radio

Comment 3 Yadan Pei 2021-12-14 01:45:57 UTC
Hi mmensahs

Can we make `checked` property reveal its real status?

Comment 5 Yadan Pei 2021-12-20 06:59:44 UTC
Now we have `data-checked-state` attribute which can be used to distinguish which radio button is checked 

<input type="radio" data-test="Form view-radio-input" data-checked-state="false" value="form" checked="">
<input type="radio" data-test="YAML view-radio-input" data-checked-state="true" value="yaml"> 



Verified on 4.10.0-0.nightly-2021-12-18-034942

Comment 10 errata-xmlrpc 2022-03-10 16:20:14 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.10.3 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-2022:0056


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