Repository navigation
CONSOLE-5567: Fix PatternFly grid column math in name/value pair editor - #17399
openshift-merge-bot[bot] merged 2 commits into
Conversation
PatternFly's 12-column Grid requires GridItem spans in a row to sum to 12, otherwise the unassigned fraction renders as dead space. The name/value and ConfigMap/Secret pair rows (and their headers) only summed to 11 when editable and 10 when read-only, leaving unused space after the Key/Value fields that became more noticeable once the annotations edit modal was widened. Spans are now computed from whether the row's remove-action column is rendered, so every row and its header sum to 12 in both states.
|
@vojtechszocs: This pull request references CONSOLE-5567 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "5.1.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Pipeline controller notification This PR uses the pipeline controller for second-stage tests. Selection and triggering follow the repository configuration. Use |
|
/label px-approved |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: logonoff, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Scheduling tests matching the |
|
/hold Will do some more verifications to ensure UX consistency. |
|
/hold cancel |
|
/test e2e-gcp-console |
1 similar comment
|
/test e2e-gcp-console |
|
/verified by @vojtechszocs /retest |
|
@logonoff: This PR has been marked as verified by DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@vojtechszocs: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Follow-up to #17398
Analysis / Root cause
PatternFly's
Gridalways reserves a fixed 12-column track, soGridItemspans in a row must sum to exactly 12 or the unassigned fraction renders as dead space.From PatternFly design guidelines
The shared name/value pair editor's rows (and their headers) only summed to 11 when editable and 10 when read-only, leaving an unused strip of blank space after the Key/Value (or ConfigMap-Secret/Prefix) fields. This was subtle at narrow modal widths but became clearly visible once the Edit annotations modal was widened (#17398).
Solution description
Column spans are now derived from whether the row's remove-action column is rendered, so every row and its header sum to 12 in both the editable and read-only states.
This editor is shared well beyond the annotations modal - it also backs the container environment variable editor, the storage class parameters form, the PVC creation form and several Knative plugin forms (event source filters, pub/sub filters, the test-function request pane). In all of these, the Key/Value (or equivalent) columns now use the full available width instead of leaving an unexplained empty strip and the "Key"/"Value" (or "ConfigMap/Secret"/"Prefix") column headers now line up correctly above their respective input columns.
This is a PatternFly layout-correctness fix only - no functional or API impact.
Test cases
Summary by CodeRabbit
Summary by CodeRabbit