Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Make Autofill country field into a dropdown list #9053

Closed
srirambv opened this issue May 25, 2017 · 15 comments · Fixed by #10821
Closed

Make Autofill country field into a dropdown list #9053

srirambv opened this issue May 25, 2017 · 15 comments · Fixed by #10821

Comments

@srirambv
Copy link
Collaborator

srirambv commented May 25, 2017

Test plan

#10821 (comment)


  • Did you search for similar issues before submitting this one?
    Yes

  • Describe the issue you encountered:
    Make country into a dropdown list

  • Platform (Win7, 8, 10? macOS? Linux distro?):
    All

  • Brave Version (revision SHA):
    Brave 0.15.308
    rev fc4b892
    Muon 3.0.200

  • Screenshot if needed:

screen shot 2017-05-25 at 10 28 30 am

Future enhancement: make state field also drop down. Ref here

@dfperry5
Copy link
Contributor

Hi guys,

Anyone taken a stab at this yet? Im just starting into OSS and would like to give it a shot.

Thanks!

@bsclifton bsclifton self-assigned this Jul 31, 2017
@bsclifton
Copy link
Member

bsclifton commented Jul 31, 2017

@dfperry5 nope, it's all yours! 😄

Let me know if you have any questions / need help / want someone to try out your changes 😄

@dfperry5
Copy link
Contributor

@bsclifton Awesome :) I'll get right on it - I'll be working in the airports today so no promises on anything today, but ill try to have something to share soon!

Thanks!

@bsclifton
Copy link
Member

@dfperry5 how's it going? Just wanted to check in 😄 Hope all is well

@dfperry5
Copy link
Contributor

dfperry5 commented Aug 1, 2017

@bsclifton It's going good :) Just a lot of reading through the code, etc :P Been a lot of just sitting in airports today. Also, just trying to make sure i have the process correct.

It's cool if i just cut my own branch off master, and just start committing to that? I can post the branch name here so everyone can check it out?

Thanks!

@dfperry5
Copy link
Contributor

dfperry5 commented Aug 1, 2017

So just to further clarify this issue --

The issue is when the user is enabling auto fill and filling out their address information. At that point, the input for country / region should be a dropdown?

@bsclifton
Copy link
Member

bsclifton commented Aug 1, 2017

@dfperry5 when you visit about:autofill, it currently has text fields for all values.
screen shot 2017-07-31 at 10 45 17 pm

We need to update our form to have a dropdown instead, offering a common selection of countries. I'd recommend getting it working with a few countries first to make sure you're comfortable with the solution.

Once you're ready to add them all, you can find a list here 😄
http://www.listofcountriesoftheworld.com

@bsclifton
Copy link
Member

bsclifton commented Aug 1, 2017

for a demo of how to do a dropdown using our code, navigate over to about:styles. You'll see a few live examples and the React code used to generate them.

The code for the form in the above screenshot can be found here:
https://github.com/brave/browser-laptop/blob/117d8e39e43962946532e9c154acd9b62fa00e8b/js/about/autofill.js

@dfperry5
Copy link
Contributor

dfperry5 commented Aug 1, 2017

@bsclifton awesome! I'll comment back here once I have something working (most likely tomorrow evening est time)!

Thanks for all the help!

@bsclifton
Copy link
Member

@dfperry5 perfect! You can fork Brave and start committing locally. Once you feel confident, you can submit a pull request (if you need help working with forks or git, let me know and we'll work it out 😄 )

@darkdh
Copy link
Member

darkdh commented Aug 1, 2017

@dfperry5, please set The ISO 3166 2-letter country code for the value. you can find the code here
https://www.iso.org/obp/ui/#search/code/

I remember @aekeus has the country list for add funds. Maybe he can give some input.

@dfperry5
Copy link
Contributor

dfperry5 commented Aug 2, 2017

@bsclifton I think i have it working on my local. I forked the repo here.

I was trying to commit but, but I'm failing the pre-commit hook:
"Error generating docs for file windowActions.js SyntaxError: Unexpected end of JSON input"

Any ideas?

@bsclifton
Copy link
Member

@dfperry5 ah that error... Yeah, we need to fix that (captured here)

In the meantime, you can edit package.json and just replace the part under "scripts":
"docs": "jsdox js/actions/appActions.js js/actions/windowActions.js --output docs",

with something like:
"docs": "echo docs",

That should let you add your files and commit 😄 I'd love to check it out once you have the code pushed. Thanks for digging in!

@bsclifton bsclifton reopened this Aug 2, 2017
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 2, 2017
This is the first pass at creating a dropdown for the country list in the about:autofill panel

Fix brave#9053
@dfperry5
Copy link
Contributor

dfperry5 commented Aug 2, 2017

@bsclifton I'm not sure its beautiful, but it seems to be working :)

See here.

Let me know whatcha think! Any suggestions are welcome.

@darkdh I used the 2-Letter country codes as well -- feel free to check it out :)

