-
Notifications
You must be signed in to change notification settings - Fork 158
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(logo-grid): add logoCount and logoRatio props #8905
Conversation
Deploy preview created for package Built with commit: ab68348b635fd68e2b4ffe44b8be084de8d1a496 |
Deploy preview created for package Built with commit: ab68348b635fd68e2b4ffe44b8be084de8d1a496 |
Deploy preview created for package Built with commit: ab68348b635fd68e2b4ffe44b8be084de8d1a496 |
Deploy preview created for package Built with commit: ab68348b635fd68e2b4ffe44b8be084de8d1a496 |
Deploy preview created for package Built with commit: ab68348b635fd68e2b4ffe44b8be084de8d1a496 |
Thanks for this @andy-blum! 1. Ratio in heading titleStorybook has been having some trouble with updating content with the knobs lately. The 4:3 is remaining when we change the ratio unless you open the story in its own tab, see the example of 2:1 but still says "4:3". I'd recommend removing the "4:3" for now and we could add it back when we figure out that weird storybook bug. 2. Red border around imagesIs this temporary just for testing? Our storybook demos usually show components as intended to be used, and I'd love to hide the red border so not to cause any confusion. 3. Remove
|
…for-ibm-dotcom into feat/grid-logo
@oliviaflory @andy-blum Olivia is correct in saying that the logos should take up a 2 column count, and 2up logo variation needs to be removed. Below is the proper columns-per-breakpoint configuration based on the design documentation:`
|
* @returns {Array} [widthInt, heightInt] | ||
*/ | ||
|
||
function parseAspectRatio(aspectRatioString) { |
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.
packages/utilities/src/utilities/parseAspectRatio/parseAspectRatio.js
Outdated
Show resolved
Hide resolved
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.
Looks good @andy-blum, just a few observations.
@andy-blum I think you only need to adjust the e2e tests. https://github.com/carbon-design-system/carbon-for-ibm-dotcom/runs/6631472191?check_suite_focus=true#step:8:2339 |
@andy-blum Thank you for the updates! Small thing on the storybook knobs: 1. Column count: Can we reduce to two options? 2. Column count: Can we reduce to three options? |
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.
Thanks @andy-blum !
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.
A bit of nitpicking, but I think it'll be good to update the markup of the <dds-logo-grid>
CodeSandbox examples (ES & CDN) and the "Docs" tab to include these new props (logo-count
and logo-ratio
) so that adopters are aware of their options. You might need to double-check the e2e testing to ensure that nothing is breaking.
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.
Looks good! Thanks for addressing my feedback.
@jwitkowski79 Can you take a look at this PR and give us a thumbs up before we mark this one as ready for merge?
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.
@andy-blum @proeung This looks good!
Related Ticket(s)
Closes #8848
Description
Adds
logoCount
andlogoRatio
props toDDSLogoGrid
logoCount
takes an integer to use as a number of columns for the grid. The stylesheet will constrain that value to between 2 and 4, inclusively.logoRatio
takes a string matching the format<integer><separator><integer>
and sets a custom CSS property in an inline style to use in logo-grid-item elements as an aspect ratio.Changelog
New
logoCount
andlogoRatio
props toDDSLogoGrid