-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 composer educational tooltip wrong position on mWeb Safari #54344
Changes from 5 commits
fb2fa61
be8360e
03b6b54
74cb789
3c7be90
181fe65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ import useNetwork from '@hooks/useNetwork'; | |
import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
import useTheme from '@hooks/useTheme'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import useViewportOffsetTop from '@hooks/useViewportOffsetTop'; | ||
import canFocusInputOnScreenFocus from '@libs/canFocusInputOnScreenFocus'; | ||
import * as DeviceCapabilities from '@libs/DeviceCapabilities'; | ||
import DomUtils from '@libs/DomUtils'; | ||
|
@@ -121,6 +122,7 @@ function ReportActionCompose({ | |
const {translate} = useLocalize(); | ||
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth | ||
const {isSmallScreenWidth, isMediumScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout(); | ||
const offsetTop = useViewportOffsetTop(); | ||
const {isOffline} = useNetwork(); | ||
const actionButtonRef = useRef<View | HTMLDivElement | null>(null); | ||
const currentUserPersonalDetails = useCurrentUserPersonalDetails(); | ||
|
@@ -323,7 +325,7 @@ function ReportActionCompose({ | |
// We are returning a callback here as we want to incoke the method on unmount only | ||
useEffect( | ||
() => () => { | ||
if (!EmojiPickerActions.isActive(report?.reportID ?? '-1')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also here why are we removing the default There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you are: https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#default-value-for-inexistent-ids We recently changed the default fallback value for inexistent IDs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh cool, thanks for the clarification! |
||
if (!report?.reportID || !EmojiPickerActions.isActive(report.reportID)) { | ||
return; | ||
} | ||
EmojiPickerActions.hideEmojiPicker(); | ||
|
@@ -458,7 +460,7 @@ function ReportActionCompose({ | |
}} | ||
wrapperStyle={styles.reportActionComposeTooltipWrapper} | ||
shiftHorizontal={variables.composerTooltipShiftHorizontal} | ||
shiftVertical={variables.composerTooltipShiftVertical} | ||
shiftVertical={variables.composerTooltipShiftVertical + offsetTop} | ||
> | ||
<View | ||
ref={containerRef} | ||
|
@@ -514,7 +516,7 @@ function ReportActionCompose({ | |
isScrollLikelyLayoutTriggered={isScrollLikelyLayoutTriggered} | ||
raiseIsScrollLikelyLayoutTriggered={raiseIsScrollLikelyLayoutTriggered} | ||
reportID={reportID} | ||
policyID={report?.policyID ?? '-1'} | ||
policyID={report?.policyID} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. policyID accepts a string, so we can't do that unless we convert the number to a string. |
||
parentReportID={report?.parentReportID} | ||
parentReportActionID={report?.parentReportActionID} | ||
includeChronos={ReportUtils.chatIncludesChronos(report)} | ||
|
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.
Why is the value changed to 0?