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

[CodeSnippet]: several enhancements and bugs #7551

Closed
guigueb opened this issue Jan 13, 2021 · 5 comments
Closed

[CodeSnippet]: several enhancements and bugs #7551

guigueb opened this issue Jan 13, 2021 · 5 comments

Comments

@guigueb
Copy link
Contributor

guigueb commented Jan 13, 2021

IBM Cognos has ran into several issues with CodeSnippet.

I've tried to capture them all, so we can discuss what to do.
I am not guaranteeing that I got all the issues.
For reference these are also tracked in https://jsw.ibm.com/browse/MUI-1316.

This Jira is happening because of imitations/bugs in Carbon CodeSnippet.

When the contents overflow the size of a single line Carbon CodeSnippet (type="single")...

The contents will scroll horizontally and a scroll bar will show.
As this is a single line no vertical scroll is needed (newlines are removed and all the lines are concatenated into one long string).
Single is easy and works.

When the contents overflow the size of a multi line Carbon CodeSnippet (type="multi")...

The multi-line CodeSnippet is always expandable - ie: the showMoreText / showMoreText will always be present.
An enhancement #7579 to disable the use of showMoreText / showMoreText, and allow scrolling, should be logged.

If the content is less than 15 rows (the CodeSnippet grows to show up to 14 rows)...
An enhancement #7579 to set the number of rows when in closed form (the 'Show more' button is visible) should be logged.

If the contents overflows the width...

If the content is exactly 15 rows (the CodeSnippet grows to show up to 15 rows)...

If the contents overflows the width...

The 'Show more' button shows...

When in short form (the 'Show more' button is visible)...
An enhancement #7579 to set the number of rows when in closed form (the 'Show more' button is visible) should be logged.

If the contents overflows the width...

If the contents overflows the height...

  • the contents can not be scrolled vertically
  • the vertical scroll bar is not shown
  • (I kinda understand this as there is a 'Show more' button)

When in long form (the 'Show less' button is visible)...
The CodeSnippet grows to show the total number of rows available.
An enhancement #7579 to set the number of rows when in expanded form (the 'Show more' button is visible) should be logged.

If the contents overflows the width...

If the contents can be scrolled vertically

  • well no need as the CodeSnippet is huge at this point showing all the rows

If the CodeSnippet is constrained by a parents width/height and/or the Carbon CodeSnippet is styled with a height and/or width...
The CodeSnippet does not adopt to fit nicely.

  • in short form, 15 lines are still displayed overflowing the container, even if only 10 can be shown within the height (bug)
  • in long form, the contents do not scroll vertically (bug)
@guigueb guigueb changed the title feat/umbrella CodeSnippet: several enh feat/umbrella CodeSnippet: several enhancements and bugs Jan 13, 2021
@guigueb
Copy link
Contributor Author

guigueb commented Jan 14, 2021

I logged a bug to deal with the showMore button showing when there are exactly 15 rows.
#7572

@guigueb
Copy link
Contributor Author

guigueb commented Jan 15, 2021

I logged a bug to deal with the horizontal scrollbar not showing when type is multi and there is a long row of data
#7574

@guigueb
Copy link
Contributor Author

guigueb commented Jan 15, 2021

I have logged an enhancement to set the closed and expanded number of rows
#7579

@tw15egan
Copy link
Member

@guigueb I've converted this issue into an epic so that we can make sure we properly keep track of all the bugs/enhancements you've described. Let me know if I've missed any and I can add them to the epic:

@tay1orjones tay1orjones removed epic Special label used by ZenHub for epic functionality status: waiting for maintainer response 💬 labels Dec 10, 2021
@tay1orjones tay1orjones changed the title feat/umbrella CodeSnippet: several enhancements and bugs [CodeSnippet]: several enhancements and bugs Dec 10, 2021
@sstrubberg
Copy link
Member

Closing this issue as it looks like most of it has been handled and the remaining piece is being tracked in #7574

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants