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

[HOLD for @0xmiroslav payment] Make Profile > Personal Details > Address true push-to-page fields. #17548

Closed
JmillsExpensify opened this issue Apr 17, 2023 · 56 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Monthly KSv2 NewFeature Something to build that is a new item.

Comments

@JmillsExpensify
Copy link

JmillsExpensify commented Apr 17, 2023

@Beamanator @cristipaval I was in a thread with @shawnborton and he noticed that both our State and Country fields are not true push-to-page inputs. Mind helping us understand why that's the case? Ideally if we're going to allow selection of a list, we'd follow a true push-to-page pattern where the row/input has a right caret, upon which tapping that takes you to the full list on a separate page. Right? Adding a New Feature label on this one given that it's not technically a bug.

Screenshot 2023-04-17 at 17 50 04

In addition to the above, let's make sure we have 20px below each input grouping (could be just an input, or input + hint text), as @shawnborton asked here.

@JmillsExpensify JmillsExpensify added the NewFeature Something to build that is a new item. label Apr 17, 2023
@JmillsExpensify JmillsExpensify self-assigned this Apr 17, 2023
@MelvinBot
Copy link

Current assignee @JmillsExpensify is eligible for the NewFeature assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Apr 17, 2023
@JmillsExpensify
Copy link
Author

Went ahead and assigned myself so no one is assigned and we align on next steps.

@cristipaval
Copy link
Contributor

I think we refactored the parent Profile page but we missed this page.
It looks like there was an issue created for this but there was confusion here and the issue was closed. cc @Beamanator

@JmillsExpensify
Copy link
Author

Ok no worries. We can just use this issue to close the loop. Sound good?

@cristipaval
Copy link
Contributor

Sounds good to me. I can take this one and offload it to Callstack, as it is just front-end work.

@Prince-Mendiratta
Copy link
Contributor

Hi @JmillsExpensify @cristipaval! I'd like to work on this, would it be possible to make this issue external or will you be going ahead with Callstack?

@cristipaval cristipaval self-assigned this Apr 20, 2023
@gedu
Copy link
Contributor

gedu commented Apr 20, 2023

Hey hey, Edu here, I am from Callstack - expert contributor group, I can take a look at this one

@cristipaval
Copy link
Contributor

Hey @gedu! Thanks for taking this over! Push-to-page design means that the user should be redirected to a new page to select the option, instead of the system picker. Take a look at how pronouns and Timezone selectors work in the Profile page.

@gedu
Copy link
Contributor

gedu commented Apr 20, 2023

@cristipaval I'm not seeing that State has a dropdown where is that or how can I reproduce it? (I'm up to date with main)

Screen Shot 2023-04-20 at 15 55 25

@cristipaval
Copy link
Contributor

You first have to select the country, which I think isn't intuitive and also is not user-friendly to go down to the latest field, select an option, and then go back up to the State field to select an option. @JmillsExpensify @shawnborton What do you think? Shouldn't we reorder the fields to have Country before State, since the State options depend on the Country selection?

@shawnborton
Copy link
Contributor

If we do that, I think I would opt to just have country be the first input of the entire form.

@JmillsExpensify
Copy link
Author

JmillsExpensify commented Apr 21, 2023

Are we using this same page/form for business bank accounts, or only for personal details? If so, I think that might be confusing – that is, unless we default to the United States (we only support USD bank accounts).

@gedu
Copy link
Contributor

gedu commented Apr 24, 2023

For bank account is using Plaid, not sure if you can connect using another way.
If you wanna add a debit card, it uses another component and structure, so moving the Country up will be only for personal details.

@JmillsExpensify
Copy link
Author

For bank account is using Plaid, not sure if you can connect using another way.

Ah yes we start with Plaid but immediately after that verification move to an Address page. As long as this is only for personal details, I think it makes sense.

@gedu
Copy link
Contributor

gedu commented Apr 24, 2023

chatting internally for a proposal

@gedu
Copy link
Contributor

gedu commented Apr 25, 2023

Proposal

Please restate the problem we are trying to solve with this issue.
Currently, both the State and Country fields are not true push-to-page inputs. To follow a true push-to-page pattern, we need to display an item that tapping on it should take the user to the full list on a separate page.

What is the root cause of this problem?
The root cause of the problem is that we are using the Picker components for the State and Country fields.

What changes do you think we should make to solve this problem?
To solve this problem, we can make the Country and State fields look like menu items (MenuItemWithTopDescription).

We should display the State field as a menu item only when the selected country is the USA. Additionally, I would move the Country field up, before the State field. If the selected country is the USA, the State field should be another push-to-page component showing the USA states.
We should use two different UI components for the State UI - a menu item when the USA is selected, and a normal input for other countries.

