Bug 1936620 - OLM checkbox descriptor renders switch instead of checkbox
Summary: OLM checkbox descriptor renders switch instead of checkbox
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 4.8.0
Assignee: Jon Jackson
QA Contact: Yanping Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-08 20:15 UTC by Jon Jackson
Modified: 2021-07-27 22:52 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The DynamicForm component was overriding the default boolean field with a boolean switch. Consequence: Even when applying the checkbox descriptor, the boolean switch was rendered. Fix: Use the standard checkbox as the default boolean field, and only use the boolean switch when a boolean switch descriptor is applied. Result: Checkbox is always rendered for boolean fields unless otherwise specified by descriptor.
Clone Of:
Environment:
Last Closed: 2021-07-27 22:51:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8504 0 None open Bug 1936620: Fix create operand form default boolean field 2021-03-29 19:38:26 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:52:19 UTC

Description Jon Jackson 2021-03-08 20:15:32 UTC
Description of problem:
urn:alm:descriptor:com.tectonic.ui:checkbox does not work as expected. A boolean switch widget is rendered instead of a checkbox.

Version-Release number of selected component (if applicable):
4.6

How reproducible:
Always

Steps to Reproduce:
1. Create csv and crd from yaml files in this gist: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562
2. Visit Installed Operators > Mock Operator
3. Click "Create instance" under Mocke Resource card


Actual results:
Checkbox field on the resulting form is actually a switch

Expected results:
Checkbox field should be a standard checkbox


Additional info:

Comment 2 Yanping Zhang 2021-04-08 02:07:15 UTC
Tested on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-04-07-115443.
Steps to verify:
1. Create crd/csv from yaml files in this gist: https://gist.github.com/TheRealJon/3680c8a573bde88a974588e269230562
2. Visit Installed Operators > Mock Operator
3. Click "Create instance" under Mocke Resource card, check the "Checkbox" field, now it's a standard checkbox, not a switch boolean.
The bug is fixed.

Comment 8 errata-xmlrpc 2021-07-27 22:51:42 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.