-
Notifications
You must be signed in to change notification settings - Fork 582
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
chore: Clean up artwork rail and extact sub components #10802
chore: Clean up artwork rail and extact sub components #10802
Conversation
@@ -533,6 +533,7 @@ export default createFragmentContainer(Artwork, { | |||
width: { type: "Int" } | |||
) { | |||
...CreateArtworkAlertModal_artwork | |||
...ContextMenuArtwork_artwork @arguments(width: $width) |
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.
Instead of passing the data we want to pass a fragment ref to ContextMenuArtwork
.
@@ -127,29 +107,6 @@ export const ArtworkRailCard: React.FC<ArtworkRailCardProps> = ({ | |||
contextScreen, | |||
} = restProps | |||
|
|||
const containerWidth = useMemo(() => { |
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.
Not needed because we define the container width within the image component.
{enableArtworkRailRedesignImageAspectRatio ? ( | ||
<ArtworkRailCardImage artwork={artwork} /> | ||
) : ( | ||
<LegacyArtworkRailCardImage artwork={artwork} urgencyTag={urgencyTag} /> | ||
)} |
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.
Rendering the old or new image component depending on the feature flag enableArtworkRailRedesignImageAspectRatio
artwork: ArtworkRailCardImage_artwork$key | ||
} | ||
|
||
export const ArtworkRailCardImage: React.FC<ArtworkRailCardImageProps> = ({ ...restProps }) => { |
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.
This is the new image component where we can implement the new layout and aspect ratio.
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.
Fantastic 🙌🏼
...CreateArtworkAlertModal_artwork | ||
...ArtworkRailCardImage_artwork | ||
...LegacyArtworkRailCardImage_artwork | ||
...ContextMenuArtwork_artwork |
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.
praise: Awesome 💯
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 great!! I just added one comment 🌟
{enableArtworkRailRedesignImageAspectRatio ? ( | ||
<ArtworkRailCardImage artwork={artwork} /> | ||
) : ( | ||
<LegacyArtworkRailCardImage artwork={artwork} urgencyTag={urgencyTag} /> |
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.
This is emerald specific, can we remove the urgency tag since they're supposed to be removed after releasing the new auction signals?
<LegacyArtworkRailCardImage artwork={artwork} urgencyTag={urgencyTag} /> | |
<LegacyArtworkRailCardImage artwork={artwork} urgencyTag={!displayAuctionSignal ? urgencyTag : null} /> |
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.
This is great! So I can remove all the logic around urgency tags within the artwork rail completely?
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.
since we released the auction signals, yeah feel free to remove the urgency tags logic :)
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.
👍
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.
Great one
ARTWORK_RAIL_CARD_IMAGE_HEIGHT, | ||
ARTWORK_RAIL_CARD_IMAGE_WIDTH, | ||
} from "app/Components/ArtworkRail/LegacyArtworkRailCardImage" | ||
import { OpaqueImageView } from "app/Components/OpaqueImageView2" |
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.
This is probably not in the scope of this PR. Maybe in a future PR we can use Image
from palette here
f1ec362
This PR resolves ONYX-1290
Description
This PR:
ARenableArtworkRailRedesignImageAspectRatio
,LegacyArtworkRailCardImage
vsArtworkRailCardImage
).PR Checklist
To the reviewers 👀
Changelog updates
Changelog updates
Cross-platform user-facing changes
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.