Skip to content

Reduce warnings#1034

Merged
YoussefHenna merged 1 commit into
masterfrom
youssef/deprecations-and-warnings
May 27, 2026
Merged

Reduce warnings#1034
YoussefHenna merged 1 commit into
masterfrom
youssef/deprecations-and-warnings

Conversation

@YoussefHenna
Copy link
Copy Markdown
Collaborator

No description provided.

@YoussefHenna YoussefHenna merged commit f166a72 into master May 27, 2026
2 of 3 checks passed
@YoussefHenna YoussefHenna deleted the youssef/deprecations-and-warnings branch May 27, 2026 10:32
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request attempts to refactor how several React Native properties are applied, but introduces critical bugs. Specifically, it moves the pointerEvents prop into style objects across multiple components (such as App, DatePicker, VideoPlayer, PortalHost, PortalManager, and TextField), which is invalid in React Native and will cause runtime errors on native platforms. Additionally, changing pointerEvents from "box-none" to "none" in the Portal components will break interactivity for all portal children. Finally, replacing standard cross-platform shadow properties with boxShadow in Surface.tsx will break shadow rendering on native platforms. All of these changes should be reverted to maintain correct React Native behavior and cross-platform compatibility.

collapsable={false}
pointerEvents="box-none"
>
<View style={styles.container} collapsable={false}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object or a StyleSheet will cause a runtime warning/error on native platforms (iOS/Android). Furthermore, changing the value from "box-none" to "none" is a critical bug: "box-none" allows children (such as portals, dialogs, dropdowns) to receive touch events while the container itself does not block them. Changing it to "none" will completely disable touch events for all portal children, making them non-interactive. Please revert this to use pointerEvents="box-none" as a prop.

        <View
          style={styles.container}
          collapsable={false}
          pointerEvents="box-none"
        >

}
pointerEvents="box-none"
style={StyleSheet.absoluteFill}
style={[StyleSheet.absoluteFill, { pointerEvents: "none" }]}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android). Furthermore, changing the value from "box-none" to "none" is a critical bug: "box-none" allows children (such as portals, dialogs, dropdowns) to receive touch events while the container itself does not block them. Changing it to "none" will completely disable touch events for all portal children, making them non-interactive. Please revert this to use pointerEvents="box-none" as a prop.

        pointerEvents="box-none"
        style={StyleSheet.absoluteFill}

Comment thread example/src/App.tsx
Comment on lines 317 to +320
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android) stating that pointerEvents is not a valid style property. It should be passed as a direct prop to the component instead.

Suggested change
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
pointerEvents="none"
style={[
StyleSheet.absoluteFill,
{

<>
<Touchable disabled={disabled} onPress={toggleVisibility}>
<View pointerEvents="none">
<View style={{ pointerEvents: "none" }}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android). It should be passed as a direct prop to the component instead.

Suggested change
<View style={{ pointerEvents: "none" }}>
<View pointerEvents="none">

Comment on lines 494 to +497
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android). It should be passed as a direct prop to the component instead.

Suggested change
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
pointerEvents="none"
style={[
StyleSheet.absoluteFill,
{

/>
{showPoster && posterSource && (
<View style={StyleSheet.absoluteFill} pointerEvents="none">
<View style={[StyleSheet.absoluteFill, { pointerEvents: "none" }]}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android). It should be passed as a direct prop to the component instead.

Suggested change
<View style={[StyleSheet.absoluteFill, { pointerEvents: "none" }]}>
<View style={StyleSheet.absoluteFill} pointerEvents="none">

Comment on lines 138 to +139
flex: 1,
pointerEvents: "none",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Remove pointerEvents from the style object as it is not a valid style property in React Native and should be passed as a component prop instead.

Suggested change
flex: 1,
pointerEvents: "none",
flex: 1,

Comment on lines +61 to +63
function shadow(
elevation: number
): { boxShadow: string } | Record<string, never> {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Revert the function signature of shadow to return the standard React Native shadow properties instead of boxShadow to maintain cross-platform compatibility.

function shadow(elevation: number) {

Comment on lines 83 to 85
return {
shadowColor: SHADOW_COLOR,
shadowOffset: {
width: 0,
height,
},
shadowOpacity: SHADOW_OPACITY,
shadowRadius: radius,
elevation,
boxShadow: `0px ${height}px ${radius}px rgba(0, 0, 0, ${SHADOW_OPACITY})`,
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

Replacing the standard React Native shadow properties (shadowColor, shadowOffset, shadowOpacity, shadowRadius, and elevation) with boxShadow will completely break shadows on native platforms (iOS and Android) for React Native versions below 0.75. Even on 0.75+, boxShadow is a relatively new feature and may not render correctly across all devices without elevation on Android. To maintain cross-platform compatibility, please revert to using the standard shadow properties.

  return {
    shadowColor: "#000",
    shadowOffset: {
      width: 0,
      height,
    },
    shadowOpacity: SHADOW_OPACITY,
    shadowRadius: radius,
    elevation,
  };

Comment on lines 475 to +478
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In React Native, pointerEvents is a component prop of View, not a style property. Placing it inside the style object will cause a runtime warning/error on native platforms (iOS/Android). It should be passed as a direct prop to the component instead.

Suggested change
style={[
StyleSheet.absoluteFill,
{
pointerEvents: "none",
pointerEvents="none"
style={[
StyleSheet.absoluteFill,
{

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant