Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3931658
Mask LHN list item previews
fabioh8010 Aug 14, 2025
ae68c8e
Implement ForwardedFSClassProps type
fabioh8010 Aug 14, 2025
4c6ef04
Unmask all modals by default
fabioh8010 Aug 14, 2025
d9b91c6
Remove default masking of screen wrapper
fabioh8010 Aug 14, 2025
eca5fc2
Mask Search modal result alternate texts
fabioh8010 Aug 14, 2025
c6b0ff1
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Aug 22, 2025
d0134cb
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Aug 25, 2025
a072976
Mask Task titles
fabioh8010 Aug 25, 2025
d74ca54
Mask chat/task list items in search
fabioh8010 Aug 26, 2025
80f0824
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Aug 27, 2025
ee93767
Mask all Text Inputs by default
fabioh8010 Aug 27, 2025
470530e
Unmask Search text input
fabioh8010 Aug 27, 2025
d5e9850
Handle masking of money request report preview and transaction items
fabioh8010 Aug 28, 2025
2f2ce11
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Aug 29, 2025
221c0eb
Mask magic code input
fabioh8010 Sep 1, 2025
25fd2da
Mask payment card and bank details data/flows
fabioh8010 Sep 1, 2025
5b7b76b
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Sep 1, 2025
de0e760
Refactor fsClass usages and design better way to use in the project
fabioh8010 Sep 1, 2025
aa0b4ea
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Sep 1, 2025
bff53a6
Fix Prettier
fabioh8010 Sep 1, 2025
d8891c6
Improve docs
fabioh8010 Sep 1, 2025
f62a2ce
Fix lint
fabioh8010 Sep 1, 2025
02b5860
Fix lint
fabioh8010 Sep 2, 2025
5b1be46
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Sep 2, 2025
8df2a72
Minor fix to search input unmasking
fabioh8010 Sep 2, 2025
cbfb461
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Sep 4, 2025
49ca7a9
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Sep 5, 2025
413fee6
Refactor fsClass usages to forwardedFSClass prop
fabioh8010 Sep 5, 2025
dc71048
Minor fix to InputWrapper
fabioh8010 Sep 5, 2025
ecd74f1
Merge remote-tracking branch 'origin/main' into feature/fullstory-imp…
fabioh8010 Sep 5, 2025
25723ce
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Sep 8, 2025
42b1dde
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Sep 10, 2025
bc37702
Merge branch 'main' into feature/fullstory-improvements-2
fabioh8010 Sep 11, 2025
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
13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,19 @@ module.exports = {
'react/prop-types': 'off',
'react/jsx-key': 'error',
'react/jsx-no-constructed-context-values': 'error',
'react/forbid-component-props': [
'error',
{
forbid: [
{
propName: 'fsClass',
allowedFor: ['View', 'Animated.View', 'Text', 'Pressable'],
message:
"The 'fsClass' prop doesn't work for custom components, only RN's View, Text and Pressable.\nPlease use the 'ForwardedFSClassProps' or 'MultipleFSClassProps' types to pass down the desired 'fsClass' value to the allowed components.",
},
],
},
],
'react-native-a11y/has-valid-accessibility-descriptors': [
'error',
{
Expand Down
1 change: 1 addition & 0 deletions src/components/AddPaymentCard/PaymentCardForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ function PaymentCardForm({
submitButtonText={submitButtonText}
scrollContextEnabled
style={[styles.mh5, styles.flexGrow1]}
forwardedFSClass={CONST.FULLSTORY.CLASS.MASK}
>
<InputWrapper
InputComponent={TextInput}
Expand Down
7 changes: 4 additions & 3 deletions src/components/DisplayNames/DisplayNamesTooltipItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import type {Text as RNText, StyleProp, TextStyle} from 'react-native';
import Text from '@components/Text';
import UserDetailsTooltip from '@components/UserDetailsTooltip';
import useThemeStyles from '@hooks/useThemeStyles';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import type {AvatarSource} from '@libs/UserUtils';

type DisplayNamesTooltipItemProps = {
type DisplayNamesTooltipItemProps = ForwardedFSClassProps & {
index?: number;

/** The function to get a distance to shift the tooltip horizontally */
Expand Down Expand Up @@ -41,6 +42,7 @@ function DisplayNamesTooltipItem({
displayName = '',
textStyles = [],
childRefs = {current: []},
forwardedFSClass,
}: DisplayNamesTooltipItemProps) {
const styles = useThemeStyles();
const tooltipIndexBridge = useCallback(() => getTooltipShiftX(index), [getTooltipShiftX, index]);
Expand All @@ -58,8 +60,6 @@ function DisplayNamesTooltipItem({
>
{/* We need to get the refs to all the names which will be used to correct the horizontal position of the tooltip */}
<Text
eslint-disable-next-line
no-param-reassign
ref={(el) => {
if (!childRefs.current?.at(index) || !el) {
return;
Expand All @@ -68,6 +68,7 @@ function DisplayNamesTooltipItem({
childRefs.current[index] = el;
}}
style={[textStyles, styles.pre]}
fsClass={forwardedFSClass}
>
{displayName}
</Text>
Expand Down
3 changes: 3 additions & 0 deletions src/components/DisplayNames/DisplayNamesWithTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function DisplayNamesWithToolTip({
textStyles = [],
numberOfLines = 1,
renderAdditionalText,
forwardedFSClass,
}: DisplayNamesProps) {
const styles = useThemeStyles();
const containerRef = useRef<HTMLElementWithText>(null);
Expand Down Expand Up @@ -63,6 +64,7 @@ function DisplayNamesWithToolTip({
numberOfLines={numberOfLines || undefined}
ref={containerRef}
testID={DisplayNamesWithToolTip.displayName}
fsClass={forwardedFSClass}
>
{shouldUseFullTitle
? formatReportLastMessageText(fullTitle)
Expand All @@ -78,6 +80,7 @@ function DisplayNamesWithToolTip({
avatar={avatar}
textStyles={textStyles}
childRefs={childRefs}
forwardedFSClass={forwardedFSClass}
/>
{index < displayNamesWithTooltips.length - 1 && <Text style={textStyles}>,&nbsp;</Text>}
{shouldAddEllipsis && index === displayNamesWithTooltips.length - 1 && <Text style={textStyles}>...</Text>}
Expand Down
6 changes: 4 additions & 2 deletions src/components/DisplayNames/DisplayNamesWithoutTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import React from 'react';
import type {StyleProp, TextStyle} from 'react-native';
import Text from '@components/Text';
import useThemeStyles from '@hooks/useThemeStyles';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';

type DisplayNamesWithoutTooltipProps = {
type DisplayNamesWithoutTooltipProps = ForwardedFSClassProps & {
/** The full title of the DisplayNames component (not split up) */
fullTitle?: string;

Expand All @@ -17,12 +18,13 @@ type DisplayNamesWithoutTooltipProps = {
renderAdditionalText?: () => React.ReactNode;
};

function DisplayNamesWithoutTooltip({textStyles = [], numberOfLines = 1, fullTitle = '', renderAdditionalText}: DisplayNamesWithoutTooltipProps) {
function DisplayNamesWithoutTooltip({textStyles = [], numberOfLines = 1, fullTitle = '', renderAdditionalText, forwardedFSClass}: DisplayNamesWithoutTooltipProps) {
const styles = useThemeStyles();
return (
<Text
style={[textStyles, numberOfLines === 1 ? styles.pre : styles.preWrap]}
numberOfLines={numberOfLines}
fsClass={forwardedFSClass}
>
{fullTitle}
{renderAdditionalText?.()}
Expand Down
3 changes: 2 additions & 1 deletion src/components/DisplayNames/index.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TextWithEmojiFragment from '@pages/home/report/comment/TextWithEmojiFragm
import type DisplayNamesProps from './types';

// As we don't have to show tooltips of the Native platform so we simply render the full display names list.
function DisplayNames({accessibilityLabel, fullTitle, textStyles = [], numberOfLines = 1, renderAdditionalText}: DisplayNamesProps) {
function DisplayNames({accessibilityLabel, fullTitle, textStyles = [], numberOfLines = 1, renderAdditionalText, forwardedFSClass}: DisplayNamesProps) {
const {translate} = useLocalize();
const titleContainsTextAndCustomEmoji = useMemo(() => containsCustomEmoji(fullTitle) && !containsOnlyCustomEmoji(fullTitle), [fullTitle]);
return (
Expand All @@ -17,6 +17,7 @@ function DisplayNames({accessibilityLabel, fullTitle, textStyles = [], numberOfL
style={textStyles}
numberOfLines={numberOfLines}
testID={DisplayNames.displayName}
fsClass={forwardedFSClass}
>
{titleContainsTextAndCustomEmoji ? (
<TextWithEmojiFragment
Expand Down
15 changes: 14 additions & 1 deletion src/components/DisplayNames/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,17 @@ import DisplayNamesWithoutTooltip from './DisplayNamesWithoutTooltip';
import DisplayNamesWithToolTip from './DisplayNamesWithTooltip';
import type DisplayNamesProps from './types';

function DisplayNames({fullTitle, tooltipEnabled, textStyles, numberOfLines, shouldAddEllipsis, shouldUseFullTitle, displayNamesWithTooltips, renderAdditionalText}: DisplayNamesProps) {
function DisplayNames({
fullTitle,
tooltipEnabled,
textStyles,
numberOfLines,
shouldAddEllipsis,
shouldUseFullTitle,
displayNamesWithTooltips,
renderAdditionalText,
forwardedFSClass,
}: DisplayNamesProps) {
const {translate} = useLocalize();
const title = StringUtils.lineBreaksToSpaces(Parser.htmlToText(fullTitle)) || translate('common.hidden');

Expand All @@ -17,6 +27,7 @@ function DisplayNames({fullTitle, tooltipEnabled, textStyles, numberOfLines, sho
numberOfLines={numberOfLines}
fullTitle={title}
renderAdditionalText={renderAdditionalText}
forwardedFSClass={forwardedFSClass}
/>
);
}
Expand All @@ -29,6 +40,7 @@ function DisplayNames({fullTitle, tooltipEnabled, textStyles, numberOfLines, sho
textStyles={textStyles}
numberOfLines={numberOfLines}
renderAdditionalText={renderAdditionalText}
forwardedFSClass={forwardedFSClass}
/>
);
}
Expand All @@ -41,6 +53,7 @@ function DisplayNames({fullTitle, tooltipEnabled, textStyles, numberOfLines, sho
shouldAddEllipsis={shouldAddEllipsis}
numberOfLines={numberOfLines}
renderAdditionalText={renderAdditionalText}
forwardedFSClass={forwardedFSClass}
/>
);
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/DisplayNames/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type {StyleProp, TextStyle} from 'react-native';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import type {AvatarSource} from '@libs/UserUtils';

type DisplayNameWithTooltip = {
Expand All @@ -15,7 +16,7 @@ type DisplayNameWithTooltip = {
avatar?: AvatarSource;
};

type DisplayNamesProps = {
type DisplayNamesProps = ForwardedFSClassProps & {
/** The full title of the DisplayNames component (not split up) */
fullTitle: string;

Expand Down
2 changes: 2 additions & 0 deletions src/components/FeatureTrainingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ function FeatureTrainingModal({
ref={shouldUseScrollView ? scrollViewRef : undefined}
onLayout={shouldUseScrollView ? (e: LayoutChangeEvent) => setContainerHeight(e.nativeEvent.layout.height) : undefined}
onContentSizeChange={shouldUseScrollView ? (_w: number, h: number) => setContentHeight(h) : undefined}
// Wrapper is either a View or ScrollView, which is also a View.
// eslint-disable-next-line react/forbid-component-props
fsClass={CONST.FULLSTORY.CLASS.UNMASK}
>
<View style={[onboardingIsMediumOrLargerScreenWidth ? {padding: MODAL_PADDING} : {paddingHorizontal: MODAL_PADDING}, illustrationOuterContainerStyle]}>
Expand Down
6 changes: 5 additions & 1 deletion src/components/Form/FormWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ function FormWrapper({
shouldSubmitButtonBlendOpacity = false,
shouldPreventDefaultFocusOnPressSubmit = false,
onScroll = () => {},
forwardedFSClass,
}: FormWrapperProps) {
const styles = useThemeStyles();
const formRef = useRef<RNScrollView>(null);
Expand Down Expand Up @@ -255,7 +256,10 @@ function FormWrapper({
}

return (
<View style={styles.flex1}>
<View
style={styles.flex1}
fsClass={forwardedFSClass}
>
{scrollContextEnabled ? (
<ScrollViewWithContext
style={[styles.w100, styles.flex1]}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Form/InputWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type RoomNameInputProps from '@components/RoomNameInput/types';
import TextInput from '@components/TextInput';
import type {BaseTextInputProps} from '@components/TextInput/BaseTextInput/types';
import {canUseTouchScreen} from '@libs/DeviceCapabilities';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import FormContext from './FormContext';
import type {InputComponentBaseProps, InputComponentValueProps, ValidInputs, ValueTypeKey} from './types';

Expand Down Expand Up @@ -59,7 +60,8 @@ function computeComponentSpecificRegistrationParams({
}

type InputWrapperProps<TInput extends ValidInputs, TValue extends ValueTypeKey = ValueTypeKey> = ComponentPropsWithoutRef<TInput> &
InputComponentValueProps<TValue> & {
InputComponentValueProps<TValue> &
ForwardedFSClassProps & {
InputComponent: TInput;
inputID: string;
isFocused?: boolean;
Expand Down
4 changes: 3 additions & 1 deletion src/components/Form/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import type TextPicker from '@components/TextPicker';
import type TimeModalPicker from '@components/TimeModalPicker';
import type UploadFile from '@components/UploadFile';
import type ValuePicker from '@components/ValuePicker';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import type ConstantSelector from '@pages/Debug/ConstantSelector';
import type {FileObject} from '@pages/media/AttachmentModalScreen/types';
import type OnboardingCurrencyPicker from '@pages/OnboardingWorkspaceConfirmation/OnboardingCurrencyPicker';
Expand Down Expand Up @@ -128,7 +129,7 @@ type InputComponentBaseProps<TValue extends ValueTypeKey = ValueTypeKey> = Input
type FormOnyxValues<TFormID extends OnyxFormKey = OnyxFormKey> = Omit<OnyxValues[TFormID], keyof BaseForm>;
type FormOnyxKeys<TFormID extends OnyxFormKey = OnyxFormKey> = keyof FormOnyxValues<TFormID>;

type FormProps<TFormID extends OnyxFormKey = OnyxFormKey> = {
type FormProps<TFormID extends OnyxFormKey = OnyxFormKey> = ForwardedFSClassProps & {
/** A unique Onyx key identifying the form */
formID: TFormID;

Expand Down Expand Up @@ -173,6 +174,7 @@ type FormProps<TFormID extends OnyxFormKey = OnyxFormKey> = {

/** Render extra button above submit button */
shouldRenderFooterAboveSubmit?: boolean;

/**
* Determines whether the form should automatically scroll to the end upon rendering or when the value changes.
* If `true`, the form will smoothly scroll to the bottom after interactions have completed.
Expand Down
6 changes: 5 additions & 1 deletion src/components/LHNOptionsList/OptionRowLHN.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ function OptionRowLHN({
style={alternateTextStyle}
numberOfLines={1}
accessibilityLabel={translate('accessibilityHints.lastChatMessagePreview')}
fsClass={CONST.FULLSTORY.CLASS.MASK}
>
{alternateTextContainsCustomEmojiWithText ? (
<TextWithEmojiFragment
Expand All @@ -324,7 +325,10 @@ function OptionRowLHN({
)}
</View>
{optionItem?.descriptiveText ? (
<View style={[styles.flexWrap]}>
<View
style={[styles.flexWrap]}
fsClass={CONST.FULLSTORY.CLASS.MASK}
>
<Text style={[styles.textLabel]}>{optionItem.descriptiveText}</Text>
</View>
) : null}
Expand Down
5 changes: 4 additions & 1 deletion src/components/MagicCodeInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,10 @@ function MagicCodeInput(

return (
<>
<View style={[styles.magicCodeInputContainer]}>
<View
style={[styles.magicCodeInputContainer]}
fsClass={CONST.FULLSTORY.CLASS.MASK}
>
<GestureDetector gesture={tapGesture}>
{/* Android does not handle touch on invisible Views so I created a wrapper around invisible TextInput just to handle taps */}
<View
Expand Down
2 changes: 2 additions & 0 deletions src/components/Modal/BaseModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ function BaseModal(
shouldUseReanimatedModal = false,
shouldDisableBottomSafeAreaPadding = false,
shouldIgnoreBackHandlerDuringTransition = false,
forwardedFSClass = CONST.FULLSTORY.CLASS.UNMASK,
}: BaseModalProps,
ref: React.ForwardedRef<View>,
) {
Expand Down Expand Up @@ -475,6 +476,7 @@ function BaseModal(
onLayout={onViewLayout}
style={[styles.defaultModalContainer, modalContainerStyle, modalPaddingStyles, !isVisible && styles.pointerEventsNone, sidePanelAnimatedStyle]}
ref={ref}
fsClass={forwardedFSClass}
>
<ColorSchemeWrapper>{children}</ColorSchemeWrapper>
</Animated.View>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Modal/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {FocusTrapProps} from 'focus-trap-react';
import type {GestureResponderEvent, PanResponderGestureState, ViewStyle} from 'react-native';
import type {Direction, ModalProps as ReactNativeModalProps} from 'react-native-modal';
import type {ValueOf} from 'type-fest';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import type CONST from '@src/CONST';
import type ReanimatedModalProps from './ReanimatedModal/types';

Expand All @@ -19,7 +20,8 @@ type WindowState = {
};

type BaseModalProps = Partial<ReactNativeModalProps> &
Partial<ReanimatedModalProps> & {
Partial<ReanimatedModalProps> &
ForwardedFSClassProps & {
/** Decides whether the modal should cover fullscreen. FullScreen modal has backdrop */
fullscreen?: boolean;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import ControlSelection from '@libs/ControlSelection';
import canUseTouchScreen from '@libs/DeviceCapabilities/canUseTouchScreen';
import type {ForwardedFSClassProps} from '@libs/Fullstory/types';
import {getTransactionPendingAction, isTransactionPendingDelete} from '@libs/TransactionUtils';
import variables from '@styles/variables';
import CONST from '@src/CONST';
import type {Report, TransactionViolation} from '@src/types/onyx';
import type {TransactionWithOptionalHighlight} from './MoneyRequestReportTransactionList';

type MoneyRequestReportTransactionItemProps = {
type MoneyRequestReportTransactionItemProps = ForwardedFSClassProps & {
/** The transaction that is being displayed */
transaction: TransactionWithOptionalHighlight;

Expand Down Expand Up @@ -76,6 +77,7 @@ function MoneyRequestReportTransactionItem({
amountColumnSize,
taxAmountColumnSize,
scrollToNewTransaction,
forwardedFSClass,
}: MoneyRequestReportTransactionItemProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
Expand Down Expand Up @@ -131,6 +133,7 @@ function MoneyRequestReportTransactionItem({
disabled={isTransactionPendingDelete(transaction)}
ref={viewRef}
wrapperStyle={[animatedHighlightStyle, styles.userSelectNone]}
forwardedFSClass={forwardedFSClass}
>
<TransactionItemRow
transactionItem={transaction}
Expand Down
Loading