Skip to content

feat: migrate KeyboardStickyView to reanimated#1307

Merged
kirillzyusko merged 1 commit intomainfrom
fix/sticky-view-reanimated-again
Apr 29, 2026
Merged

feat: migrate KeyboardStickyView to reanimated#1307
kirillzyusko merged 1 commit intomainfrom
fix/sticky-view-reanimated-again

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented Feb 10, 2026

📜 Description

Migrate KeyboardStickyView back to reanimated.

💡 Motivation and Context

Animated implementation works well. However this component was originally developed using Reanimated and now I'm planning to extend its functionality:

  • I'm planning to add proper interactive keyboard dismissal interpolation;
  • I'm going to add freeze property.

Both things require better control over the animation management, so I'm switching back to reanimated implementation.

All the issues described in #898 seems to be resolved and 1.21.x requires higher react-native version (where the issue has been fixed), so I think it's safe to go back to reanimated implementation now 🤞

Closes #1306 #1273

📢 Changelog

JS

  • migrate KeyboardStickyView to reanimated;

🤔 How Has This Been Tested?

Tested with e2e tests.

📸 Screenshots (if appropriate):

Everything works as before 🤷‍♂️

📝 Checklist

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

@kirillzyusko kirillzyusko self-assigned this Feb 10, 2026
@kirillzyusko kirillzyusko added 🐛 bug Something isn't working KeyboardStickyView 🩹 Anything related to KeyboardStickyView component labels Feb 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 10, 2026

📊 Package size report

Current size Target Size Difference
311843 bytes 312058 bytes -215 bytes 📉

@kirillzyusko kirillzyusko added refactor You changed the code but it didn't affect functionality and removed 🐛 bug Something isn't working labels Feb 10, 2026
@SamuraiF0x
Copy link
Copy Markdown

While at it, it would be nice to also allow reanimated shared values for the offset values :)

@kirillzyusko
Copy link
Copy Markdown
Owner Author

@SamuraiF0x what is the use case of having "animated" offset? 🤔 Or why do you want to have padding as a shared value?

@SamuraiF0x
Copy link
Copy Markdown

@kirillzyusko It’s so I can animate the offset when closed, based on toolbar visibility - the toolbar visibility toggles depending on whether there is content inside input

@kirillzyusko kirillzyusko force-pushed the fix/sticky-view-reanimated-again branch from aa0c069 to d991aa7 Compare April 16, 2026 09:43
@kirillzyusko kirillzyusko force-pushed the fix/sticky-view-reanimated-again branch from d991aa7 to 84c320d Compare April 20, 2026 11:26
@kirillzyusko kirillzyusko marked this pull request as ready for review April 29, 2026 09:38
@kirillzyusko
Copy link
Copy Markdown
Owner Author

Thanks @SamuraiF0x

It makes sense what you are saying! I think a similar request has been made here: #1441

So I will try to think on how to add it! Hiding Toolbar dynamically and have an ability to adjust position of "frozen" KeyboardToolbar indeed may be a great addition to the component!

@github-actions
Copy link
Copy Markdown
Contributor

LGTM

@kirillzyusko kirillzyusko merged commit 21a939f into main Apr 29, 2026
18 checks passed
@kirillzyusko kirillzyusko deleted the fix/sticky-view-reanimated-again branch April 29, 2026 09:54
@SamuraiF0x
Copy link
Copy Markdown

SamuraiF0x commented Apr 29, 2026

@kirillzyusko Awesome!
One thing I'd keep in mind is also making sure that keyboard type gets taken into account - e.g. when email or password inputs get focused, keyboard gets extra top row (email/password recommendations) which sticky keyboard view doesn't account for properly, so you either get keyboard partially on top of sticky keyboard view or you get a jitter where sticky components flicker up and down and don't animate smoothly.

Screen.Recording.2026-04-29.at.12.07.59.mov

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

Labels

KeyboardStickyView 🩹 Anything related to KeyboardStickyView component refactor You changed the code but it didn't affect functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyboardStickyView disappears when keyboard becomes visible

2 participants