Skip to content

fix: [web] svg class selector #2720

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

Closed
wants to merge 1 commit into from
Closed

Conversation

OrenZak
Copy link
Contributor

@OrenZak OrenZak commented Aug 22, 2023

Description

Changelog

Additional info

@OrenZak OrenZak requested a review from ethanshar August 22, 2023 13:33
@@ -19,6 +19,7 @@
"@react-native-community/netinfo": "^9.3.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-native": "npm:react-native-web@0.19.4",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's that?
Why do we need this?

@@ -301,7 +301,13 @@ class Button extends PureComponent<Props, ButtonState> {
} else {
if (Constants.isWeb) {
return (
<Icon style={iconStyle} tintColor={Colors.$iconDefault} source={iconSource} testID={`${testID}.icon`}/>
<Icon
id={`button_icon_${this.props.id}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where the id prop is coming from?
have you declared in Button props? or in Icon component's props?

});
};

const className = `${props?.id ?? 'svg-icon'} `;
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe generate an uniq random id so each classname will have a different scope

@mendyEdri
Copy link
Contributor

Let's prioritize a complete fix for this issue, with this PR this is the result:

image

@ethanshar
Copy link
Collaborator

@mendyEdri @OrenZak
Can we close this one, I think it's not relevant anymore

@mendyEdri
Copy link
Contributor

@mendyEdri @OrenZak Can we close this one, I think it's not relevant anymore

from my side yes, we will switch to prod

@OrenZak
Copy link
Contributor Author

OrenZak commented Aug 30, 2023

@mendyEdri @OrenZak Can we close this one, I think it's not relevant anymore

why its not relevant ?
we need to have a unique id for a iconButton of web, and apply the styling via css selector.
is it already on master ?

@AmitShwarts , have you done something related to that ?
we should solve the case where we have multi icon buttons.

@mendyEdri
Copy link
Contributor

@mendyEdri @OrenZak Can we close this one, I think it's not relevant anymore

why its not relevant ? we need to have a unique id for a iconButton of web, and apply the styling via css selector. is it already on master ?

@AmitShwarts , have you done something related to that ? we should solve the case where we have multi icon buttons.

We thought this PR supposed to replace yours

@AmitShwarts
Copy link
Contributor

Hey guys, I didn't know about this PR and we merged yesterday a different PR that solves this and some more bugs in web svg image.

@OrenZak OrenZak closed this Sep 1, 2023
@OrenZak OrenZak deleted the fix/svg_classSelector branch September 1, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants