-
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
35380 virtual viewport on report screen #38755
35380 virtual viewport on report screen #38755
Conversation
@@ -176,7 +176,7 @@ const EmojiPicker = forwardRef((props, ref) => { | |||
onModalShow={focusEmojiSearchInput} | |||
onModalHide={onModalHide.current} | |||
hideModalContentWhileAnimating | |||
shouldSetModalVisibility={false} | |||
shouldSetModalVisibility={Browser.isMobile()} |
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.
This also affects mChrome. Is it safe?
It would be good to add comment on platform specific changes 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.
Yes it must be specific for mSafari, i have update and add comment
src/styles/index.ts
Outdated
@@ -1639,7 +1639,7 @@ const styles = (theme: ThemeColors) => | |||
|
|||
popoverInnerContainer: { | |||
paddingTop: 0, // adjusting this because the mobile modal adds additional padding that we don't need for our layout | |||
maxHeight: '95%', | |||
maxHeight: '100%', |
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.
Please check past PR where 95% value was added and confirm that this doesn't cause any regression which that PR fixes.
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.
I have reverted this change.
src/libs/actions/Modal.ts
Outdated
*/ | ||
function setModalVisibility(isVisible: boolean) { | ||
Onyx.merge(ONYXKEYS.MODAL, {isVisible}); | ||
setModalVisibility(false); |
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.
Please make sure that this change doesn't cause any regressions.
Especially when PopoverWithoutOverlay is opened and closed inside Modal on web platform.
Actually, which bug does this change fix?
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.
I'll check condition only setModalVisibility
when current browser isMobileSafari
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.
Hi @situchan i have updated the condition to avoid regression and we don't need to change setModalVisibility
, so I have reverted code change related to setModalVisibility
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.
Add Tests / QA Steps for #35403
src/pages/home/ReportScreen.tsx
Outdated
/** Indicates if there is a modal currently visible or not */ | ||
modal: OnyxEntry<OnyxTypes.Modal>; |
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.
/** Indicates if there is a modal currently visible or not */ | |
modal: OnyxEntry<OnyxTypes.Modal>; | |
/** Indicates if there is a modal currently visible or not */ | |
modal: OnyxEntry<OnyxTypes.Modal>; | |
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.
i have updated description
src/pages/home/ReportScreen.tsx
Outdated
@@ -131,7 +133,7 @@ function ReportScreen({ | |||
markReadyForHydration, | |||
policies = {}, | |||
isSidebarLoaded = false, | |||
viewportOffsetTop, | |||
modal = {isVisible: false}, |
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.
default value here is redundant
Co-authored-by: Situ Chandra Shil <108292595+situchan@users.noreply.github.com>
Please retest latest changes on all platforms. And merge main to fix perf tests |
@situchan I have tested after sync the latest main and fix perf tests iOS: NativeScreen.Recording.2024-03-26.at.10.27.25.moviOS: mWeb SafariScreen.Recording.2024-03-26.at.10.05.56.movAndroid: mWeb Chromescreen-20240326-103233.mp4Android: Nativehttps://github.com/Expensify/App/assets/11959869/4cf82ee7-4c7c-4e87-96d9-8cd17d915c83 MacOS: DesktopScreen.Recording.2024-03-26.at.10.37.40.movMacOS: Chrome / SafariScreen.Recording.2024-03-26.at.10.08.05.mov |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromemchrome.moviOS: Nativeios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@@ -24,7 +24,8 @@ const useEmojiPickerMenu = () => { | |||
const [preferredSkinTone] = usePreferredEmojiSkinTone(); | |||
const {windowHeight} = useWindowDimensions(); | |||
const StyleUtils = useStyleUtils(); | |||
const listStyle = StyleUtils.getEmojiPickerListHeight(isListFiltered, windowHeight); | |||
// calculate the height of the emoji picker based popoverInnerContainer style has maxHeight is 95% |
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.
Can you update the comment to explain why 95%?
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.
I have updated explain the reason for 95%
return () => { | ||
removeViewportResizeListener(); | ||
}; |
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.
This function is not needed right?
return () => { | |
removeViewportResizeListener(); | |
}; | |
return removeViewportResizeListener; |
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.
yes I have cleanup this function
@iwiznia looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
What?! The test was passing when I clicked it 😕 |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Hi @iwiznia could you please help me deploy an adhoc build? |
Sure but I don't know how or even what an adhoc build is. |
We don't need to create an ad hoc I can reproduce issue #39061 when showing smart app banner |
Details
Fixed Issues
$ #35380
PROPOSAL: #35380 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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 and/or tagged@Expensify/design
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-03-21.at.23.45.05.mov
Android: mWeb Chrome
Screen.Recording.2024-03-21.at.23.52.13.mov
iOS: Native
Screen.Recording.2024-03-21.at.23.42.42.mov
iOS: mWeb Safari
Screen.Recording.2024-03-21.at.23.41.14.mov
MacOS: Chrome / Safari
Screen.Recording.2024-03-21.at.23.55.12.mov
MacOS: Desktop
Screen.Recording.2024-03-22.at.00.01.30.mov