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

fix(hero): backgroundImage should cover whole elements area on mobile [ES-387] #3089

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

FRSgit
Copy link
Contributor

@FRSgit FRSgit commented Mar 27, 2024

Related issue

https://alokai.atlassian.net/browse/ES-387

Scope of work

current hero implementation is wrong for mobile devices - background image should try to cover whole element, but without changing it's aspect ratio

add description for best image sizes for hero background

Screenshots of visual changes

Hero on mobile before:
image

after:
image

Description:
image

Checklist

  • Self code-reviewed
  • Changes documented
  • Semantic HTML
  • SSR-friendly
  • Caching friendly
  • a11y for WCAG 2.0 AA
  • examples created
  • blocks created
  • cypress tests created

add description for best image sizes for hero background
@FRSgit FRSgit added the bug Something isn't working label Mar 27, 2024
@FRSgit FRSgit self-assigned this Mar 27, 2024
Copy link

changeset-bot bot commented Mar 27, 2024

⚠️ No Changeset found

Latest commit: 4b1d0e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rohrig
Copy link

rohrig commented Mar 28, 2024

suggested improvement:

The Hero component simplifies the process of creating stunning hero sections for your website. With Hero, you have the flexibility to seamlessly integrate a main image and customize your content to suit your needs. Additionally, Hero offers optimized background images tailored for both mobile and desktop devices. To ensure an optimal blend of performance and visual appeal, we recommend adhering to the following image guidelines:

Desktop Background Images:
Minimum width: 3840px
Aspect ratio: 4:1.5
Example size: 3840px x 1440px

Mobile Background Images:
Minimum width: 768px
Aspect ratio: 3:4
Example size: 768px x 1024px

@FRSgit FRSgit merged commit 42157bd into v2 Mar 28, 2024
40 checks passed
@FRSgit FRSgit deleted the v2-patch/hero-backgroundImage-does-not-scale-correctly branch March 28, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants