-
Notifications
You must be signed in to change notification settings - Fork 4k
Add mentions and emojis suggestions to Home prompt box; fix RHP suggestions #99912
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
puneetlath
merged 20 commits into
Expensify:main
from
software-mansion-labs:@GCyganek/fix-mentions-and-emojis-rhp-and-prompt-box-home-page
Sep 10, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
4fee957
Add mentions and emojis suggestions to Home prompt box; fix RHP sugge…
GCyganek 54f2639
Fix knip and ESlint
GCyganek dfa8b4f
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek 156625a
onBlur instead of useEffect
GCyganek 8b39ee4
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek 0bdabef
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek 92947a9
Fix not hiding suggestions when navigating to a different screen
GCyganek 68e77ed
Fix suggestions positioning
GCyganek 9757182
Fix tests
GCyganek e9bb78e
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek 9361fc3
Fix ESlint and ts
GCyganek 74b3679
Fix iOS mweb
GCyganek a6a7b3a
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek e1d5380
seatbelt
GCyganek 2360016
Fix suggestions list on mWeb
GCyganek 88f175b
Do not apply bottom padding when menu displayed below input
GCyganek 4f5522a
Merge branch 'main' into @GCyganek/fix-mentions-and-emojis-rhp-and-pr…
GCyganek 6c77964
Delete console.logs
GCyganek 73cb93d
One getSuggestionsViewportBottom
GCyganek cfd95db
Simplify logic
GCyganek 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
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
35 changes: 0 additions & 35 deletions
35
...leteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.android.ts
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...CompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ios.ts
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...pleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.native.ts
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,5 @@ | ||
| function getBottomSuggestionPadding(isMenuAbove: boolean): number { | ||
| return isMenuAbove ? 30 : 0; | ||
| } | ||
|
|
||
| export default getBottomSuggestionPadding; | ||
2 changes: 1 addition & 1 deletion
2
...AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/getBottomSuggestionPadding/index.ts
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
58 changes: 46 additions & 12 deletions
58
src/components/AutoCompleteSuggestions/AutoCompleteSuggestionsPortal/index.native.tsx
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
10 changes: 10 additions & 0 deletions
10
src/components/AutoCompleteSuggestions/getSuggestionsViewportBottom/index.native.ts
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,10 @@ | ||
| /** | ||
| * There is no DOM to measure on native, and the portal re-bases the menu's `bottom` onto its host's frame, which | ||
| * already sits above the keyboard, so the window height is used as-is. | ||
| */ | ||
| // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
| function getSuggestionsViewportBottom(windowHeight: number, keyboardHeight: number): number { | ||
| return windowHeight; | ||
| } | ||
|
|
||
| export default getSuggestionsViewportBottom; |
10 changes: 10 additions & 0 deletions
10
src/components/AutoCompleteSuggestions/getSuggestionsViewportBottom/index.ts
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,10 @@ | ||
| /** | ||
| * The menu's `bottom` counts up from the bottom edge of the `html` box, so it has to be measured with the same | ||
| * `getBoundingClientRect` the caret position comes from - a window height is not interchangeable, because iOS | ||
| * scrolls the page to reveal the keyboard. The box is then raised by the keyboard so the menu is not covered by it. | ||
| */ | ||
| function getSuggestionsViewportBottom(windowHeight: number, keyboardHeight: number): number { | ||
| return (document.documentElement?.getBoundingClientRect().bottom ?? windowHeight) - keyboardHeight; | ||
| } | ||
|
|
||
| export default getSuggestionsViewportBottom; |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment
And to me, using two files for this kind of logic is a small overcoding 😅
Can we use something like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't
Platform.selectbreaking CONSISTENCY-1 AI reviewer rule?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh
Okay then
I remember that platform specific files are preferable, but I thought it wasn't mandatory 😅
Especially in this case
Let's just leave everything as it is, then!