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
Implement select in Regions for big countries. #2
Conversation
aljones15
commented
Feb 22, 2019
- Countries json added.
- Eslint works.
- Add a better countries json array with regions.
- Fix a small error in the vue file.
- Add a Region Selector for large countries.
- Implement select in Regions for big countries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more nit about jsdoc formatting.
Where did the country data come from? Can we include it in this module with the current bedrock license? |
These may just be issues with the example, and are things that we can add issues for to address later:
|
feature is in the doc, but @gannan08 wanted the first one to be simple on choose USA or Canada you get a Region Select.
I think that can reduced if it is a css animation a scoped class on the select should speed it up.
please keep in mind this is an internationalization feature, more USA specific features are not intended in the release. (also not all countries have 2 letter region codes). we could do a USA only selector in the future with this feature.
all the data is there on load actually and slow down is probably just css/javascript latency. the data comes from https://www.geonames.org/countries/ |
It's fine to delay fixes and features until later. Please do. I just wanted to write things down quick. The dynamic load issue is not about display speed, it's about the extra network bytes for something rarely (?) used. |
728d61b
to
7a008d5
Compare
@davidlehn on enter or space Filter will be auto-focused. are you sure you want on any key? it might create confusion and potential conflicts with other handicap accessible features in a site. space and enter are fairly well know as alternatives to click, but shift or b g etc are not. I also renamed the commit you did not like, but did you mean that jsdoc-to-markdown just has no place in this project? |
@davidlehn p.s. that flag thing is not that hard to implement: https://github.com/lipis/flag-icon-css iso code is the name of the flag as an SVG. added it to the spec. |
@gannan08 if you have time take a look. @davidlehn @dlongley if you have a moment this is now 3 days old. |
@aljones15 When we select a specific country then we can contextualize the labels. For instance, the default region label which is "State/Province/Region" should be changed to "State" when used within a US context or "Province" when used in a CA context. |
trying to find this info 252 countries so not sure on how to categorize. there are a few of them. |
@gannan08 adding country specific region names would require a lot more space in the json file and also possibly create confusion: https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country Some names: velaya'at I think the current Region, State or Province gets it across just fine. |
Let's just go with Region, State, or Province then. |
cool let me know if there are any further issues then with the PR. |
b2e05ad
to
9b384eb
Compare
Yes, few issues. The countries list is not in alphabetical order. Found Switzerland listed next to countries starting with "C". Are we not implementing the "State" and "Province" label for "USA" and "Canada" respectively?
Not yet. |
@aljones15 Do not worry about any outstanding issues on this PR. I will go ahead and resolve those issues then merge this down. |
wait a few minutes please will ping when ready. |
9b384eb
to
66ee9b1
Compare
It's more common to have a "bin" dir that has installable binaries for the package (as listed in packge.json). No rush on this, but maybe that should move to a different name. "utils" or "updater" or something. |
@gannan08 ok should be good for a rebase now. issue it turns out if that one country returned from geonames had no name or iso which meant that on search you would get errors etc. should be alphabetized now and working. |
The |
geonames is CC-BY. Need to note this in the README and probably have appropriate text in the LICENSE file. |
I actually was thinking that the actual .vue file that npm receives should not have that code in it or it's depencies. hence moved the entire project inside it. |
If by "actual .vue" file you mean the address form component, then it does not receive the contents of the |
02606f1
to
0408e13
Compare
@davidlehn @dlongley Can I get a review? |
0408e13
to
8ec7d75
Compare