Thanks for all the help!

dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 3, 2017
Updated country name from Taiwain, Province of China to Taiwain

Fix brave#9053
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 17, 2017
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 17, 2017
…or country localization

	modified:   app/locale.js
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 17, 2017
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 17, 2017
…tofill.js not the autofillAddressPanel component

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   js/about/autofill.js

	modified:   js/about/autofill.js
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 18, 2017
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 18, 2017
…tofill.js not the autofillAddressPanel component

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   js/about/autofill.js

	modified:   js/about/autofill.js
bsclifton pushed a commit to dfperry5/browser-laptop that referenced this issue Aug 21, 2017
Creating a dropdown for the country list in the about:autofill panel

Fix brave#9053
@bsclifton bsclifton added this to the 0.22.x milestone Aug 21, 2017
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Aug 21, 2017
…list to just be countryCodes, and updating asssoicated references
bsclifton pushed a commit to dfperry5/browser-laptop that referenced this issue Aug 21, 2017
Creating a dropdown for the country list in the about:autofill panel

Fix brave#9053
bsclifton pushed a commit to dfperry5/browser-laptop that referenced this issue Aug 22, 2017
Creating a dropdown for the country list in the about:autofill panel

Fix brave#9053
dfperry5 added a commit to dfperry5/browser-laptop that referenced this issue Sep 4, 2017
…tries is a blank

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js
@luixxiul luixxiul modified the milestones: 0.21.x (Nightly Channel), 0.22.x Sep 6, 2017
@luixxiul
Copy link
Contributor

luixxiul commented Sep 6, 2017

I'm resetting the milestone to 0.21.x (which is still open for landing) as 0.22.x milestone was added at first by myself to #10300 without a special reason and #10821 does not conflict with other stuff which is planned for 0.22.x. If it does by any chance, please revert the milestone.

bsclifton added a commit that referenced this issue Sep 10, 2017
Issue #9053: Making country field in autofill a dropdown list instead of text input box.
syuan100 added a commit to syuan100/browser-laptop that referenced this issue Sep 10, 2017
When a user downloads a file to a location that they do not have access to, it currently just says "Downloading... 0%". This is to add a download state to indicate that the user doesn't have access to the director they are trying to download into.

Commit list:
- Add new download state
- Update state if directory is unauthorized
- Update electron download state change
- Add 'Unauthorized' download state to 'clear completed downloads' reducer
- Add isUnauthorized getter
- Add unauthorized state as part of condition for hiding progress display
- Add isUnauthorized to condition for rendering a download item
- Set unauthorized as a stop condition for downloads
- Set getL10nId for unauthorized downloads
- Add 'unauthorized' as a style class for finished download items
- Add downloadUnauthorized locale id for all languages

TODO: Update localization for all languages for this state

Fixes brave#7747

Update test

Return 0% when download totalBytes is 0 or undefined

Fix brave#10264

Updated code to handle falsey inputs + added more unit tests :)

Auditors: @diracdeltas

Test Plan:
`npm run unittest -- --grep="downloadUtil"`

Move properties inside main.less to window.less

Closes brave#10860

Auditors:

Test Plan:
1. npm run watch
2. npm start
3. Make sure the browser starts
4. Open the devtool and make sure the two properties are applied

Converted Country Textbox to Select Dropdown

Creating a dropdown for the country list in the about:autofill panel

Fix brave#9053

Small cleanup for autofill country list  per discussion in PR

Auditors: @dfperry5

Fix two issues
- handle when locale is called with null/undefined/falsey value (before would fail on toLowerCase())
- handle situation where activeTab is not set and developer tools are opened (will be fixed soon by @bbondy)

Auditors: @bbondy, @dfperry5

Issue brave#9053 - Updating so that first option on dropdown for countries is a blank

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

	modified:   app/renderer/components/autofill/autofillAddressPanel.js

Add 'CommonFormFullWidthDropdown' to commonForm.js

Auditors: @cezaraugusto

Test Plan:
1. Open about:autofill
2. Click 'Add Address'

Update autofill webdriver tests to use Country as a dropdown value instead of a text field

Auditors: @dfperry5, @darkdh, @luixxiul

Test Plan: `npm run test -- --grep="Autofill"

Style Edits
Auditors:

Test Plan:
@bbondy bbondy modified the milestones: 0.21.x (Developer Channel), 0.20.x (Beta Channel) Oct 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.