-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
CodeSnippet: missing horizontal scrollbar when type is multi and there is a long row of data #7574
Comments
This bug is described in #7551 |
@guigueb By default, the scrolling is set to wrap. You can set Since the scroll bar is not in view when the CodeSnippet is collapsed, they've added an overflow indicator to show that there is more content off the screen Let me know if this is a viable solution, or if you have any alternative solutions you would like to explore! |
Just to be clear... Given The horizontal and vertical scroll bars are there but not in view. So there is lighter-text to the right and/or left to indicate users can scroll in those directions. When I address #7579 maybe we can re-evaluated the choice of scrollbars vs lighter-text. |
About the comment "However, since the container is fully expanded (but hidden beneath the outer container), the scroll bar only shows up once the entire snippet has been expanded:" One of the use cases IBM Cognos has for CodeSnippet is to show validation error information. That said there are other options... copy/paste, find, etc. |
changing to overflow - from -x/-y - on the snippet-container caused issues with scrollbars colliding with the buttons. for now only add overflow-y and address overflow clean up and scrollbars/button collisions in carbon-design-system#7574
PR #8156 is in draft mode. |
Screen.Recording.2021-03-22.at.11.54.56.AM.mov |
* feat(codesnippet): set closed and expanded max number of rows defaulted the height to show everything (100%) added two new props maxClosedNumberOfRows and maxExpandedNumberOfRows added logic using the new props to determine when to show moreLessBtn added maxHeight style based on new props * feat(CodeSnippet): apply auto scroll to snippet-mult allow snippet-mult + snippet-container to auto scroll, both x and y remove scroll/overflow from nested snippet-expand, pre, and code conditions this will show the horizontal scroll when the snippet is closed or expanded it is a behavour change/bug fix, it will address 7574 * feat(CodeSnippet): add background to snippet buttons add background to buttons to stop scrollbars from stomping on them * feat(CodeSnippet): revert to only adding overflow-y changing to overflow - from -x/-y - on the snippet-container caused issues with scrollbars colliding with the buttons. for now only add overflow-y and address overflow clean up and scrollbars/button collisions in #7574 * feat(CodeSnippet): move overflow-y placement apply it for both closed and expanded modes * feat(CodeSnippet): changed closed to collapsed changed closed to collapsed * feat(CodeSnippet): update snapshot update snapshot * feat(CodeSnippet): rename closed to collapsed in the story rename closed to collapsed in the story Co-authored-by: Bill Guigue <Bill.Guigue@ca.ibm.com> Co-authored-by: TJ Egan <tw15egan@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
CodeSnippet: missing horizontal scrollbar when type is multi and there is a long row of data
What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
When you have a long row of data and the type='single'...
When you have a long row of data and the type='multi'...
This shows in the latest Carbon Design System using any browser.
Steps to reproduce the issue
The text was updated successfully, but these errors were encountered: