feat(compose): More space on mobile devices #4282
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Writing toots on mobile devices is a sub par experience due to the lack of space in the compose column - when the virtual keyboard covers the screen you don't see what you are typing and have to scroll to tap any of the buttons. This PR hides the tabs and search bar if the compose area is focused.
I would prefer to hide the navigation bar (avatar, username, edit profile) as well, but I don't really know where to place the "close" button then - it would be too close to the emoji picker.
react-motion
is not used because that could mean we have to connect more components to the state (plus we need media queries). We could probably improve the performance of the animation, but I don't really know how - changingmargin-top
is pretty computationally expensive since it triggers re-layout.This also raises the problem of auto focusing the
textarea
, which implies that switching to the compose column automatically triggers the hiding of the two bars.Before
After
Animation