Skip to content
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

[TS migration] Migrate 'TagPicker' component to TypeScript #36580

Merged
merged 29 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
32268d4
ref: move TagPicker to TS
kubabutkiewicz Feb 15, 2024
0674554
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Feb 21, 2024
e154fea
fix: missing value
kubabutkiewicz Feb 21, 2024
f4e1f1f
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Feb 21, 2024
4e01f47
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Feb 27, 2024
797d11a
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Feb 29, 2024
4e3edb2
fix: typecheck
kubabutkiewicz Feb 29, 2024
ff6f32b
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 4, 2024
77e3d04
fix: resolve comments
kubabutkiewicz Mar 4, 2024
36b6803
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 5, 2024
6aa6a28
fix: remove unnecessary field from PolicyTag type
kubabutkiewicz Mar 5, 2024
89ddddd
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 7, 2024
68c5327
fix: changed prop name to tagListName
kubabutkiewicz Mar 7, 2024
af2e187
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 8, 2024
c82c0d1
fix: changed prop name
kubabutkiewicz Mar 8, 2024
f62fef6
fix: reverted unnecessary changes
kubabutkiewicz Mar 8, 2024
954c153
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 11, 2024
4ec1840
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 12, 2024
075f940
fix: adjust descriptions
kubabutkiewicz Mar 12, 2024
576ac31
fix: adjusted tagIndex prop comment
kubabutkiewicz Mar 12, 2024
961dba6
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 12, 2024
9f3e889
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 13, 2024
f5e43db
fix: rerun pipeline
kubabutkiewicz Mar 13, 2024
c6e10e4
fix: remove log
kubabutkiewicz Mar 13, 2024
4ae787f
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 14, 2024
82a6481
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 25, 2024
8aa8001
fix: rename prop name
kubabutkiewicz Mar 26, 2024
4e4b6da
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 26, 2024
9e084c5
Merge branch 'main' of github.com:kubabutkiewicz/expensify-app into t…
kubabutkiewicz Mar 26, 2024
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
2 changes: 1 addition & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ export default {
`changed the distance to ${newDistanceToDisplay} (previously ${oldDistanceToDisplay}), which updated the amount to ${newAmountToDisplay} (previously ${oldAmountToDisplay})`,
threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${formattedAmount} ${comment ? `for ${comment}` : 'request'}`,
threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} sent${comment ? ` for ${comment}` : ''}`,
tagSelection: ({tagName}: TagSelectionParams) => `Select a ${tagName} to add additional organization to your money.`,
tagSelection: ({tagListName}: TagSelectionParams) => `Select a ${tagListName} to add additional organization to your money.`,
categorySelection: 'Select a category to add additional organization to your money.',
error: {
invalidCategoryLength: 'The length of the category chosen exceeds the maximum allowed (255). Please choose a different or shorten the category name first.',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ export default {
`cambió la distancia a ${newDistanceToDisplay} (previamente ${oldDistanceToDisplay}), lo que cambió el importe a ${newAmountToDisplay} (previamente ${oldAmountToDisplay})`,
threadRequestReportName: ({formattedAmount, comment}: ThreadRequestReportNameParams) => `${comment ? `${formattedAmount} para ${comment}` : `Solicitud de ${formattedAmount}`}`,
threadSentMoneyReportName: ({formattedAmount, comment}: ThreadSentMoneyReportNameParams) => `${formattedAmount} enviado${comment ? ` para ${comment}` : ''}`,
tagSelection: ({tagName}: TagSelectionParams) => `Seleccione una ${tagName} para organizar mejor tu dinero.`,
tagSelection: ({tagListName}: TagSelectionParams) => `Seleccione una ${tagListName} para organizar mejor tu dinero.`,
categorySelection: 'Seleccione una categoría para organizar mejor tu dinero.',
error: {
invalidCategoryLength: 'El largo de la categoría escogida excede el máximo permitido (255). Por favor, escoge otra categoría o acorta la categoría primero.',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ type UpdatedTheDistanceParams = {newDistanceToDisplay: string; oldDistanceToDisp

type FormattedMaxLengthParams = {formattedMaxLength: string};

type TagSelectionParams = {tagName: string};
type TagSelectionParams = {tagListName: string};

type WalletProgramParams = {walletProgram: string};

Expand Down
12 changes: 6 additions & 6 deletions src/pages/EditRequestTagPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const propTypes = {
policyID: PropTypes.string.isRequired,

/** The tag name to which the default tag belongs to */
kubabutkiewicz marked this conversation as resolved.
Show resolved Hide resolved
tagName: PropTypes.string,
tagListName: PropTypes.string,

/** The index of a tag list */
tagIndex: PropTypes.number.isRequired,
Expand All @@ -26,10 +26,10 @@ const propTypes = {
};

const defaultProps = {
tagName: '',
tagListName: '',
};

function EditRequestTagPage({defaultTag, policyID, tagName, tagIndex, onSubmit}) {
function EditRequestTagPage({defaultTag, policyID, tagListName, tagIndex, onSubmit}) {
const styles = useThemeStyles();
const {translate} = useLocalize();

Expand All @@ -46,13 +46,13 @@ function EditRequestTagPage({defaultTag, policyID, tagName, tagIndex, onSubmit})
{({insets}) => (
<>
<HeaderWithBackButton
title={tagName || translate('common.tag')}
title={tagListName || translate('common.tag')}
onBackButtonPress={Navigation.goBack}
/>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagName: tagName || translate('common.tag')})}</Text>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagListName: tagListName || translate('common.tag')})}</Text>
<TagPicker
selectedTag={defaultTag}
tagListName={tagName}
tagListName={tagListName}
tagIndex={tagIndex}
policyID={policyID}
shouldShowDisabledAndSelectedOption
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function IOURequestStepTag({
>
{({insets}) => (
<>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagName: policyTagListName})}</Text>
<Text style={[styles.ph5, styles.pv3]}>{translate('iou.tagSelection', {tagListName: policyTagListName})}</Text>
<TagPicker
policyID={report.policyID}
tagListName={policyTagListName}
Expand Down
Loading