-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Integrate BE for Manager McTest feature #57171
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
grgia
merged 48 commits into
Expensify:main
from
callstack-internal:integrate-be-manager-mctest
Mar 17, 2025
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
0aaf97e
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz e385396
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 4e27760
add config to pass methods to confirm and dismiss tooltips
kubabutkiewicz f9ef4d6
add local image for a test receipt, remove unnecessary things, add me…
kubabutkiewicz 82e11a4
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 964f7e4
add onDissmis method to product training context, teting changes rela…
kubabutkiewicz 3967917
fix lint problems, add creating money request with test receipt on mo…
kubabutkiewicz 5be29c7
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 905216e
fix displaying tooltips when chaning tabs
kubabutkiewicz 6113a97
add marking optimistically manager mctest transactions as paid and fi…
kubabutkiewicz 273ccfd
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 106c76a
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz a9982cf
resolve issues after self review
kubabutkiewicz bb037a4
removed unwanted change
kubabutkiewicz 9673da4
resolve comments
kubabutkiewicz f02c4bb
fixes after review
kubabutkiewicz 763bd77
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 71ee090
fix lint
kubabutkiewicz fc54f1f
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz b40ddcf
fix resolve comments
kubabutkiewicz fbbb9d3
run prettier
kubabutkiewicz 10b26a0
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz c46e28b
when using 'try it out' button move directly to confirmation screen
kubabutkiewicz db8187e
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 6c8210a
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz e9f7bf7
fix prettier and lint
kubabutkiewicz 9771ea8
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 0590958
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz cf79436
fix prettier
kubabutkiewicz 3e4d8b2
1fc71e1
fix optimistic update and styles
kubabutkiewicz 2fe06f3
added design fixes
kubabutkiewicz de5d373
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 45641f7
fix lint
kubabutkiewicz 4e5c8a0
resolve comment
kubabutkiewicz 9a61f88
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz bb30fa3
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 4d51b5d
fix failing scans
kubabutkiewicz a9a9cb7
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 4d3f07e
add optimistic amount and currency only for test receipt
kubabutkiewicz ff2bf90
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 95afcae
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 0681f9b
fix wrong report action for manager mc test expense
kubabutkiewicz 0d149e2
resolve lint errors
kubabutkiewicz dfa22ed
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 51668fb
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 1f86c13
Merge branch 'main' of github.com:callstack-internal/Expensify-App in…
kubabutkiewicz 4398d93
fix ts check
kubabutkiewicz 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,9 +2,7 @@ import React, {useState} from 'react'; | |
| // eslint-disable-next-line no-restricted-imports | ||
| import {Animated} from 'react-native'; | ||
| import PressableWithFeedback from '@components/Pressable/PressableWithFeedback'; | ||
| import {useProductTrainingContext} from '@components/ProductTrainingContext'; | ||
| import Tooltip from '@components/Tooltip'; | ||
| import EducationalTooltip from '@components/Tooltip/EducationalTooltip'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import CONST from '@src/CONST'; | ||
| import type IconAsset from '@src/types/utils/IconAsset'; | ||
|
|
@@ -37,9 +35,6 @@ type TabSelectorItemProps = { | |
|
|
||
| /** Whether to show the label when the tab is inactive */ | ||
| shouldShowLabelWhenInactive?: boolean; | ||
|
|
||
| /** Whether to show the test receipt tooltip */ | ||
| shouldShowTestReceiptTooltip?: boolean; | ||
| }; | ||
|
|
||
| function TabSelectorItem({ | ||
|
|
@@ -51,58 +46,38 @@ function TabSelectorItem({ | |
| inactiveOpacity = 1, | ||
| isActive = false, | ||
| shouldShowLabelWhenInactive = true, | ||
| shouldShowTestReceiptTooltip = false, | ||
| }: TabSelectorItemProps) { | ||
| const styles = useThemeStyles(); | ||
| const [isHovered, setIsHovered] = useState(false); | ||
| const {shouldShowProductTrainingTooltip, renderProductTrainingTooltip} = useProductTrainingContext(CONST.PRODUCT_TRAINING_TOOLTIP_NAMES.SCAN_TEST_TOOLTIP, shouldShowTestReceiptTooltip); | ||
|
|
||
| const content = () => ( | ||
| <AnimatedPressableWithFeedback | ||
| accessibilityLabel={title} | ||
| style={[styles.tabSelectorButton, styles.tabBackground(isHovered, isActive, backgroundColor), styles.userSelectNone]} | ||
| wrapperStyle={[styles.flexGrow1]} | ||
| onPress={onPress} | ||
| onHoverIn={() => setIsHovered(true)} | ||
| onHoverOut={() => setIsHovered(false)} | ||
| role={CONST.ROLE.BUTTON} | ||
| dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} | ||
| > | ||
| <TabIcon | ||
| icon={icon} | ||
| activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity} | ||
| inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity} | ||
| /> | ||
| {(shouldShowLabelWhenInactive || isActive) && ( | ||
| <TabLabel | ||
| title={title} | ||
| activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity} | ||
| inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity} | ||
| /> | ||
| )} | ||
| </AnimatedPressableWithFeedback> | ||
| ); | ||
|
|
||
| return shouldShowTestReceiptTooltip ? ( | ||
| <EducationalTooltip | ||
|
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. Why do you remove EducationalTooltip here?
Contributor
Author
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 is moved to |
||
| shouldRender={shouldShowProductTrainingTooltip} | ||
| renderTooltipContent={renderProductTrainingTooltip} | ||
| shouldHideOnNavigate | ||
| anchorAlignment={{ | ||
| horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.CENTER, | ||
| vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP, | ||
| }} | ||
| wrapperStyle={styles.productTrainingTooltipWrapper} | ||
| shiftVertical={18} | ||
| > | ||
| {content()} | ||
| </EducationalTooltip> | ||
| ) : ( | ||
| return ( | ||
| <Tooltip | ||
| shouldRender={!shouldShowLabelWhenInactive && !isActive} | ||
| text={title} | ||
| > | ||
| {content()} | ||
| <AnimatedPressableWithFeedback | ||
| accessibilityLabel={title} | ||
| style={[styles.tabSelectorButton, styles.tabBackground(isHovered, isActive, backgroundColor), styles.userSelectNone]} | ||
| wrapperStyle={[styles.flexGrow1]} | ||
| onPress={onPress} | ||
| onHoverIn={() => setIsHovered(true)} | ||
| onHoverOut={() => setIsHovered(false)} | ||
| role={CONST.ROLE.BUTTON} | ||
| dataSet={{[CONST.SELECTION_SCRAPER_HIDDEN_ELEMENT]: true}} | ||
| > | ||
| <TabIcon | ||
| icon={icon} | ||
| activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity} | ||
| inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity} | ||
| /> | ||
| {(shouldShowLabelWhenInactive || isActive) && ( | ||
| <TabLabel | ||
| title={title} | ||
| activeOpacity={styles.tabOpacity(isHovered, isActive, activeOpacity, inactiveOpacity).opacity} | ||
| inactiveOpacity={styles.tabOpacity(isHovered, isActive, inactiveOpacity, activeOpacity).opacity} | ||
| /> | ||
| )} | ||
| </AnimatedPressableWithFeedback> | ||
| </Tooltip> | ||
| ); | ||
| } | ||
|
|
||
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
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.