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(universal-banner): Image resizing and design updates #8947

Merged

Conversation

andy-blum
Copy link
Contributor

Related Ticket(s)

Closes #8811

Description

This PR updates the universal banner component's styles to adhere to the functional specs and updates the component's rendered shadow dom to make the entire banenr a link at smaller screen sizes

Changelog

Changed

  • refactored styles in accordance with functional specs
  • fixed an issue in which images would distort on resize
  • render entire banner as a link at sm and md breakpoints

@andy-blum andy-blum requested review from proeung and RichKummer June 3, 2022 16:22
@andy-blum andy-blum requested a review from a team as a code owner June 3, 2022 16:22
@andy-blum andy-blum requested a review from annawen1 June 3, 2022 16:22
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 3, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 3, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 3, 2022

@proeung proeung added package: web components Work necessary for the IBM.com Library web components package Needs design approval PRs on feature requests and new components have to get design approval before merge. 👀 eyes needed labels Jun 3, 2022
@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 3, 2022

@ibmdotcom-bot
Copy link
Contributor

ibmdotcom-bot commented Jun 3, 2022

Copy link

@RichKummer RichKummer 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 You fixed a lot of the issues for Universal banner, yay! I am seeing a few things that stick out

  1. Looks like there's an extra bit of space between the left side of the window and the start of the image. Image should be flush with the left edge when the image appears until the screen is beyond @max. The image frame should align with the grid, but can't tell with the extra spacing.

Screen Shot 2022-06-03 at 1 27 44 PM

  1. In Focus state, the Focus border looks fine at the bottom of the banner, but looks cut off on the top, left, and right. Same with Active state.

Screen Shot 2022-06-03 at 1 32 12 PM

  1. On @md and @sm, the icon should be 18px from the top of the banner. Currently, it looks like it's set to 16px.

Screen Shot 2022-06-03 at 1 37 00 PM

  1. On @md, the heading and body text area look like they are smaller than the specs.

Specs
Screen Shot 2022-06-03 at 1 42 40 PM

Build
Screen Shot 2022-06-03 at 1 45 31 PM

  1. For @sm, the heading and body text area should end 16px from the icon.

Specs
Screen Shot 2022-06-03 at 1 47 35 PM

Build
Screen Shot 2022-06-03 at 1 48 58 PM

  1. The @max button alignment looks fixed. For @xlg, looks like it should be updated to match the specs - the button's right edge should be just at the left edge of the last column

Specs
Screen Shot 2022-06-03 at 1 53 25 PM

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! I like the usage of @carbon/layout to get the matching breakpoint so that you can alter the shadow root based on the treatment of the CTA link. However, I have some comments/concerns about the display of the CTA icon for when the Content Author decides to use the CTA type outside of local.

@andy-blum
Copy link
Contributor Author

@proeung the latest changes should address your feedback, and will now dynamically set the icon used by the header. [type="external"] ctas will also get target="_blank" applied

@RichKummer
Copy link

Took a look through and looks good on the design side - seeing that the e2e test for WC seems to be failing

Copy link

@RichKummer RichKummer left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for sticking this one out @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.

LGTM!

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

proeung commented Jun 13, 2022

Looks like we can add "Ready to merge" label to this PR since it received two approval (from Rich and myself), but before we do that @kennylam or @annawen1 can you give a review so that we have code approval from the DPO dev side?

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.

Thanks @andy-blum!

@proeung proeung added the Ready to merge Label for the pull requests that are ready to merge label Jun 13, 2022
@kodiakhq kodiakhq bot merged commit 3c29a0f into carbon-design-system:main Jun 13, 2022
@andy-blum andy-blum deleted the feat/universal-banner-design branch July 19, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

[Universal banner] Image resizing and design updates
7 participants