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

chore: cleanup images, officially retire OpaqueImageView #11264

Merged
merged 30 commits into from
Dec 11, 2024

Conversation

brainbicycle
Copy link
Contributor

@brainbicycle brainbicycle commented Dec 9, 2024

This PR resolves PHIRE-1401

Description

Now that we have been using palette image under the hood for some time it should be safe to update all our components to use palette-image directly and get rid of the old OpaqueImageView code.

Component Checked?
ArticleCard Yes
ArtistShow
ArtistAutosuggestRow Yes
ArtworkListImage Yes
SavedItemRow
ShowItemRow
SaleArtworkTileRailCard
ToastComponent
ArtistSeriesHeader Yes
ArtistSeriesListItem Yes
ImageZoomView Yes
DeepZoomTile Yes
TabFairItemRow
CollectionHeader
FairArticles
FairEditorial Yes
FeatureFeaturedLink
FeatureHeader
PartnerListItem Yes
ArtistCard Yes
ItemArtwork
ItemShow
Lot
MyCollectionImageView Yes
ArtistItem
MedianAuctionPriceListItem
SaleArtworkListItem
SaleHeader Yes
SaleListItem
SearchResultImage Yes
TrendingArtistCard Yes
ShowContextCard Yes
ShowInstallShots
ViewingRoomArtworks Yes

To do

  • Remove the palette image flag and default to using
  • Remove OpaqueImageView2 that is just a wrapper component, use single OpaqueImageView everywhere
  • Replace simple usages of OpaqueImageView with direct use of Image
  • Replace more complex usages of OpaqueImageView
  • Remove OpaqueImageView component completely + associated code
  • Test, Test, Test

Follow-ups

  • Retire the flag in echo

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

iOS user-facing changes

Android user-facing changes

Dev changes

  • remove OpaqueImageView and use palette image everywhere - brian

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

@brainbicycle brainbicycle self-assigned this Dec 9, 2024
@brainbicycle brainbicycle marked this pull request as draft December 9, 2024 19:47
@brainbicycle brainbicycle marked this pull request as ready for review December 10, 2024 20:12
@brainbicycle
Copy link
Contributor Author

ready for review but please don't merge until I do more testing!

@brainbicycle brainbicycle requested review from MounirDhahri, gkartalis and damassi and removed request for MounirDhahri December 10, 2024 20:12
@@ -44,13 +43,12 @@ export const MyCollectionImageView: React.FC<MyCollectionImageViewProps> = ({
const targetURL = imageURL.replace(":version", "large")
return (
<Flex testID="Image-Remote">
<OpaqueImageView
imageURL={targetURL}
retryFailedURLs
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this has not done anything since we retired the native image view but maybe we want to bring some functionality like this back? https://github.com/artsy/eigen/pull/10201/files#diff-fcc7543a59c408cd4d4824eaea1df3a25d70e6c7dbdbbee85d3ef130f446083f

@ArtsyOpenSource
Copy link
Contributor

This PR contains the following changes:

  • Dev changes (remove OpaqueImageView and use palette image everywhere - brian - brainbicycle)

Generated by 🚫 dangerJS against 1f04457

@@ -365,10 +365,10 @@ export const ImageZoomView =
transform,
}}
>
<OpaqueImageView
noAnimation
Copy link
Contributor Author

Choose a reason for hiding this comment

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

likewise believe since we are passing an imageURL this was having no effect since soft retiring OpaqueImageView but I will take a look and make sure

width={60}
height={40}
imageURL={iconUrl}
placeholderBackgroundColor="white"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

likewise only worked with native image view but I think background colors should be standard across app anyway

Copy link
Member

@damassi damassi left a comment

Choose a reason for hiding this comment

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

Nice 👍

Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

Impressive effort!

@brainbicycle
Copy link
Contributor Author

i spot checked a bunch of places but not all but didn't see anything at all broken, but please let me know if anything looks amiss 🙏

@brainbicycle brainbicycle merged commit 4b6a47d into main Dec 11, 2024
8 checks passed
@brainbicycle brainbicycle deleted the brian/cleanup-images branch December 11, 2024 20:00
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.

6 participants