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

feat(expensify-card): add get physical card button and routes #28453

Conversation

pac-guerreiro
Copy link
Contributor

@pac-guerreiro pac-guerreiro commented Sep 29, 2023

Details

Fixed Issues

$ #22877
PROPOSAL:

Tests

  1. Go to Settings/Wallet.
  2. (Optional)
    On Web, add this mock data in browser console:
window.Onyx.merge(`cardList`, {
   234523452345: {
       key: '234523452345',
        cardID: 234523452345,
        state: 2,
        bank: 'Expensify Card',
        availableSpend: 10000,
        domainName: 'expensify.com',
        lastFourPAN: '2345',
        isVirtual: false,
        fraud: null,
    },
});

On remaining platforms, add this useEffect on WalletPage.js:

useEffect(() => {
        if (cardList[234523452345]) {
            return;
        }
        // eslint-disable-next-line rulesdir/prefer-actions-set-data
        Onyx.merge(`cardList`, {
            234523452345: {
                key: '234523452345',
                cardID: 234523452345,
                state: 2,
                bank: 'Expensify Card',
                availableSpend: 10000,
                domainName: 'expensify.com',
                lastFourPAN: '2345',
                isVirtual: false,
                fraud: null,
            },
        });
    }, [cardList]);
  1. Click on the Expensify Card in the Assigned Cards section list.
  2. On the Expensify Card page you're currently in, press the Get Physical Card button at the bottom of the page.
  3. If you have filled your personal details before, you should be shown the confirmation page with the correct data already filled.
  4. Otherwise, you'll be shown either the legal name, phone number or address steps until you have filled every single piece of data required.
  5. When all data is filled, you can press the Ship Card button on the confirmation step to go back to the Expensify Card page.
  6. At this point, it's not possible to send the request to the API so the Expensify Card page won't show the updated state when you already requested the physical card.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

User with no personal details

  • set up a domain with the expensify card (or use expensifail.com)
  • assign a user of the domain a card
  • log into the user account on newdot
  • go to settings/wallet and click on the Expensify Card in the Assigned Cards section
  • verify button at the bottom says Get Physical Card
  • Click on the button. Verify you’re shown the legal name, phone number or address steps and fill them out until you have filled every single piece of data required.
  • When all data is filled, you can press the Ship Card button on the confirmation step to go back to the Expensify Card page.
  • Confirm that you are taken back to card page and the button reads Activate Physical Card

User with personal details

  • set up a domain with the expensify card (or use expensifail.com)
  • assign a user of the domain a card
  • log into the user account on newdot
  • go to settings/personal details and set the personal details for the user
  • go to settings/wallet and click on the Expensify Card in the Assigned Cards section
  • verify button at the bottom says Get Physical Card
  • Click on the button. Verify that you are shown the confirmation page with the correct data already filled.
  • Verify you can change all three sections without error
  • When all data is filled, you can press the Ship Card button on the confirmation step to go back to the Expensify Card page.
  • Confirm that you are taken back to card page and the button reads Activate Physical Card

QA Personal Details due to Refactor

  • Create a new account

  • Set all the personal details under settings/profile/personal-details

  • Verify that personal details are set without error.

  • Ensure that addresses in USA with the State field are saved without error as well as addresses outside of the USA.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android / native
    • Android / Chrome
    • iOS / native
    • iOS / Safari
    • MacOS / Chrome / Safari
    • MacOS / Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • If we are not using the full Onyx data that we loaded, I've added the proper selector in order to ensure the component only re-renders when the data it is using changes
      • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Legal Name Step
Screenshot 2023-10-23 at 16 05 01

Phone Number Step
Screenshot 2023-10-23 at 16 05 13

Address Step
Screenshot 2023-10-23 at 16 05 22

Confirmation Step
Screenshot 2023-10-23 at 16 05 30

Mobile Web - Chrome

Expensify Card Page
Screenshot_1698161864

Legal Name Step
Screenshot_1698161941

Phone Number Step
Screenshot_1698161945

Address Step
Screenshot_1698161949

Confirmation Step
Screenshot_1698161953

Mobile Web - Safari

Legal Name Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 29 51

Phone Number Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 29 56

Address Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 30 03

Confirmation Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 31 49

Expensify Card Page
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 28 18

Desktop

Legal Name Step
Screenshot 2023-10-23 at 16 38 31

Phone Number Step
Screenshot 2023-10-23 at 16 38 47

Address Step
Screenshot 2023-10-23 at 16 38 55

Confirmation Step
Screenshot 2023-10-23 at 16 39 05

iOS

Legal Name Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 21 20

Phone Number Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 21 25

Address Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 21 32

Confirmation Step
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 26 32

Expensify Card Page
Simulator Screenshot - iPhone 15 Plus - 2023-10-23 at 21 21 48

