-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 padding for edit composer suggestions #41071
Conversation
@eVoloshchak 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] |
@eVoloshchak The PR is ready for review. |
Design-wise this seems pretty good. |
src/styles/utils/getAutoCompleteSuggestionContainerStyle/index.ts
Outdated
Show resolved
Hide resolved
src/styles/utils/getAutoCompleteSuggestionContainerStyle/index.native.ts
Outdated
Show resolved
Hide resolved
src/styles/utils/getAutoCompleteSuggestionContainerStyle/index.ts
Outdated
Show resolved
Hide resolved
.../home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx
Outdated
Show resolved
Hide resolved
.../home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx
Outdated
Show resolved
Hide resolved
.../home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx
Outdated
Show resolved
Hide resolved
.../home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx
Outdated
Show resolved
Hide resolved
src/styles/utils/getAutoCompleteSuggestionContainerStyle/index.ts
Outdated
Show resolved
Hide resolved
.../home/report/ReportActionCompose/ComposerWithSuggestionsEdit/ComposerWithSuggestionsEdit.tsx
Outdated
Show resolved
Hide resolved
_containerHeight: number, | ||
): ViewStyle { | ||
return { | ||
top: -(height + (shouldBeDisplayedBelowParentContainer ? -2 : 1) * (suggestionsPadding + (shouldPreventScroll ? 0 : borderWidth))), |
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.
top: -(height + (shouldBeDisplayedBelowParentContainer ? -2 : 1) * (suggestionsPadding + (shouldPreventScroll ? 0 : borderWidth))), | |
top: -(height + (shouldBeDisplayedBelowParentContainer ? -CONST.AUTO_COMPLETE_SUGGESTER.BORDER_WIDTH : 1) * (suggestionsPadding + (shouldPreventScroll ? 0 : borderWidth))), |
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.
2 here does not mean CONST.AUTO_COMPLETE_SUGGESTER.BORDER_WIDTH
.
@eVoloshchak I updated please help to check again. |
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.
On iOS, the following error pops up when suggestions or emoji list is opened (I suspect this might be resolved by merging main)
Screen.Recording.2024-06-11.at.14.33.25.mov
@dukenv0307, I'm still encountering the same error Screen.Recording.2024-06-18.at.17.13.15.movVerified this doesn't exist on |
@eVoloshchak I tested and this bug is fixed now. |
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.
We recently changed the top/bottom padding of our popovers to be 16px instead of 12px, so I wonder if we need to update the offset by 8px to correct that. |
Oh good call Shawn, I bet that's why we're getting this little overlap with the composer. |
@eVoloshchak I can't reproduce this bug above. Screen.Recording.2024-07-04.at.15.41.28.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.
@dukenv0307, it is reproducible on Web and mWeb
Screen.Recording.2024-07-08.at.12.18.47.mov
It's also reproducible for the regular composer (not the edit one) on staging, we don't need to fix that in this PR, but I suspect it will be fixed for both with a single fix (@dukenv0307, could you please check if this does the trick?)
@eVoloshchak So we want to add a space between the suggestion and the composer, right? |
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.
So we want to add a space between the suggestion and the composer, right?
@dukenv0307, yes, it should have the same padding as the emoji modal for default composer
Currently, it overlaps with the edit composer
@eVoloshchak I updated, please help to check again. |
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.
Looking good now! (noting the same problem exists for the emoji modal, but that exists on staging and unrelated to this PR)
@dukenv0307, I'm a bit late, apologies for that, could you resolve the conflicts and I'll give this the last round of testing?
@eVoloshchak I updated. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-10-07.at.13.41.32.movAndroid: mWeb ChromeScreen.Recording.2024-10-07.at.13.44.50.moviOS: NativeScreen.Recording.2024-10-07.at.13.23.45.moviOS: mWeb SafariScreen.Recording.2024-10-07.at.13.34.49.movMacOS: Chrome / SafariScreen.Recording.2024-10-07.at.13.22.20.movMacOS: DesktopScreen.Recording.2024-10-07.at.13.45.52.mov |
@dukenv0307, when testing this I noticed that emoji suggestions have already been implemented for the edit composer screen-20240805-120423.mp4Am I missing something? Looks like the previous PR was reverted, was this added by another PR? |
@eVoloshchak I updated. |
@dukenv0307, we don't need any other changes besides different padding (fix for #41071 (review)). Treat this like a new PR (or go ahead and create a new PR, your choice) |
@eVoloshchak This is all changes that we need to fix the padding issue. |
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.
- Bug 1
suggestions list doesn't open when typing "@", emoji suggestions list doesn't open when starting to type an emoji name (this doesn't happen 100% of the times, but pretty consistently)
Screen.Recording.2024-08-27.at.14.54.37.mov
- Bug 2 (Android)
Both lists overlap with the keyboard/UI (padding calculation is not correct)
Screen.Recording.2024-08-27.at.14.51.37.mov
- In addition to that, could you please update the testing steps, retest this on all of the platforms and update the Screenshots/Videos section please?
@eVoloshchak Is this bug reproducible on the latest main
I can't reproduce this bug.
I updated the test steps and screenshots. |
Confirmed this is reproducible on staging
I can reliably reproduce it on native Android Screen.Recording.2024-09-04.at.17.01.54.mov |
@eVoloshchak Did you try to disable the strict mode? |
Turns out this is working correctly on a physical device, must be a problem with an emulator |
@eVoloshchak I updated. |
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.
Still doesn't look right on mWeb Safari. This isn't a simulator issue, current staging works fine in a simulator
Screen.Recording.2024-09-15.at.10.23.24.mov
Investigating. |
@eVoloshchak This bug happens because Screen.Recording.2024-09-25.at.17.48.09.movScreen.Recording.2024-09-25.at.17.51.56.movScreen.Recording.2024-09-25.at.17.50.42.mov |
@eVoloshchak Friendly bump. |
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!
🚀 Deployed to staging by https://github.com/stitesExpensify in version: 9.0.46-0 🚀
|
This PR is failing for Android app because of issue #50377 |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.46-5 🚀
|
Details
Fixed Issues
$ #34442
#40861
#40864
#40856
#40854
PROPOSAL: #34442 (comment)
Tests
@
and verify that the mention suggestion list appears with spacing between composer is8px
:sm
and verify that the emoji suggestion list appears with spacing between composer is8px
Offline tests
Same as above
QA Steps
@
and verify that the mention suggestion list appears with spacing between composer is8px
:sm
and verify that the emoji suggestion list appears with spacing between composer is8px
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.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
Android: Native
Screen.Recording.2024-08-28.at.16.19.33.mov
Android: mWeb Chrome
Screen.Recording.2024-08-28.at.16.30.52.mov
iOS: Native
Screen.Recording.2024-08-28.at.16.20.33.mov
iOS: mWeb Safari
Screen.Recording.2024-08-28.at.16.18.25.mov
MacOS: Chrome / Safari
Screen.Recording.2024-08-28.at.16.17.02.mov
MacOS: Desktop
Screen.Recording.2024-08-28.at.16.26.40.mov