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

Web-Specific Fixes for onValueChange and Deprecated React Methods #563

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

landabaso
Copy link
Contributor

@landabaso landabaso commented Dec 17, 2023

Web-Specific Fixes for onValueChange and Deprecated React Methods

Changes:

  1. Web-Specific onValueChange: Adjusted onValueChange in RNCSliderNativeComponent.web.tsx to trigger only during user interactions, addressing platform-specific inconsistencies (issue Clarification on onValueChange Behavior Across Platforms #562).
  2. Deprecated React Methods: Updated Slider.tsx and RNCSliderNativeComponent.web.tsx, replacing deprecated StyleSheet.compose with array syntax.

These updates fixes an inconsistency in the web platform and improves compatibility with newer React versions.

Related Issue: #562

- Modify onValueChange in RNCSliderNativeComponent.web.tsx for web platform to ensure it's called only during user interaction.
- Replace deprecated StyleSheet.compose with array syntax in Slider.tsx and RNCSliderNativeComponent.web.tsx.
- Adjust onResponderMove and closing tag syntax for better readability and consistency
- Ensure adherence to project's linting rules for cleaner code structure
- Adjust the style array in Slider.tsx to conditionally include props.style
- Resolve snapshot test failures by preventing inclusion of undefined in style array
- Eliminate the need for updating snapshots as component rendering remains consistent
@landabaso
Copy link
Contributor Author

Sorry for the recent series of updates. Initially, I patched this package for personal use and subsequently decided to submit a PR. While the original sources were Ok, there were some minor issues with linting and test snapshots. I have now addressed these issues.

@BartoszKlonowski
Copy link
Member

@landabaso No need to apologize :) These are just two commits, especially both with awesome commit messages and good input 👍
I will take a look at this PR sometime this week, is that OK with you?

@landabaso
Copy link
Contributor Author

Thanks. No problem on the timing. I'm currently using a patched version and testing it across iOS, Android, and Web. I'll keep you updated if anything comes up, but it seems solid right now.

Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

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

This totally looks good to me.
Thank you, @landabaso!

@BartoszKlonowski BartoszKlonowski linked an issue Dec 21, 2023 that may be closed by this pull request
@BartoszKlonowski BartoszKlonowski merged commit 41e8d70 into callstack:main Dec 22, 2023
8 checks passed
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.

Clarification on onValueChange Behavior Across Platforms
2 participants