Skip to content

Conversation

@kkafar
Copy link
Member

@kkafar kkafar commented May 8, 2025

Description

Fixes #2714 on Android
Fixes #2815 on Android

See #2905 for detailed description.

Changes

Removed call to RNSScreenStaceaderSubviewShadowNode.setSize in corresponding component descriptor.

It seems that we do not need to enforce node size from HostTree. Setting appropriate content offset is enough for pressables to function correctly (assuming that native layout does not change size of any subview). I currently can't come up with any scenario where this would happen.

Test code and steps to reproduce

I've tested:

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

This call seems to be currently unnecessary - `TestHeaderTitle` &
`Test2466` do keep working. Removing that call gets rid of the source*
of the issue, as described in PR description.

* this is not the real real source. IMHO the real one is lack of support for native
layout in React Native, however this won't be improved anytime soon.
@kkafar
Copy link
Member Author

kkafar commented May 8, 2025

Found following regression:

bug-found-while-testing-new-solution-android.mov

what's kinda funny - it seems to happen ONLY with react native built from source.

This is unrelated to the PR.

@kkafar kkafar requested review from kligarski and maciekstosio May 8, 2025 10:31
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

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

👍

@kkafar kkafar merged commit 0e2fd32 into main May 8, 2025
9 checks passed
@kkafar kkafar deleted the @kkafar/2714-headerright-sizing-approach-2-android branch May 8, 2025 15:21
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.

Native Stack custom headerTitle doesn't support dynamic width content headerRight size and alignment is incorrect when rendered items change

3 participants