Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/components/TabSelector/TabSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ function TabSelector({
position,
onFocusTrapContainerElementChanged,
shouldShowLabelWhenInactive = true,
shouldShowProductTrainingTooltip = false,
renderProductTrainingTooltip,
equalWidth = false,
}: TabSelectorProps) {
const icons = useMemoizedLazyExpensifyIcons(MEMOIZED_LAZY_TAB_SELECTOR_ICONS);
Expand Down Expand Up @@ -70,8 +68,6 @@ function TabSelector({
onLongTabPress={onLongTabPress}
position={position}
shouldShowLabelWhenInactive={shouldShowLabelWhenInactive}
shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip}
renderProductTrainingTooltip={renderProductTrainingTooltip}
equalWidth={equalWidth}
/>
</ScrollableTabSelectorContextProvider>
Expand Down
4 changes: 0 additions & 4 deletions src/components/TabSelector/TabSelectorBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ function TabSelectorBase({
position,
shouldShowLabelWhenInactive = true,
equalWidth = false,
shouldShowProductTrainingTooltip = false,
renderProductTrainingTooltip,
}: TabSelectorBaseProps) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -119,8 +117,6 @@ function TabSelectorBase({
testID={tab.testID}
sentryLabel={tab.sentryLabel}
shouldShowLabelWhenInactive={shouldShowLabelWhenInactive}
shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip}
renderProductTrainingTooltip={renderProductTrainingTooltip}
equalWidth={equalWidth}
badgeText={tab.badgeText}
pendingAction={tab.pendingAction}
Expand Down
23 changes: 1 addition & 22 deletions src/components/TabSelector/TabSelectorItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ import {Animated} from 'react-native';
import Badge from '@components/Badge';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import Tooltip from '@components/Tooltip';
import EducationalTooltip from '@components/Tooltip/EducationalTooltip';
import useNetwork from '@hooks/useNetwork';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import TabIcon from './TabIcon';
import TabLabel from './TabLabel';
Expand All @@ -31,8 +29,6 @@ function TabSelectorItem({
shouldShowLabelWhenInactive = true,
testID,
sentryLabel,
shouldShowProductTrainingTooltip = false,
renderProductTrainingTooltip,
equalWidth = false,
badgeText,
isDisabled = false,
Expand All @@ -42,7 +38,6 @@ function TabSelectorItem({

const styles = useThemeStyles();
const [isHovered, setIsHovered] = useState(false);
const shouldShowEducationalTooltip = shouldShowProductTrainingTooltip && isActive;

const {onTabLayout, scrollToTab} = useTabSelectorActions();

Expand Down Expand Up @@ -100,23 +95,7 @@ function TabSelectorItem({
</AnimatedPressableWithFeedback>
);

return shouldShowEducationalTooltip ? (
<EducationalTooltip
shouldRender
renderTooltipContent={renderProductTrainingTooltip}
shouldHideOnNavigate
shouldHideOnScroll
anchorAlignment={{
horizontal: CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL.CENTER,
vertical: CONST.MODAL.ANCHOR_ORIGIN_VERTICAL.TOP,
}}
wrapperStyle={[styles.productTrainingTooltipWrapper, styles.pAbsolute]}
computeHorizontalShiftForNative
minWidth={variables.minScanTooltipWidth}
>
{children}
</EducationalTooltip>
) : (
return (
<Tooltip
shouldRender={!shouldShowLabelWhenInactive && !isActive}
text={title}
Expand Down
18 changes: 0 additions & 18 deletions src/components/TabSelector/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ type TabSelectorProps = MaterialTopTabBarProps & {

/** Whether tabs should have equal width */
equalWidth?: boolean;

/** Determines whether the product training tooltip should be displayed to the user. */
shouldShowProductTrainingTooltip?: boolean;

/** Function to render the content of the product training tooltip. */
renderProductTrainingTooltip?: () => React.JSX.Element;
};

type TabSelectorBaseItem = WithSentryLabel & {
Expand Down Expand Up @@ -76,12 +70,6 @@ type TabSelectorBaseProps = {

/** Whether tabs should have equal width. */
equalWidth?: boolean;

/** Determines whether the product training tooltip should be displayed to the user. */
shouldShowProductTrainingTooltip?: boolean;

/** Function to render the content of the product training tooltip. */
renderProductTrainingTooltip?: () => React.JSX.Element;
};

type TabSelectorItemProps = WithSentryLabel & {
Expand Down Expand Up @@ -121,12 +109,6 @@ type TabSelectorItemProps = WithSentryLabel & {
/** Whether tabs should have equal width */
equalWidth?: boolean;

/** Determines whether the product training tooltip should be displayed to the user. */
shouldShowProductTrainingTooltip?: boolean;

/** Function to render the content of the product training tooltip. */
renderProductTrainingTooltip?: () => React.JSX.Element;

/** Text to display on the badge on the tab. */
badgeText?: string;

Expand Down
12 changes: 1 addition & 11 deletions src/libs/Navigation/OnyxTabNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ type OnyxTabNavigatorProps<TTabName extends string = SelectedTabRequest> = Child
/** Whether to show the label when the tab is inactive */
shouldShowLabelWhenInactive?: boolean;

/** Determines whether the product training tooltip should be displayed to the user. */
shouldShowProductTrainingTooltip?: boolean;

/** Function to render the content of the product training tooltip. */
renderProductTrainingTooltip?: () => React.JSX.Element;

/** Whether to lazy load the tab screens */
lazyLoadEnabled?: boolean;

Expand Down Expand Up @@ -100,8 +94,6 @@ function OnyxTabNavigator<TTabName extends string = SelectedTabRequest>({
onTabSelected = () => {},
screenListeners,
shouldShowLabelWhenInactive = true,
shouldShowProductTrainingTooltip,
renderProductTrainingTooltip,
lazyLoadEnabled = false,
onTabSelect,
equalWidth = false,
Expand Down Expand Up @@ -151,14 +143,12 @@ function OnyxTabNavigator<TTabName extends string = SelectedTabRequest>({
<TabBar
onFocusTrapContainerElementChanged={onTabBarFocusTrapContainerElementChanged}
shouldShowLabelWhenInactive={shouldShowLabelWhenInactive}
shouldShowProductTrainingTooltip={shouldShowProductTrainingTooltip}
renderProductTrainingTooltip={renderProductTrainingTooltip}
equalWidth={equalWidth}
{...props}
/>
);
},
[TabBar, onTabBarFocusTrapContainerElementChanged, shouldShowLabelWhenInactive, shouldShowProductTrainingTooltip, renderProductTrainingTooltip, equalWidth],
[TabBar, onTabBarFocusTrapContainerElementChanged, shouldShowLabelWhenInactive, equalWidth],
);

// If the selected tab changes, we need to update the focus trap container element of the active tab
Expand Down
Loading