-
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
Merged
puneetlath
merged 28 commits into
Expensify:main
from
ishpaul777:new-product-training-tooltips
Dec 13, 2024
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6915152
Rename PRODUCT_TRAINING_TOOLTIP_DATA to TOOLTIPS and update references
ishpaul777 d4e601e
Add new tooltips for search filter, bottom navigation inbox, workspac…
ishpaul777 ef25dd7
update workspace chat tooltip
ishpaul777 b74ab71
Refactor FloatingActionButton to use useBottomTabIsFocused hook and a…
ishpaul777 cd4d450
Enhance bottom navigation inbox tooltip with additional content and i…
ishpaul777 c8b461d
fix typo
ishpaul777 07d8869
Add educational tooltips for search filter and update bottom navigati…
ishpaul777 a8c5fab
Remove unnecessary console log
ishpaul777 490bcf4
Remove beta
ishpaul777 2e99f8b
use variables
ishpaul777 ca2a374
Update src/components/LHNOptionsList/OptionRowLHN.tsx
ishpaul777 0c2c09d
Update src/components/ProductTrainingContext/index.tsx
ishpaul777 ed735a1
Update src/languages/en.ts
ishpaul777 b139934
Update src/languages/en.ts
ishpaul777 64e89d7
Refactor tooltip positioning and variables in FloatingActionButton an…
ishpaul777 c95b6e8
Remove unused responsive layout hook from FloatingActionButton component
ishpaul777 569e0cb
Refactor tooltip styles and translations for improved consistency acr…
ishpaul777 377189c
fix typo
ishpaul777 749e890
Refactor tooltip positioning and responsiveness in FloatingActionButt…
ishpaul777 3e6c815
Refactor tooltip positioning and visibility logic for improved respon…
ishpaul777 db57944
add comments and api changes
ishpaul777 b63ecf1
Merge branch 'main' into new-product-training-tooltips
ishpaul777 dc13937
Update src/languages/en.ts
ishpaul777 192125c
changes as per review
ishpaul777 4e959b9
Update Spanish translations for tooltips and messages
ishpaul777 aaaf230
Add border radius to product training tooltip wrapper
ishpaul777 e2645c7
Refactor tooltip content for improved clarity and emphasis in English…
ishpaul777 f22bbc2
format
ishpaul777 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 0 additions & 67 deletions
67
src/components/ProductTrainingContext/PRODUCT_TRAINING_TOOLTIP_DATA.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
import type {ValueOf} from 'type-fest'; | ||
import {dismissProductTraining} from '@libs/actions/Welcome'; | ||
import CONST from '@src/CONST'; | ||
import type {TranslationPaths} from '@src/languages/types'; | ||
|
||
const { | ||
CONCEIRGE_LHN_GBR, | ||
RENAME_SAVED_SEARCH, | ||
WORKSAPCE_CHAT_CREATE, | ||
QUICK_ACTION_BUTTON, | ||
SEARCH_FILTER_BUTTON_TOOLTIP, | ||
BOTTOM_NAV_INBOX_TOOLTIP, | ||
LHN_WORKSPACE_CHAT_TOOLTIP, | ||
GLOBAL_CREATE_TOOLTIP, | ||
} = CONST.PRODUCT_TRAINING_TOOLTIP_NAMES; | ||
|
||
type ProductTrainingTooltipName = ValueOf<typeof CONST.PRODUCT_TRAINING_TOOLTIP_NAMES>; | ||
|
||
type ShouldShowConditionProps = { | ||
shouldUseNarrowLayout?: boolean; | ||
}; | ||
|
||
type TooltipData = { | ||
content: Array<{text: TranslationPaths; isBold: boolean}>; | ||
onHideTooltip: () => void; | ||
name: ProductTrainingTooltipName; | ||
priority: number; | ||
shouldShow: (props: ShouldShowConditionProps) => boolean; | ||
}; | ||
|
||
const TOOLTIPS: Record<ProductTrainingTooltipName, TooltipData> = { | ||
[CONCEIRGE_LHN_GBR]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.conciergeLHNGBR.part1', isBold: false}, | ||
{text: 'productTrainingTooltip.conciergeLHNGBR.part2', isBold: true}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(CONCEIRGE_LHN_GBR), | ||
name: CONCEIRGE_LHN_GBR, | ||
priority: 1300, | ||
shouldShow: ({shouldUseNarrowLayout}) => !!shouldUseNarrowLayout, | ||
}, | ||
[RENAME_SAVED_SEARCH]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.saveSearchTooltip.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.saveSearchTooltip.part2', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(RENAME_SAVED_SEARCH), | ||
name: RENAME_SAVED_SEARCH, | ||
priority: 1250, | ||
shouldShow: ({shouldUseNarrowLayout}) => !shouldUseNarrowLayout, | ||
}, | ||
[GLOBAL_CREATE_TOOLTIP]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.globalCreateTooltip.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.globalCreateTooltip.part2', isBold: false}, | ||
{text: 'productTrainingTooltip.globalCreateTooltip.part3', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(GLOBAL_CREATE_TOOLTIP), | ||
name: GLOBAL_CREATE_TOOLTIP, | ||
priority: 1200, | ||
shouldShow: () => true, | ||
}, | ||
[QUICK_ACTION_BUTTON]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.quickActionButton.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.quickActionButton.part2', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(QUICK_ACTION_BUTTON), | ||
name: QUICK_ACTION_BUTTON, | ||
priority: 1150, | ||
shouldShow: () => true, | ||
}, | ||
[WORKSAPCE_CHAT_CREATE]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.workspaceChatCreate.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.workspaceChatCreate.part2', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(WORKSAPCE_CHAT_CREATE), | ||
name: WORKSAPCE_CHAT_CREATE, | ||
priority: 1100, | ||
shouldShow: () => true, | ||
}, | ||
[SEARCH_FILTER_BUTTON_TOOLTIP]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.searchFilterButtonTooltip.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.searchFilterButtonTooltip.part2', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(SEARCH_FILTER_BUTTON_TOOLTIP), | ||
name: SEARCH_FILTER_BUTTON_TOOLTIP, | ||
priority: 1000, | ||
shouldShow: () => true, | ||
}, | ||
[BOTTOM_NAV_INBOX_TOOLTIP]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.bottomNavInboxTooltip.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.bottomNavInboxTooltip.part2', isBold: false}, | ||
{text: 'productTrainingTooltip.bottomNavInboxTooltip.part3', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(BOTTOM_NAV_INBOX_TOOLTIP), | ||
name: BOTTOM_NAV_INBOX_TOOLTIP, | ||
priority: 900, | ||
shouldShow: () => true, | ||
}, | ||
[LHN_WORKSPACE_CHAT_TOOLTIP]: { | ||
content: [ | ||
{text: 'productTrainingTooltip.workspaceChatTooltip.part1', isBold: true}, | ||
{text: 'productTrainingTooltip.workspaceChatTooltip.part2', isBold: false}, | ||
{text: 'productTrainingTooltip.workspaceChatTooltip.part3', isBold: false}, | ||
], | ||
onHideTooltip: () => dismissProductTraining(LHN_WORKSPACE_CHAT_TOOLTIP), | ||
name: LHN_WORKSPACE_CHAT_TOOLTIP, | ||
priority: 800, | ||
shouldShow: () => true, | ||
}, | ||
}; | ||
|
||
export default TOOLTIPS; | ||
export type {ProductTrainingTooltipName}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)