-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix: move emoji suggestions to portals #24541
Conversation
@robertKozik Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromeandroid-web.movMobile Web - SafariiOS.-.web.MP4Desktopdesktop.moviOSScreen.Recording.2023-08-17.at.10.41.05.movAndroidandroid.-.native.mov |
@allroundexperts I've found that AutoCompleteSuggestion is still hidden under, for this time not header but the Screen.Recording.2023-08-17.at.11.35.44.mov |
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.
One small question to the code
src/components/AutoCompleteSuggestions/autoCompleteSuggestionsPropTypes.js
Outdated
Show resolved
Hide resolved
@robertKozik I thought this was supposed to be tested on web only but I was incorrect it seems. Also, react portals aren't really on native, so I have to rethink this. |
dang, you're right about the browser thing. But if we can fix it on all platforms, it would be better to do so. Let me know what you think about squeezing in other platforms too |
Squeezing as an reducing the number of options to show depending on the height? |
no no, What are your thoughts on expanding the scope of this PR to include the native part as well? As I'm also open to stay with this as browser only, and treat the native as new issue then |
Right. We can make use of a library like https://github.com/gorhom/react-native-portal to make this work on both web and native. Do you think we should use it? |
Also, If we decide to use the above mentioned library, it would be better to migrate all of our |
Well, it seems like there's a completely different situation on the native side. I suggest we separate these two and prioritize pushing the web side of things forward. The native part is more complex and relatively uncommon. I'll proceed with review of this one |
On mWeb-safari I have encountered problems with the position of the suggestions view. @allroundexperts in order to trigger this behaviour you need to have screen keyboard on: Screen.Recording.2023-08-18.at.17.53.28.mov |
I will check this and get back. Thanks a lot for the heads up @robertKozik! |
@robertKozik Fixed. Screen.Recording.2023-08-19.at.3.34.22.AM.mov |
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.
LGTM, lets push it forward 🚀
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.58-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.58-5 🚀
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 1.3.59-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.59-5 🚀
|
return componentToRender; | ||
} | ||
|
||
return ReactDOM.createPortal(<View style={StyleUtils.getBaseAutoCompleteSuggestionContainerStyle({left, width, bottom})}>{componentToRender}</View>, document.querySelector('body')); |
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.
Not a huge deal, but I think we should strive to use the context-based @gorhom/portal
instead of ReactDOM.createPortal
wherever possible, to reduce unnecessary differences between code across platforms.
If we can keep our code in pure React Native (w/ react-native-web of course), we should
Details
This PR fixes the issue where on extremely small short height screens, the mention options were hidden behind the header.
In my original proposal, I proposed to remove
overflowHidden
style from the ReportActions container but upon further testing I found out that the proposed approach had another shortfall. Specifically, the report actions were not stacking behind the header correctly. As such, I decided to proceed with moving the menu inside React portals.Fixed Issues
$ #22930
PROPOSAL: #22930 (comment)
Tests
@
in the composer and verify that the mention options are not hidden behind the report header.Offline tests
N/A
QA Steps
@
in the composer and verify that the mention options are not hidden behind the report header.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Screen.Recording.2023-08-14.at.6.52.20.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-08-14.at.6.58.47.PM.mov
Mobile Web - Safari
Screen.Recording.2023-08-14.at.6.58.14.PM.mov
Desktop
Screen.Recording.2023-08-14.at.6.54.44.PM.mov
iOS
Screen.Recording.2023-08-14.at.7.01.00.PM.mov
Android
Screen.Recording.2023-08-14.at.7.00.19.PM.mov