-
Notifications
You must be signed in to change notification settings - Fork 3.7k
clean up existing Product training tooltips #53396
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
Merged
puneetlath
merged 36 commits into
Expensify:main
from
ishpaul777:product-training-tooltips
Dec 12, 2024
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
cc36d8f
feat: add product training tooltips and context management
ishpaul777 7c500da
feat: update product training tooltips and refactor context imports
ishpaul777 9de9bc7
feat: remove workspace tooltip from ReportScreen and ReportFooter, in…
ishpaul777 3fa81f2
tooltip for QAB
ishpaul777 cb8b8f6
remove unused import
ishpaul777 32530d1
Merge branch 'main' into product-training-tooltips
ishpaul777 ee9a380
format
ishpaul777 030070c
Merge branch 'migrated-user-welcome-modal' into product-training-tool…
ishpaul777 128411e
clean variable namings
ishpaul777 1df261f
remove unneccessary comment
ishpaul777 0122698
fix translations
ishpaul777 d1b92d3
refactor ProductTrainingContextProvider styles and dependencies
ishpaul777 7f2472f
Merge branch 'main' into product-training-tooltips
ishpaul777 163f6b0
Merge branch 'migrated-user-welcome-modal' into product-training-tool…
ishpaul777 9684fda
refactor tooltip visibility logic by removing unnecessary conditions
ishpaul777 0451ea1
depreaciate saved search ONYXKEY
ishpaul777 5fe13b3
remove unused onyx keys
ishpaul777 10b9ec4
Merge branch 'migrated-user-welcome-modal' into product-training-tool…
ishpaul777 117c0fa
Merge branch 'main' into product-training-tooltips
ishpaul777 3c2ed79
resolve conflcts
ishpaul777 903e30d
Remove unused NVP_IS_FIRST_TIME_NEW_EXPENSIFY_USER key and related logic
ishpaul777 a8c9a61
Refactor product training tooltip logic to improve registration and v…
ishpaul777 2600133
Refactor useProductTrainingContext to improve tooltip visibility logic
ishpaul777 0c573ab
Refactor ProductTrainingContext to enhance tooltip rendering and upda…
ishpaul777 dbdf43a
improve tooltip visibility conditions
ishpaul777 a3ea05c
fix typing as per review
ishpaul777 000e112
Merge branch 'main' into product-training-tooltips
ishpaul777 f7696fa
refactor: simplify shouldShow logic in PRODUCT_TRAINING_TOOLTIP_DATA
ishpaul777 0eab9dd
fix: update shouldShowEducationalTooltip logic to use ReportUtils for…
ishpaul777 f9ec91d
fix: update productTrainingTooltip translations for improved clarity …
ishpaul777 d4610b2
Merge branch 'main' into product-training-tooltips
ishpaul777 d8f9018
Refactor product training tooltips to support multi-part translations…
ishpaul777 971a11a
Refactor product training tooltip rendering and remove EducationalToo…
ishpaul777 39361a4
add api changes
ishpaul777 615e4ac
Update to include permissions check and update Spanish translations
ishpaul777 a8ab5c6
changes as per review
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: 67 additions & 0 deletions
67
src/components/ProductTrainingContext/PRODUCT_TRAINING_TOOLTIP_DATA.ts
This file contains hidden or 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,67 @@ | ||
| import type {ValueOf} from 'type-fest'; | ||
|
Contributor
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. This all caps filename seems unusual. Is that usually how we name these? |
||
| 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} = CONST.PRODUCT_TRAINING_TOOLTIP_NAMES; | ||
|
|
||
ishpaul777 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 PRODUCT_TRAINING_TOOLTIP_DATA: 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, | ||
| }, | ||
| [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: 1200, | ||
| shouldShow: () => true, | ||
| }, | ||
| [WORKSAPCE_CHAT_CREATE]: { | ||
| content: [ | ||
| {text: 'productTrainingTooltip.workspaceChatCreate.part1', isBold: false}, | ||
| {text: 'productTrainingTooltip.workspaceChatCreate.part2', isBold: true}, | ||
| {text: 'productTrainingTooltip.workspaceChatCreate.part3', isBold: false}, | ||
| ], | ||
| onHideTooltip: () => dismissProductTraining(WORKSAPCE_CHAT_CREATE), | ||
| name: WORKSAPCE_CHAT_CREATE, | ||
| priority: 1100, | ||
| shouldShow: () => true, | ||
| }, | ||
| }; | ||
|
|
||
| export default PRODUCT_TRAINING_TOOLTIP_DATA; | ||
| export type {ProductTrainingTooltipName}; | ||
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.
Uh oh!
There was an error while loading. Please reload this page.