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(ONYX-1442): adjust HomeViewSectionCard component for bigger screens #11321

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dariakoko
Copy link
Contributor

@dariakoko dariakoko commented Dec 20, 2024

This PR resolves ONYX-1442

Description

Adjust the image on the HomeViewSectionCards component on iPad

Before
image

After

Screen.Recording.2024-12-20.at.13.39.44.mov

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • adjust HomeViewSectionCard component for bigger screens

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

@artsy-peril
Copy link
Contributor

artsy-peril bot commented Dec 20, 2024

Warnings
⚠️ Please assign someone to merge this PR, and optionally include people who should review.

Generated by 🚫 dangerJS against f03bc3c

@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Dec 20, 2024

This PR contains the following changes:

  • Cross-platform user-facing changes (adjust HomeViewSectionCard component for bigger screens - dariakoko)

Generated by 🚫 dangerJS against f03bc3c

Comment on lines -31 to -34
export type HeroUnitItem = ExtractNodeType<
HomeViewSectionHeroUnits_section$data["heroUnitsConnection"]
>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removing this type definition in favor of interface HeroUnitItemProps because the old type definition does not allow to reuse the component due to different shape of types

For example this does not work:

type HeroUnitItem =
  | NonNullable<HomeViewSectionCard_section$data["card"]>
  | ExtractNodeType<HomeViewSectionHeroUnits_section$data["heroUnitsConnection"]>

Am I right for doing so of there is a better way?

Copy link
Member

Choose a reason for hiding this comment

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

What reuse are you referring to? These components should be fairly specific to the homeView schema and screen so I'm surprising we can't keep this typing as is and address any errors in item access elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am reusing HeroUnit component

@dariakoko dariakoko self-assigned this Dec 20, 2024
@dariakoko dariakoko removed the request for review from olerichter00 December 20, 2024 12:56
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