-
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
New product training tooltips #54064
New product training tooltips #54064
Conversation
…e chat, and global create actions and render tooltip for global create
…dd new useBottomTabIsFocused hook for better navigation state management
…mprove tooltip rendering logic
Co-authored-by: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com>
Co-authored-by: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com>
Co-authored-by: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com>
Co-authored-by: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com>
src/hooks/useBottomTabIsFocused.ts
Outdated
if (shouldUseNarrowLayout) { | ||
return isFocused || topmostCentralPane?.name === SCREENS.SEARCH.CENTRAL_PANE; | ||
} | ||
return isFocused || Object.keys(CENTRAL_PANE_SCREENS).includes(topmostCentralPane?.name ?? ''); |
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 shouldn't show the tooltip if the component is not focused, right?
if (shouldUseNarrowLayout) { | |
return isFocused || topmostCentralPane?.name === SCREENS.SEARCH.CENTRAL_PANE; | |
} | |
return isFocused || Object.keys(CENTRAL_PANE_SCREENS).includes(topmostCentralPane?.name ?? ''); | |
if (shouldUseNarrowLayout) { | |
return isFocused && topmostCentralPane?.name === SCREENS.SEARCH.CENTRAL_PANE; | |
} | |
return isFocused && Object.keys(CENTRAL_PANE_SCREENS).includes(topmostCentralPane?.name ?? ''); |
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.
for some reason isFocused is always false for components in bottom tab, no idea why
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 got the idea from useIsFocused hook in this component
…d Search components
…on, BottomTabBar, and SearchTypeMenuNarrow components
…siveness across FloatingActionButton, BottomTabBar, and SearchTypeMenuNarrow components
Sorry to be so nitpicky 🙈, but can we check the padding values and the border radius for the tooltip? In Figma, the tooltips have 12px vertical padding and 16px horizontal padding, and a border radius of 8px. |
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.
@ishpaul777 Did you confirm the translations on Slack?
src/languages/en.ts
Outdated
workspaceChatTooltip: { | ||
part1: 'Review submitted expenses and chat', | ||
part2: '\nwith approvers in your', | ||
part3: ' workspace chat.', |
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.
part3: ' workspace chat.', | |
part3: ' workspace chat', |
src/languages/en.ts
Outdated
globalCreateTooltip: { | ||
part1: 'Where to ', | ||
part2: 'create expenses,', | ||
part3: '\nstart chatting, and more.', |
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.
part3: '\nstart chatting, and more.', | |
part3: '\nstart chatting, and more', |
src/languages/es.ts
Outdated
workspaceChatTooltip: { | ||
part1: 'Revisa los gastos enviados y chatea', | ||
part2: '\ncon los aprobadores en tu', | ||
part3: ' chat del espacio de trabajo.', |
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.
part3: ' chat del espacio de trabajo.', | |
part3: ' chat del espacio de trabajo', |
src/languages/es.ts
Outdated
globalCreateTooltip: { | ||
part1: 'Dónde ', | ||
part2: 'crear gastos,', | ||
part3: '\nempezar a chatear y más.', |
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.
part3: '\nempezar a chatear y más.', | |
part3: '\nempezar a chatear y más', |
asked but still needs confirmation https://expensify.slack.com/archives/C07NMDKEFMH/p1734116662021799 will update accordingly |
Currently the tooltips use App/src/styles/utils/generators/TooltipStyleUtils/index.ts Lines 221 to 223 in 33ce301
|
… and Spanish translations
@rayane-djouah This is approved copy and translations, will you please give this a quick review ![]() |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@puneetlath Sorry, could you let me know where I can find the instructions to generate certificates? Thanks |
@puneetlath No worries. I've just found it out. Thanks |
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.0.77-0 🚀
|
FYI we had to revert this because it created a HybridApp crash for a yet-unknown reason: #54260 |
@kavimuru The PR was reverted no need for QA here |
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.77-6 🚀
|
<EducationalTooltip | ||
shouldRender={shouldShowProductTrainingTooltip} | ||
anchorAlignment={{ | ||
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.BOTTOM, |
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.
Coming from here #57070, because of the tooltip overlaps the expensify logo, we decide to change the vertical alignment to TOP
.
@@ -156,17 +158,18 @@ function OptionRowLHN({reportID, isFocused = false, onSelectRow = () => {}, opti | |||
needsOffscreenAlphaCompositing | |||
> | |||
<EducationalTooltip | |||
shouldRender={shouldShowProductTrainingTooltip} | |||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | |||
shouldRender={shouldShowProductTrainingTooltip && (isActiveWorkspaceChat || shouldShowGetStartedTooltip)} |
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 team,
Coming from #56952, we should exclude a case that workspace chat is a taskThread, otherwise it will show multiple tooltips. More details here #56952 (comment)
Explanation of Change
Fixed Issues
$ #53087
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Record_2024-12-13-18-38-24.mp4
Android: mWeb Chrome
Record_2024-12-13-18-14-31.mp4
iOS: Native
Screen.Recording.2024-12-13.at.5.44.54.PM.mov
iOS: mWeb Safari
Screen.Recording.2024-12-13.at.5.48.22.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2024-12-13.at.6.11.36.PM.mov
MacOS: Desktop
Screen.Recording.2024-12-13.at.6.24.31.PM.mov