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 1820307: Hide yaml editor links when window width is less than 991px #4926
Bug 1820307: Hide yaml editor links when window width is less than 991px #4926
Conversation
/assign @rhamilto |
@rohitkrai03: This pull request references Bugzilla bug 1820307, 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
In 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 kubernetes/test-infra repository. |
frontend/packages/console-shared/src/components/editor/YAMLEditorToolbar.scss
Outdated
Show resolved
Hide resolved
f9d9670
to
3a470f0
Compare
.ocs-yaml-editor-toolbar { | ||
&__links { | ||
display: flex; | ||
flex-shrink: 0; | ||
justify-content: flex-end; | ||
margin: 2px; | ||
z-index: 1; | ||
@media(max-width: 767px) { | ||
@media(max-width: $screen-sm-max) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The downside to this fix is it also hides the View shortcuts
link at viewport sizes 768 - 991, which seems like a regression in functionality. @spadgett, thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how the original yaml-editor
used to behave. I checked it on a 4.4 cluster as well. There was no other logic to toggle showSidebar
link based on the window width apart from this css - https://github.com/openshift/console/blob/master/frontend/public/components/_edit-yaml.scss#L47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, when I ported the CSS changes for the links component I added 768px
by mistake instead of 991px
which was the original value for $screen-sm-max
. So originally the toolbar was only visible above 991px screen size. That is why I reverted back to the original value in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can check the code from release-4.4
branch as well - https://github.com/openshift/console/blob/release-4.4/frontend/public/components/_edit-yaml.scss#L44
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. Thanks, @rohitkrai03.
/retest |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhamilto, rohitkrai03 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 |
/retest Please review the full test history for this PR and help us cut down flakes. |
4 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@rohitkrai03: All pull requests linked via external trackers have merged: openshift/console#4926. Bugzilla bug 1820307 has been moved to the MODIFIED state. In 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 kubernetes/test-infra repository. |
This PR -
showSidebar
beingundefined
.