Skip to content

Toggle the new Android prop diffing mechanism for components (0.78.0) #69

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

Open
wants to merge 6 commits into
base: 0.78.0-discord
Choose a base branch
from

Conversation

fabOnReact
Copy link

@fabOnReact fabOnReact commented May 27, 2025

Summary:

The PR for branch 0.78.2 is #68.

The feature flag is supported in react-native 0.79 and requires cherrypicking the following commits from David Vacca:

  • Implement prop diffing for accessibility props in View #48833
  • Implement prop diffing for transform props in View #48832
  • Implement prop diffing for border props in View #48831
  • Implement prop diffing for event props in View #48830
  • Implement prop diffing for basic props in View #48829

Enables feature flag enablePropsUpdateReconciliationAndroid to fix https://app.asana.com/1/236888843494340/project/1199705967702853/task/1209601835367711?focus=true

More info at facebook#45551 and https://github.com/discord/react-native/blob/e0702345591cb461e196aabd8be0bf51839a2df3/packages/react-native/scripts/featureflags/README.md

Changelog:

This diffs toggles the new Android prop diffing mechanism for components

Test Plan:

Regressions from previous PR #61 are fixed by cherry picking the above commits.

Branch 0.78:

Before enabling the feature flag After enabling the feature flag

After cherry-picking commits:

Discord:

Before cherry-pick After cherry-pick
20250527_202152.mp4
20250527_202926.mp4

@fabOnReact fabOnReact changed the title Toggle the new Android prop diffing mechanism for components Toggle the new Android prop diffing mechanism for components (0.78.0) May 27, 2025
@fabOnReact
Copy link
Author

fabOnReact commented May 27, 2025

@hannomargelo

There are some changes that are part of https://github.com/discord/react-native/pull/65/files, which trigger some changes in the feature flags after running yarn featureflags --update. Should I look into that tomorrow? Or I start working on the next task? Thanks.

@hannomargelo
Copy link

Hm, actually i don't think we use yarn featureflags --update in this fork, but manually pick over the changes we need (ie cherry pick the commit where they added the feature flag)

Would that work for you as well, or did you want to introduce a new feature flag?

I am not sure what all of those changes are, maybe its okay to add them

@hannomargelo
Copy link

hannomargelo commented May 27, 2025

For this bug here:

20250527_202152.mp4

How did you get into that state?

@fabOnReact
Copy link
Author

fabOnReact commented May 27, 2025

@hannomargelo
Regarding #69 (comment)

The issue is introduced by enabling the feature flag enablePropsUpdateReconciliationAndroid and running yarn feature-flags --update in the react-native fork or discord app. It is a react-native issue from 0.78 and it is fixed in 0.79.

I cherry picked the changes from 0.79 in this branch and tested the fix in both discord and the react-native fork:

  • Implement prop diffing for accessibility props in View #48833
  • Implement prop diffing for transform props in View #48832
  • Implement prop diffing for border props in View #48831
  • Implement prop diffing for event props in View #48830
  • Implement prop diffing for basic props in View #48829

Regarding #69 (comment).
Thanks. I'll update the PR tomorrow and follow your approach from PR 65 to hardcode the feature flags (instead of running yarn feature-flags --update).

@fabOnReact fabOnReact marked this pull request as ready for review May 28, 2025 03:33
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.

2 participants