Android

Expensify Card Page
Screenshot_1698160098

Legal Name Step
Screenshot_1698160172

Phone Number Step
Screenshot_1698160176

Address Step
Screenshot_1698160182

Confirmation Step
Screenshot_1698160167

@pac-guerreiro
Copy link
Contributor Author

cc @grgia

@@ -817,6 +817,28 @@ export default {
availableSpend: 'Remaining spending power',
virtualCardNumber: 'Virtual card number',
physicalCardNumber: 'Physical card number',
getPhysicalCard: 'Get physical card',
},
getPhysicalCard: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grgia

Can I get this translated to Spanish, please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bump @grgia

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might have some of these already and could move them to common

App/src/languages/en.ts

Lines 1044 to 1046 in 9e35d91

legalName: 'Legal name',
legalFirstName: 'Legal first name',
legalLastName: 'Legal last name',

@@ -321,6 +321,31 @@ function answerQuestionsForWallet(answers, idNumber) {
);
}

function requestPhysicalExpensifyCard(cardID, updatedPersonalDetails) {
// TODO: confirm required parameters
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grgia

Can you tell me what parameters are missing here and confirm if the onyx data that is being sent it the correct one? Thanks

if (isConfirmation) {
// TODO: Use cardID and pass formatted formData here
Wallet.requestPhysicalExpensifyCard('', formData);
// TODO: Redirect user to the domain card page (?)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grgia

Should the user be redirected to the domain card page on submission?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's return to the card page.

src/pages/settings/Wallet/Cards/BaseGetPhysicalCard.js Outdated Show resolved Hide resolved
@@ -255,6 +256,39 @@ function setIsNavigationReady() {
resolveNavigationIsReadyPromise();
}

/**
* @param {Array<String>} loginList
* @returns {String} phone number, if there is one
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it can be undefined should we have a union here to account for that?

src/ROUTES.ts Outdated
route: 'settings/profile/contact-methods/:contactMethod/details',
getRoute: (contactMethod: string) => `settings/profile/contact-methods/${encodeURIComponent(contactMethod)}/details`,
},
SETTINGS_CONTACT_METHOD_DETAILS: { route: 'settings/profile/contact-methods/:contactMethod/details', getRoute: (contactMethod: string) => `settings/profile/contact-methods/${encodeURIComponent(contactMethod)}/details` },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant update

Copy link
Contributor

@grgia grgia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Answered questions.

Please let me know if there's specific parts you need reviewed. It's unclear when the PR is a WIP :)

src/pages/settings/Wallet/Cards/BaseGetPhysicalCard.js Outdated Show resolved Hide resolved
if (isConfirmation) {
// TODO: Use cardID and pass formatted formData here
Wallet.requestPhysicalExpensifyCard('', formData);
// TODO: Redirect user to the domain card page (?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's return to the card page.

@grgia grgia requested a review from sobitneupane September 29, 2023 11:26
@grgia
Copy link
Contributor

grgia commented Sep 29, 2023

assigning @sobitneupane for C+ review

@pac-guerreiro
Copy link
Contributor Author

Answered questions.

Please let me know if there's specific parts you need reviewed. It's unclear when the PR is a WIP :)

Sorry @grgia, how can I make it clear for you? 😄

@pac-guerreiro pac-guerreiro force-pushed the feature/add-get-physical-card-button-and-necessary-routes branch 2 times, most recently from c040fa4 to 8501763 Compare October 12, 2023 13:41
@pac-guerreiro
Copy link
Contributor Author

@grgia @joekaufmanexpensify I require these translated to spanish:

  • header: 'Get physical card',
  • nameMessage: 'Enter your first and last name, as this will be shown on your card.',
  • legalName: 'Legal name',
  • firstName: 'Legal first name',
  • lastName: 'Legal last name',
  • phoneMessage: 'Enter your phone number.',
  • phoneNumber: 'Phone number',
  • address: 'Address',
  • addressMessage: 'Enter your shipping address.',
  • streetAddress: 'Street Address',
  • city: 'City',
  • state: 'State',
  • zipPostcode: 'Zip/Postcode',
  • country: 'Country',
  • confirmMessage: 'Please confirm your details below.',
  • estimatedDeliveryMessage: 'Your physical card will arrive in 2-3 business days.',
  • next: 'Next',
  • getPhysicalCard: 'Get physical card',
  • shipCard: 'Ship card',`

@pac-guerreiro pac-guerreiro marked this pull request as ready for review October 12, 2023 16:54
@pac-guerreiro pac-guerreiro requested a review from a team as a code owner October 12, 2023 16:54
@melvin-bot melvin-bot bot requested review from grgia and removed request for a team October 12, 2023 16:54
@melvin-bot
Copy link

melvin-bot bot commented Oct 12, 2023

@grgia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@joekaufmanexpensify
Copy link
Contributor

@pac-guerreiro I've requested translation assistance for these internally, and will LYK when I hear back.

@joekaufmanexpensify
Copy link
Contributor

@pac-guerreiro I was advised that a good number of these translations already exist in the app. Mind looking into that first, and let me know which ones you aren't able to find?

@sobitneupane
Copy link
Contributor

I won't be available next week. If any action is required from my end, please feel free to reassign the issue.

@pac-guerreiro pac-guerreiro force-pushed the feature/add-get-physical-card-button-and-necessary-routes branch 3 times, most recently from f9493f9 to 3fa9a25 Compare October 17, 2023 19:55
@@ -891,6 +892,28 @@ export default {
thatDidntMatch: 'Los 4 últimos dígitos de tu tarjeta no coinciden. Por favor, inténtalo de nuevo.',
},
},
// TODO: add translation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joekaufmanexpensify I am still missing some spanish translations that I could not find in the codebase. Could you get them for me, please? 😄

legalFirstName,
legalLastName,
phoneNumber,
addressCity: city,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grgia I followed the specifications but I'm thinking that the country and state is missing here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 agree, I think we need these. Here are the complete params the API expects

authToken,
legalFirstName,
legalLastName,
phoneNumber,
addressCity,
addressStreet,
addressZip,
addressCountry,
addressState

@grgia
Copy link
Contributor

grgia commented Oct 17, 2023

cc @marcaaron if you have the bandwidth to take a look at this one as well

Copy link
Contributor

@marcaaron marcaaron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great refactoring and nice work so far. Just leaving some initial comments to get us started. Thanks for the work on this!

src/ROUTES.ts Outdated Show resolved Hide resolved
street1: PropTypes.string,
street2: PropTypes.string,
submitButtonText: PropTypes.string,
zip: PropTypes.string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These please all need some comments above them like we have in other parts of the app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pac-guerreiro could you address this comment

@@ -817,6 +817,28 @@ export default {
availableSpend: 'Remaining spending power',
virtualCardNumber: 'Virtual card number',
physicalCardNumber: 'Physical card number',
getPhysicalCard: 'Get physical card',
},
getPhysicalCard: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might have some of these already and could move them to common

App/src/languages/en.ts

Lines 1044 to 1046 in 9e35d91

legalName: 'Legal name',
legalFirstName: 'Legal first name',
legalLastName: 'Legal last name',

function goToNextPhysicalCardRoute(privatePersonalDetails, loginList) {
const {address, legalFirstName, legalLastName, phoneNumber} = privatePersonalDetails;
const currentRoute = navigationRef.current && navigationRef.current.getCurrentRoute();
const {domain} = (currentRoute && currentRoute.params) || {domain: ''};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there can be a fallback to an empty string for domain should we handle it somehow?

Seems like it would be unexpected if that happened based on the fact that we use it to navigate below.

src/libs/UserUtils.ts Outdated Show resolved Hide resolved
legalFirstName,
legalLastName,
phoneNumber,
addressCity: city,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 agree, I think we need these. Here are the complete params the API expects

authToken,
legalFirstName,
legalLastName,
phoneNumber,
addressCity,
addressStreet,
addressZip,
addressCountry,
addressState

{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.PRIVATE_PERSONAL_DETAILS,
value: params,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if these params can be dropped here as is...

Especially the address you can see here it has this format:

type Address = {
street: string;
city: string;
state: string;
zip: string;
country: string;
};
type PrivatePersonalDetails = {
legalFirstName?: string;
legalLastName?: string;
dob?: string;
/** User's home address */
address?: Address;
};

So what we are storing might be different than what we send to the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcaaron That Address type does not match what we're storing on Onyx right now, as you can see below:

Screenshot 2023-10-18 at 10 28 27

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides that, you're right, I need to send the data directly without mapping it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnborton The designs for the confirmation page don't have a fixed size applied to the items of the list, as you can see below:
Screenshot 2023-10-18 at 12 02 32

Should these items size match the existing ones on the app? And if so, could you update the designs, please?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pac-guerreiro those should just be existing components in the design system called "push-to-page" rows. They might be called something like MenuOption in the code? cc @grgia for help there

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But you should be able to reuse existing code for these and not need to worry about building something new.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnborton thanks for the response! I'm already reusing the right component for this but I was applying the styles from Figma, so I removed these styles and tweaked the whole layout to work correctly 😄

This is the current state:

Screenshot 2023-10-18 at 12 56 26

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet, that feels pretty good to me!

@pac-guerreiro pac-guerreiro force-pushed the feature/add-get-physical-card-button-and-necessary-routes branch 2 times, most recently from b27e41b to e3df320 Compare October 18, 2023 12:02
@pac-guerreiro
Copy link
Contributor Author

Screen.Recording.2023-10-18.at.14.52.43.mov

@grgia @shawnborton This is the current state of the flow!

I have two questions:

  • Should there be some visual feedback to the user like an alert saying that the physical card was requested?
  • When a user edits any form field like legal name, during the flow, should these changes be merged automatically to privatePersonalDetails in Onyx, or should these be stored locally first and then submitted when the "Ship Card" button?

@shawnborton
Copy link
Contributor

Feels pretty good to me!

@pac-guerreiro
Copy link
Contributor Author

@grgia @allroundexperts @dylanexpensify

All reported issues should be fixed now!

I added logic to handle these edge cases:

  • When the specified domain has no cards, the user is redirected to the wallet page;
  • When the physical card does not exist on the specified domain, or if does exist but it doesn't have the required state for the flow, then the user is redirected to the card page of the specified domain;

Also, I noticed that while on the not found state of the card page if the user presses the back button then the RHP is closed. So I changed this behaviour to redirect the user to the wallet page instead.

@grgia
Copy link
Contributor

grgia commented Nov 20, 2023

@allroundexperts bump

@allroundexperts
Copy link
Contributor

Getting the following behaviour now @grgia. Notice the end of the video:

Screen.Recording.2023-11-20.at.7.40.25.PM.mov

Also, the back button is still behaving weirdly:

Screen.Recording.2023-11-20.at.7.41.41.PM.mov

@allroundexperts
Copy link
Contributor

@grgia At this point, I really feel like we should merge this and fix the issues in a follow up PR. Let me know if you'd agree.

@grgia
Copy link
Contributor

grgia commented Nov 20, 2023

@allroundexperts I agree, if no bugs are blocking we can handle in a follow up. As you finish checklist and QA steps, can you please catalogue the non-blocking bugs so I can create issues

Comment on lines +307 to +308
// eslint-disable-next-line es/no-nullish-coalescing-operators
inputValues[inputID] = defaultValue ?? '';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this being changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this change because it's more simpler and does the same thing as before.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's correct. For example, previously, if defaultValue was false, inputValues[inputID] would be false as well. With your changes, it would be ''.

Copy link
Contributor

@grgia grgia Nov 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pac-guerreiro @allroundexperts Shall we revert this line to avoid breaking other forms?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

although @allroundexperts is this the case you were referring to?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, actually, its the same. My bad. False alarm 🔕

@allroundexperts
Copy link
Contributor

Checklist is complete @grgia. Just need an answer on one question I raised during the code review. Will approve after that.

@pac-guerreiro
Copy link
Contributor Author

@allroundexperts question answered

@allroundexperts
Copy link
Contributor

@allroundexperts question answered

Replied. Please take a look.

Copy link
Contributor

@allroundexperts allroundexperts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@melvin-bot melvin-bot bot requested a review from grgia November 20, 2023 16:15
@allroundexperts
Copy link
Contributor

Outstanding issues: #28453 (comment) cc @grgia

@grgia grgia merged commit cc2f150 into Expensify:main Nov 20, 2023
22 checks passed
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/grgia in version: 1.4.2-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Comment on lines +86 to +96
// There are situations where a route already exists on the current navigation stack
// But we want to push the same route instead of going back in the stack
// Which would break the user navigation history
if (type === CONST.NAVIGATION.ACTION_TYPE.PUSH) {
minimalAction.type = CONST.NAVIGATION.ACTION_TYPE.PUSH;
}
// There are situations when the user is trying to access a route which he has no access to
// So we want to redirect him to the right one and replace the one he tried to access
if (type === CONST.NAVIGATION.ACTION_TYPE.REPLACE) {
minimalAction.type = CONST.NAVIGATION.ACTION_TYPE.REPLACE;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This caused regression - #31688
What issue this code part is trying to fix? Is it more critical than #31688?

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.2-3 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

const domainCards = CardUtils.getDomainCards(cardList)[domain];
const virtualCard = _.find(domainCards, (card) => card.isVirtual) || {};
const cardID = virtualCard.cardID;
Wallet.requestPhysicalExpensifyCard(cardID, authToken, updatedPrivatePersonalDetails);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were passing the virtual card ID here causing #35094, so we updated this to use the physical card ID in #35303

@@ -250,7 +250,7 @@ function BaseTextInput(props) {
return (
<>
<View
style={styles.pointerEventsNone}
style={[styles.pointerEventsNone, ...props.containerStyles]}
Copy link
Contributor

@Pujan92 Pujan92 May 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved containerStyles to main View wrapper caused an issue #40519, bcoz containerStyles has max height restriction which is specifically required only for TextInput. Due to this change the error message overflows and overlaps with the bottom content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.