react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

Fix image svg

Open mendyEdri opened this issue 2 years ago • 7 comments

Description

Until now, all images with url used SvgImage component, because source was a url and isSvg returned true.

Changelog

Added support for Image web

Additional info

mendyEdri avatar Aug 28 '23 14:08 mendyEdri

I added some comments, but... I have to say that I don't like this solution, it'll require Uilib to maintain two image files, and I'm confident that it will be forgotten. react-native-web supports RN's Image, so we should re-check what doesn't work and close the gaps. Until now we added the .web files only when something isn't supported on the web and I think we should keep doing it instead of duplicating to code.

I don't mind. atm in production sources with type of string (either source={url} or images actual data) are rendering the SVG component which causes issues and left us with production bugs.

Also, the current mobile image implementation cannot render ImageBackground properly in web. moreover, using the mobile image, rendered styling weird, and wasn't affecting by image-ratio prop.

I suggest to assign someone from the team to address it :) thanks!

mendyEdri avatar Sep 07 '23 05:09 mendyEdri

I added some comments, but... I have to say that I don't like this solution, it'll require Uilib to maintain two image files, and I'm confident that it will be forgotten. react-native-web supports RN's Image, so we should re-check what doesn't work and close the gaps. Until now we added the .web files only when something isn't supported on the web and I think we should keep doing it instead of duplicating to code.

I don't mind. atm in production sources with type of string (either source={url} or images actual data) are rendering the SVG component which causes issues and left us with production bugs.

Also, the current mobile image implementation cannot render ImageBackground properly in web. moreover, using the mobile image, rendered styling weird, and wasn't affecting by image-ratio prop.

I suggest to assign someone from the team to address it :) thanks!

@ethanshar can you help ?

OrenZak avatar Sep 07 '23 07:09 OrenZak

Is this PR still relevant? can we close it?

ethanshar avatar Nov 09 '23 06:11 ethanshar

Is this PR still relevant? can we close it?

It is. Removing it, still breaking images in web-editor

mendyEdri avatar Nov 09 '23 06:11 mendyEdri

But we don't use this fix, it's not merged. Is there still an issue with SVG?

ethanshar avatar Nov 12 '23 05:11 ethanshar

But we don't use this fix, it's not merged.

Is there still an issue with SVG?

We do, we use this version in web-editor. And yes, there is still an issue

mendyEdri avatar Nov 12 '23 07:11 mendyEdri

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 13 '24 10:03 stale[bot]

@mendyEdri Is this PR still relevant?

ethanshar avatar Jul 16 '24 05:07 ethanshar

@mendyEdri

Is this PR still relevant?

Not anymore 💪

mendyEdri avatar Jul 16 '24 06:07 mendyEdri