When the user clicks on the Country Menu Item, they will navigate to another page using ROUTES.SETTINGS_COUNTRY. In the new page, we will use the OptionsSelector component and fill it with props.translate(‘allCountries’).
We will create another page for the USA states, ROUTES.SETTINGS_USA_STATES, and use the same OptionsSelector component filled with props.translate(‘allStates’). We can also modify the StatePicker component to apply the push-to-page pattern on the Add a Debit Card page, which also uses the same component.

To send back the selected value, we will use the navigate with concatenation method, like so:

AddressPage
Routes.navigate(${ROUTES.SETTINGS_COUNTRY}?goBackTo=${Navigation.getActiveRoute()})
CountryPage
Routes.navigate(${routes.params.goBackTo}?country=${selectedCountry})

We will handle this the same way it is handled by the CalendarPicker with YearPickerPage.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 25, 2023
@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@cristipaval
Copy link
Contributor

I like your proposal @gedu ! Go ahead with it 🚀

@cristipaval
Copy link
Contributor

FYI: I changed the description of the issue to include what @shawnborton asked here.

@gedu
Copy link
Contributor

gedu commented Apr 27, 2023

@cristipaval awesome I will check it too.

Quick question, in my proposal I wanna use MenuItemWithTopDescription but what do you think?

country_item_selector.mp4

or should I try to use another component?

@gedu
Copy link
Contributor

gedu commented Apr 28, 2023

@cristipaval Hey hey, I think I like this way, what do you think?

country_as_input_push_to_page.mp4

@cristipaval
Copy link
Contributor

Hey @gedu! Use MenuItemWithTopDescription. You could use negative margins to get everything well aligned.

@melvin-bot melvin-bot bot removed the Overdue label Aug 15, 2023
@JmillsExpensify
Copy link
Author

As in, $500 and $500?

@mountiny
Copy link
Contributor

yes

@JmillsExpensify
Copy link
Author

JmillsExpensify commented Aug 18, 2023

Ok cool. That works for me. Adding a payment summary for this issue:

  • PR review: @s77rt $250
  • PR review: @0xmiroslav $250

Upwork job is here: https://www.upwork.com/jobs/~01b61b644b462b028a and I already sent an offer to @s77rt. @0xmiroslav Will you be requesting payment via NewDot?

@s77rt
Copy link
Contributor

s77rt commented Aug 18, 2023

Should the payment here be $250 - $250? We have this regression.

@s77rt
Copy link
Contributor

s77rt commented Aug 18, 2023

Oh actually we have also another one #21049 (comment)

@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

@JmillsExpensify, @gedu, @mountiny, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!

1 similar comment
@melvin-bot
Copy link

melvin-bot bot commented Aug 21, 2023

@JmillsExpensify, @gedu, @mountiny, @0xmiroslav Whoops! This issue is 2 days overdue. Let's get this updated quick!

@mountiny
Copy link
Contributor

$250 - $250 sounds good

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 21, 2023
@mountiny
Copy link
Contributor

@JmillsExpensify bump on this one

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2023

@JmillsExpensify, @gedu, @mountiny, @0xmiroslav Eep! 4 days overdue now. Issues have feelings too...

@JmillsExpensify
Copy link
Author

Offer extended to @s77rt. @0xmiroslav I think there's still some uncertainty how you're being paid out. Please let me know how you'd like to proceed.

@melvin-bot melvin-bot bot removed the Overdue label Aug 30, 2023
@JmillsExpensify
Copy link
Author

@s77rt paid for this job. Going to add a hold for @0xmiroslav.

@JmillsExpensify JmillsExpensify changed the title [HOLD for payment 2023-08-03] Make Profile > Personal Details > Address true push-to-page fields. [HOLD for @0xmiroslav payment] Make Profile > Personal Details > Address true push-to-page fields. Aug 30, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 4, 2023
@mountiny mountiny added Monthly KSv2 and removed Daily KSv2 labels Sep 4, 2023
@melvin-bot melvin-bot bot removed the Overdue label Sep 4, 2023
@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2023

making it monthly for the payment to miroslav

@JmillsExpensify
Copy link
Author

@0xmiroslav Can we issue payment on this one yet?

@0xmiros
Copy link
Contributor

0xmiros commented Sep 26, 2023

Not yet

@JmillsExpensify
Copy link
Author

I'm going to close this because I have an unsustainable amount of GH issue assigned. Please keep track on this one your side and let us know when you are ready to receive payment. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Monthly KSv2 NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

10 participants