-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Code] Search results are fixed to top of page #45182
Conversation
Pinging @elastic/code |
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. @daveyholler can you take a look on the design's end?
💚 Build Succeeded |
@daveyholler @WangQianliang since this is my first PR to kibana, any and all comments are greatly appreciated. |
@@ -171,12 +171,12 @@ | |||
white-space: nowrap; | |||
} | |||
|
|||
.codeSearch__suggestion-text-container { |
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'm guessing this code has been around for a while, but we should be using snake case in these instances rather than hyphens: codeSearch__suggestionTextContainer
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.
Yep, I noticed some inconsistencies with BEM classes here; I'm happy to change that. Should I leave the existing classes for now?
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.
7b4f233
6cdeb8a
to
ba5f91a
Compare
💔 Build Failed |
Please merge master |
💚 Build Succeeded |
By allowing overflow on the main content, we implicitly fix the sibling search bar in position. elastic/code#1606
This gives the parent element a width, so that our text-overflow rules apply to these elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details on the issue.
If both the icon and the text are allowed to grow/shrink as needed, flexbox will grow truncated text based on its original width, leading to subtle sub-pixel alignment issues with other rows. By fixing the icon to a specific width, we can ensure that the suggestion text does not grow too big.
We don't need to flex these elements currently as they contain either no children or inline elements only.
Without this directive on the parent, it had no width or flex growth and didn't respect the parent width. This allows it to take on the correct flexed width, and thus take on the overflow rules.
We have an overriding align-items declaration immediately after this one.
💚 Build Succeeded |
62bd14f
to
9d25daf
Compare
💚 Build Succeeded |
* Fix main search bar to top of screen By allowing overflow on the main content, we implicitly fix the sibling search bar in position. elastic/code#1606 * Allow search suggestion text to be truncated This gives the parent element a width, so that our text-overflow rules apply to these elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details on the issue. * Fix alignment issue with overflowed search suggestions If both the icon and the text are allowed to grow/shrink as needed, flexbox will grow truncated text based on its original width, leading to subtle sub-pixel alignment issues with other rows. By fixing the icon to a specific width, we can ensure that the suggestion text does not grow too big. * Remove unneeded CSS We don't need to flex these elements currently as they contain either no children or inline elements only. * style: prefer camelCase element names over hyphens * Fix search result suggestion overflow on IE Without this directive on the parent, it had no width or flex growth and didn't respect the parent width. This allows it to take on the correct flexed width, and thus take on the overflow rules. * Remove unused CSS rule We have an overriding align-items declaration immediately after this one.
* Fix main search bar to top of screen By allowing overflow on the main content, we implicitly fix the sibling search bar in position. elastic/code#1606 * Allow search suggestion text to be truncated This gives the parent element a width, so that our text-overflow rules apply to these elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details on the issue. * Fix alignment issue with overflowed search suggestions If both the icon and the text are allowed to grow/shrink as needed, flexbox will grow truncated text based on its original width, leading to subtle sub-pixel alignment issues with other rows. By fixing the icon to a specific width, we can ensure that the suggestion text does not grow too big. * Remove unneeded CSS We don't need to flex these elements currently as they contain either no children or inline elements only. * style: prefer camelCase element names over hyphens * Fix search result suggestion overflow on IE Without this directive on the parent, it had no width or flex growth and didn't respect the parent width. This allows it to take on the correct flexed width, and thus take on the overflow rules. * Remove unused CSS rule We have an overriding align-items declaration immediately after this one.
* Fix main search bar to top of screen By allowing overflow on the main content, we implicitly fix the sibling search bar in position. elastic/code#1606 * Allow search suggestion text to be truncated This gives the parent element a width, so that our text-overflow rules apply to these elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details on the issue. * Fix alignment issue with overflowed search suggestions If both the icon and the text are allowed to grow/shrink as needed, flexbox will grow truncated text based on its original width, leading to subtle sub-pixel alignment issues with other rows. By fixing the icon to a specific width, we can ensure that the suggestion text does not grow too big. * Remove unneeded CSS We don't need to flex these elements currently as they contain either no children or inline elements only. * style: prefer camelCase element names over hyphens * Fix search result suggestion overflow on IE Without this directive on the parent, it had no width or flex growth and didn't respect the parent width. This allows it to take on the correct flexed width, and thus take on the overflow rules. * Remove unused CSS rule We have an overriding align-items declaration immediately after this one.
* Fix main search bar to top of screen By allowing overflow on the main content, we implicitly fix the sibling search bar in position. elastic/code#1606 * Allow search suggestion text to be truncated This gives the parent element a width, so that our text-overflow rules apply to these elements. See https://bugzilla.mozilla.org/show_bug.cgi?id=1086218#c4 for details on the issue. * Fix alignment issue with overflowed search suggestions If both the icon and the text are allowed to grow/shrink as needed, flexbox will grow truncated text based on its original width, leading to subtle sub-pixel alignment issues with other rows. By fixing the icon to a specific width, we can ensure that the suggestion text does not grow too big. * Remove unneeded CSS We don't need to flex these elements currently as they contain either no children or inline elements only. * style: prefer camelCase element names over hyphens * Fix search result suggestion overflow on IE Without this directive on the parent, it had no width or flex growth and didn't respect the parent width. This allows it to take on the correct flexed width, and thus take on the overflow rules. * Remove unused CSS rule We have an overriding align-items declaration immediately after this one.
Summary
elastic/code#1606
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilitySince this is my first PR:
For maintainers
This was checked for breaking API changes and was labeled appropriatelyThis includes a feature addition or change that requires a release note and was labeled appropriately