Skip to content

fix: OverKeyboardView rotation (fabric) #918

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

Merged
merged 2 commits into from
Apr 18, 2025

Conversation

kirillzyusko
Copy link
Owner

@kirillzyusko kirillzyusko commented Apr 11, 2025

📜 Description

Fixed wrong dimensions when phone gets rotated.

💡 Motivation and Context

We need to update shadow node layout whenever screen dimensions changes, so in this PR I'm doing this. I use onSizeChanged method as a lifecycle method for updating layout. Technically I could use onLayout, but it's highly undesirable to block onLayout method, so it's better to do it in onSizeChanged.

Fixes Android issue described in #915

📢 Changelog

Android

  • moved state wrapper to hostView;
  • manage ShadowNode layout inside hostView.

🤔 How Has This Been Tested?

Tested manually on Medium Phone API 35.

📸 Screenshots (if appropriate):

okv-rotation.webm

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko added 🐛 bug Something isn't working 🤖 android Android specific OverKeyboardView Anything related to OverKeyboardView labels Apr 11, 2025
@kirillzyusko kirillzyusko self-assigned this Apr 11, 2025
Copy link
Contributor

github-actions bot commented Apr 11, 2025

📊 Package size report

Current size Target Size Difference
176342 bytes 176273 bytes 69 bytes 📈

@kirillzyusko kirillzyusko added the 🏭 fabric Changes specific to new (fabric/jsi) architecture label Apr 18, 2025
@kirillzyusko kirillzyusko marked this pull request as ready for review April 18, 2025 17:13
@kirillzyusko kirillzyusko merged commit c8a08ce into main Apr 18, 2025
16 checks passed
@kirillzyusko kirillzyusko deleted the fix/over-keyboard-view-fabric-rotation branch April 18, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖 android Android specific 🐛 bug Something isn't working 🏭 fabric Changes specific to new (fabric/jsi) architecture OverKeyboardView Anything related to OverKeyboardView
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant