This PR fixes the issue with the jumping keyboard on iOS devices. It implements the useVisualViewport hook to calculate the height of the real viewport and sets the height of the message container so that the message input is positioned below the keyboard.
Summary of Changes
Created a new file useVisualViewport.js in the src/hooks directory to implement the useVisualViewport hook.
Modified App.jsx in the src/components/App directory to import and use the useVisualViewport hook.
Added a new state variable viewportHeight to hold the height of the viewport.
Used the useVisualViewport hook to get the height of the viewport and update the state variable.
Set the height of the message container using the viewportHeight state variable.
Please review and merge these changes to resolve the issue with the iOS keyboard.
Fixes #12.
🎉 Latest improvements to Sweep:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback (click)
Description
This PR fixes the issue with the jumping keyboard on iOS devices. It implements the useVisualViewport hook to calculate the height of the real viewport and sets the height of the message container so that the message input is positioned below the keyboard.
Summary of Changes
useVisualViewport.js
in thesrc/hooks
directory to implement the useVisualViewport hook.App.jsx
in thesrc/components/App
directory to import and use the useVisualViewport hook.viewportHeight
to hold the height of the viewport.viewportHeight
state variable.Please review and merge these changes to resolve the issue with the iOS keyboard.
Fixes #12.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: