-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
fix: Removing specific column widths, letting things flex naturally. #14637
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14637 +/- ##
==========================================
- Coverage 77.47% 77.23% -0.25%
==========================================
Files 958 958
Lines 48486 48481 -5
Branches 5679 5681 +2
==========================================
- Hits 37565 37443 -122
- Misses 10721 10838 +117
Partials 200 200
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM; I clicked around menus that were affected and did aggressive resizing, and they all now look much better 👍
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.
LGTM! (+ a few low priority nits)
@@ -158,7 +158,6 @@ const SubMenuComponent: React.FunctionComponent<SubMenuProps> = props => { | |||
const [navRightStyle, setNavRightStyle] = useState('nav-right'); | |||
const [navRightCol, setNavRightCol] = useState(8); | |||
|
|||
const { headerSize = 2 } = props; |
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.
I think that we can remove headerSize from SubMenuProps (line 153), it doesn't seem to be used anymore.
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.
We can also remove passing headerSize
to SubMenu from CssTemplatesList
and AnnotationLayersList
…pache#14637) (cherry picked from commit bf90885)
SUMMARY
The SubMenu component was recently re-jiggered to use a grid (row/col) layout, and the text/header was given a fixed width, which caused line-wrapping. This PR uses the Row component's automatic layout to avoid this.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
![image](https://user-images.githubusercontent.com/812905/118234914-dccd0200-b448-11eb-9063-e10776ceb891.png)
After:
![image](https://user-images.githubusercontent.com/812905/118234380-16e9d400-b448-11eb-8d87-f087616da34a.png)
TEST PLAN
Go to Alerts and Reports, and make sure you don't see awkward line-wrapping when the browser is narrow.
ADDITIONAL INFORMATION