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(logo-grid): add logoCount and logoRatio props #8905

Merged
merged 21 commits into from
Jun 6, 2022

Conversation

andy-blum
Copy link
Contributor

Related Ticket(s)

Closes #8848

Description

Adds logoCount and logoRatio props to DDSLogoGrid

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

  • Added logoCount and logoRatio props to DDSLogoGrid

@andy-blum andy-blum requested a review from a team as a code owner May 24, 2022 00:51
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 24, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 24, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 24, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 24, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented May 24, 2022

@oliviaflory oliviaflory requested a review from jwitkowski79 May 24, 2022 15:27
@oliviaflory oliviaflory added the Needs design approval PRs on feature requests and new components have to get design approval before merge. label May 24, 2022
@proeung proeung added package: web components Work necessary for the IBM.com Library web components package adopter: AEM used when component or pattern will be used by this adopter 👀 eyes needed labels May 24, 2022
@oliviaflory
Copy link
Contributor

Thanks for this @andy-blum!

1. Ratio in heading title

Storybook 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.
Screen Shot 2022-05-24 at 3 57 02 PM

2. Red border around images

Is 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 2 option within Column count

I don't believe @jwitkowski79 and I discussed a 2 up logo, so we'd like to remove that option and keep it at the 3 and 4 options.
In the specs Jen provided I do see a 2 column minimum outlined, but I believe that means a 2 column minimum width for the logos. Could you confirm @jwitkowski79 ?

4. Medium breakpoint should have 4 logos across a row, not 3

The specs for the 4 column count option shows the logos spanning 4 across medium breakpoint.
Screen Shot 2022-05-24 at 4 08 53 PM

5. Small breakpoint should have 2 logos across a row, not 1

The specs for the 4 column count option shows the logos spanning 2 across medium breakpoint.
Screen Shot 2022-05-24 at 4 12 09 PM

6. Space between CTA and logos

Looks like somewhere we lost the 48px between the logo and CTA. We don't have to fix here, but I think that's what Jen is expecting eventually!

@andy-blum
Copy link
Contributor Author

@oliviaflory @jwitkowski79

Can you confirm this is the proper columns-per-breakpoint configuration?

logoCount: 3 logoCount: 4
@sm 1 column 2 columns.
@md 2 columns 4 columns
@lg 3 columns 4 columns

@jwitkowski79
Copy link

@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:`

logoCount: 3 logoCount: 4
@sm 2 columns 2 columns
@md 2 columns 4 columns
@lg 3 columns 4 columns
` Also, not sure if this is in another upcoming ticket but we'd love to have the content block (not just the title) display above the the logo grid as seen in the design specs

* @returns {Array} [widthInt, heightInt]
*/

function parseAspectRatio(aspectRatioString) {
Copy link
Contributor Author

@andy-blum andy-blum May 25, 2022

Choose a reason for hiding this comment

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

@proeung @kennylam adding this utility as we'll utilize it in #8849

Copy link
Member

@kennylam kennylam left a 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.

@kennylam
Copy link
Member

@oliviaflory
Copy link
Contributor

@andy-blum Thank you for the updates!

Small thing on the storybook knobs:

1. Column count: Can we reduce to two options?
Because there isn't a difference between Default and Three, I'd love to go with Three (as the default) and Four
But if that would break anything in terms of renaming we can go with Default and Four
Screen Shot 2022-06-01 at 3 25 35 PM

2. Column count: Can we reduce to three options?
Because there isn't a difference between Default and 4:3 I'd love to go with 4:3, 16:9 and 2:1
But if that would break anything in terms of renaming we can go with Default, 16:9 and 2:1
Screen Shot 2022-06-01 at 3 25 54 PM

Copy link
Contributor

@oliviaflory oliviaflory left a comment

Choose a reason for hiding this comment

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

Thanks @andy-blum !

Copy link
Contributor

@proeung proeung left a 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.

@oliviaflory oliviaflory removed the Needs design approval PRs on feature requests and new components have to get design approval before merge. label Jun 2, 2022
Copy link
Contributor

@proeung proeung left a 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?

@proeung proeung added Needs design approval PRs on feature requests and new components have to get design approval before merge. and removed 👀 eyes needed 🛠️ fix needed labels Jun 6, 2022
Copy link

@jwitkowski79 jwitkowski79 left a 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!

@proeung proeung added Ready to merge Label for the pull requests that are ready to merge and removed Needs design approval PRs on feature requests and new components have to get design approval before merge. labels Jun 6, 2022
@kodiakhq kodiakhq bot merged commit c519b06 into carbon-design-system:main Jun 6, 2022
@andy-blum andy-blum deleted the feat/grid-logo branch June 7, 2022 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adopter: AEM used when component or pattern will be used by this adopter package: web components Work necessary for the IBM.com Library web components package Ready to merge Label for the pull requests that are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Logo Grid]: Add design modifications to the "Grid logo" component
6 participants