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

feat(CodeSnippet): set min number of rows #8181

Conversation

guigueb
Copy link
Contributor

@guigueb guigueb commented Mar 24, 2021

feat(CodeSnippet): set min number of rows

Closes #

#8056

set default min to 100%
apply the appropriate minHeight collapsed or expanded as needed
add props to component and story... minCollapsedNumberOfRows and minExpandedNumberOfRows
use minExpanded when clearing expandedCode... minExpandedNumberOfRows could be < maxCollapsedNumberOfRows

Testing / Reviewing

Testing via Storybook pages may be troublesome as you can't manipulate the contents of the CodeSnippet
to see the reactions when there are fewer rows of data than the min settings.

Also note: the code does not have any 'adjusting' checks if the client passes odd settings.
ie: it makes no since to set minExpandedNumberOfRows > maxExpandedNumberOfRows so there is no 'adjusting' code.
As these are client set - not settable/changeable by the user - I don't think 'adjusting' checks are needed.

set default min to 100%
apply the approprate minHeight collapsed or expanded as needed
add props to component and story...
 - minCollapsedNumberOfRows and minExpandedNumberOfRows
@guigueb guigueb requested review from a team as code owners March 24, 2021 22:14
@netlify
Copy link

netlify bot commented Mar 24, 2021

Deploy preview for carbon-elements ready!

Built with commit 4d4f45d

https://deploy-preview-8181--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Mar 24, 2021

Deploy preview for carbon-components-react ready!

Built without sensitive environment variables with commit 4d4f45d

https://deploy-preview-8181--carbon-components-react.netlify.app

use minExpanded when clearing expandedCode
minExpanded could be < maxCollapsed
Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2021

DCO Assistant Lite bot: Thanks for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


Bill Guigue seems not to be a GitHub user. You need a GitHub account to be able to sign the DCO. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request

@kodiakhq kodiakhq bot merged commit 56a7709 into carbon-design-system:main Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants