Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1839073: Calculate max width for VM wizard general form #5578

Merged

Conversation

pcbailey
Copy link
Contributor

Currently, the width of the general tab form in the VM wizard is narrower than other forms at larger viewport sizes. This is due to additional padding added by the pf-c-wizard--main class and the added width of the wizard side navigation. This PR calculates the max-width of the form, compensating for these additional values.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label May 26, 2020
@openshift-ci-robot
Copy link
Contributor

@pcbailey: This pull request references Bugzilla bug 1839073, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1839073: Calculate max width for VM wizard general form

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 kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label May 26, 2020
@openshift-ci-robot openshift-ci-robot added the component/kubevirt Related to kubevirt-plugin label May 26, 2020
@yaacov
Copy link
Member

yaacov commented May 27, 2020

I think we may need it in providers and init forms too:
https://github.com/openshift/console/pull/5475/files

@@ -6,3 +6,9 @@
.kubevirt-create-vm-modal__memory-row {
margin-right: 0.5em;
}

.kubevirt-create-vm-modal__form {
@media (min-width: 1200px) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you look what removing padding and margin do, I think it looks nicer WDYT ?

margin: 0;
padding: 0;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be misunderstanding you or missing something, but let me explain my logic and then you can tell me where I'm wrong.

If we're trying to match the size of the OCP forms, I don't think removing the padding and margin is enough. That element only has a total of 60px of padding and no margin. So, the max width we can gain from removing them is 60px.

In OCP forms and the wizard general tab form, the forms will take up 50% of the available space in viewports greater than 1200px. The problem is the size of the available space:

OCP available space = browser width - side nav

Wizard available space = browser width - side nav - wizard nav (300px) - pf-c-wizard--main padding (64px) - OCP padding (60px)

The cleanest way I could think of to match the OCP forms at any given width of a large viewport is to simply calculate it. Thoughts?

@yaacov
Copy link
Member

yaacov commented May 27, 2020

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pcbailey, yaacov

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 27, 2020
@openshift-merge-robot openshift-merge-robot merged commit 4edf7cb into openshift:master May 27, 2020
@openshift-ci-robot
Copy link
Contributor

@pcbailey: All pull requests linked via external trackers have merged: openshift/console#5578. Bugzilla bug 1839073 has been moved to the MODIFIED state.

In response to this:

Bug 1839073: Calculate max width for VM wizard general form

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 kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.5 milestone May 28, 2020
@pcbailey pcbailey deleted the fix-wizard-form-width branch October 26, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/kubevirt Related to kubevirt-plugin lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants