-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add a button to expand the composer to full screen when the input has 3+ lines #9031
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
Changes from all commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
ea2c046
Permanent full compose initial
neil-marcellini ae6f5d6
Small cleanup before making the size dynamic
neil-marcellini f2bded2
Expand and collapse composer with 3+ lines initial
neil-marcellini 52b38f6
Update ReportActionsView on composer size changes
neil-marcellini 06ea730
Fix chat scroll and composer expand and collapse
neil-marcellini 238f975
Undo changes to ReportActionsView
neil-marcellini 41b1903
Close full screen composer on send
neil-marcellini bc60532
Immediately hide the expand button on send
neil-marcellini c8ed9c7
Hide the expand button when deleting the 3rd line
neil-marcellini 8d72922
Remove console log
neil-marcellini e9776df
Remove duplicate isFullComposerAvailable state
neil-marcellini a721395
Always reset fullComposerAvailable on send
neil-marcellini 4fdb698
Keyboard avoiding ios full composer with debug
neil-marcellini 3f4ae51
Remove red debug borders
neil-marcellini 1d5fdf7
Fix button flicker when updating number of lines
neil-marcellini 7416d80
Clean up RNTextInput props
neil-marcellini 9f07fdd
Set a max height on the non-full mobile composer
neil-marcellini 8150185
Remove border from the composer size buttons
neil-marcellini 5051477
Keep plus button at the bottom as lines are added
neil-marcellini 569981c
Combine mobile Composer implementations
neil-marcellini 3de3993
Move comment
neil-marcellini cbf4eb4
Use the expand Expensicon to expand the composer
neil-marcellini cd6b497
Give isComposerFullSize a default prop
neil-marcellini 90dd68b
Merge branch 'main' of github.com:Expensify/App into neil-full-compose
neil-marcellini eae4d41
Use a collapse icon to collapse the full composer
neil-marcellini ca39644
Default isFullComposerAvailable to false if unset
neil-marcellini 56ca90c
Fix composer placeholder centering on android
neil-marcellini 99c45c1
Fix the emoji picker with the full composer
neil-marcellini c09b08f
Keep the composer full size on keyboard dismissal
neil-marcellini 63c3f86
Add expand and collapse translations for tooltip
neil-marcellini 1a26946
Allow text to take up the full composer
neil-marcellini ec73a33
Allow unfocused full composer to scroll on web
neil-marcellini 80fbbc1
Fix full composer input align to bottom
neil-marcellini 08f041a
Cleanup useless display none on flatlist
neil-marcellini 89fe8d5
Use sizing.h100 style
neil-marcellini 6e7b6e1
Initial fix for mobile web full composer height
neil-marcellini 4179675
Keep input focus on mobile web when expanding
neil-marcellini c6110d8
Mobile web full composer working including header
neil-marcellini a20abd2
Check for window.visualViewport vs window
neil-marcellini 08bd11c
Remove arbitrary composer focus on expand
neil-marcellini 8abaec3
Fix android full composer bottom outline
neil-marcellini 50fc8f9
Fix mobile composer collapse animation on send
neil-marcellini 03da55f
Merge branch 'main' of github.com:Expensify/App into neil-full-compose
neil-marcellini 5599c5a
Revert "Fix android full composer bottom outline"
neil-marcellini 3e50996
Revert "Fix mobile composer collapse animation on send"
neil-marcellini 9196625
Transparent composer to fix android outline
neil-marcellini e7d9078
Revert "Transparent composer to fix android outline"
neil-marcellini 5cecb2c
Fix android bottom border with a spacing wrapper
neil-marcellini b6c1751
Fix composer collapse on send with spacing wrapper
neil-marcellini 1f66c3a
Match button and composer vertical padding
neil-marcellini 36db399
Simplify setting isFulComposerAvailable
neil-marcellini 8b221c7
Fix comment typo and formatting
neil-marcellini e5a30e0
Extract updateIsFullComposerAvailable into util
neil-marcellini 393efe1
Mobile composer separate files with shared utils
neil-marcellini b5888fa
Remove useless onChange prop from mobile composers
neil-marcellini c694946
Merge main to fix conflicts
neil-marcellini 5d7c80f
Add a JSDoc to Report.setIsComposerFullSize
neil-marcellini 32573a6
Switch to merge for setIsComposerFullSize
neil-marcellini 0b5ecd3
Add composer max lines constants
neil-marcellini c1f2af8
Move FULL_COMPOSER_MIN_LINES under COMPOSER key
neil-marcellini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /** | ||
| * Get the current number of lines in the composer | ||
| * | ||
| * @param {Number} maxLines | ||
| * @param {Number} lineHeight | ||
| * @param {Number} paddingTopAndBottom | ||
| * @param {Number} scrollHeight | ||
| * | ||
| * @returns {Number} | ||
| */ | ||
| function getNumberOfLines(maxLines, lineHeight, paddingTopAndBottom, scrollHeight) { | ||
| let newNumberOfLines = Math.ceil((scrollHeight - paddingTopAndBottom) / lineHeight); | ||
| newNumberOfLines = maxLines <= 0 ? newNumberOfLines : Math.min(newNumberOfLines, maxLines); | ||
| return newNumberOfLines; | ||
| } | ||
|
|
||
| export default getNumberOfLines; |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.