Skip to content

feat: freeze in KeyboardChatScrollView as SharedValue#1434

Merged
kirillzyusko merged 1 commit intomainfrom
feat/freeze-shared-value
Apr 15, 2026
Merged

feat: freeze in KeyboardChatScrollView as SharedValue#1434
kirillzyusko merged 1 commit intomainfrom
feat/freeze-shared-value

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented Apr 14, 2026

📜 Description

Make freeze prop of KeyboardChatScrollView to support SharedValue.

💡 Motivation and Context

Fixing an architectural flow in KeyboardChatScrollView design 👀

Initially I considered to use freeze as a SharedValue. But I was thinking that it may reveal internal implementation so decided to use plain prop types (i. e. react state approach).

However now I have a good use-case - if you are using react-native-gesture-handler for handling button presses etc. you indeed may not need to jump to JS thread and then back to worklet if you can manage everything directly on UI thread.

For compatibility reasons I decided to keep this prop as react prop + added SharedValue support.

Closes #1424

📢 Changelog

JS

  • add support for SharedValue type for freeze prop;

Docs

  • updated docs for freeze type;

🤔 How Has This Been Tested?

Tested in example project.

📝 Checklist

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

@kirillzyusko kirillzyusko self-assigned this Apr 14, 2026
@kirillzyusko kirillzyusko added enhancement New feature or request KeyboardChatScrollView 💬 Anything about chat functionality labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Package size report

Current size Target Size Difference
313303 bytes 312992 bytes 311 bytes 📈

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-04-15 11:09 UTC

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 2 changed Apr 14, 2026, 8:15 AM

@kirillzyusko kirillzyusko marked this pull request as ready for review April 15, 2026 10:46
@kirillzyusko kirillzyusko merged commit 1d9a9ac into main Apr 15, 2026
21 of 22 checks passed
@kirillzyusko kirillzyusko deleted the feat/freeze-shared-value branch April 15, 2026 11:06
@github-actions
Copy link
Copy Markdown
Contributor

  1. Missing Freeze Dependency in useAnimatedReaction
    Why: The useAnimatedReaction hook in useExtraContentPadding no longer includes freeze as a dependency, so changes to freeze.value won't trigger updates.
    Fix: Add freeze back to the dependencies array.

  2. Incorrect Freezing Handling in Fixture Setup
    Why: The fixture converts freeze booleans to shared values but doesn't ensure they're properly tracked for re-reactions when updated.
    Fix: Pass freeze as a shared value and include it in all relevant dependency arrays to ensure updates are captured.

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

Labels

enhancement New feature or request KeyboardChatScrollView 💬 Anything about chat functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

freeze shared value support for KeyboardChatScrollView

1 participant