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

Sort cities by country? #96

Open
2 of 4 tasks
qrush opened this issue Feb 4, 2013 · 9 comments
Open
2 of 4 tasks

Sort cities by country? #96

qrush opened this issue Feb 4, 2013 · 9 comments
Assignees

Comments

@qrush
Copy link
Member

qrush commented Feb 4, 2013

Seems like this would be easier for organization of the sidebar.

  • Reformat _config.yml to use new data structure
  • Add countries to existing cities
  • Nest cities into countries in _layouts/default.html
  • Change generator in Rakefile for cities to include country on input and on output into _config.yml
@aquaranto
Copy link
Member

Or maybe have expandable sections for each country?

@qrush
Copy link
Member Author

qrush commented Feb 4, 2013

Sure, either works. @jameschildress what say you?

@jahio
Copy link

jahio commented Feb 4, 2013

I like the expandable sections by country option myself, but either is a good move in my opinion. So +1

@justinxreese
Copy link
Member

I don't like the sound of the expanding menu because the bulk of the cities are in the US and will therefor require an extra click.

I'd support a nested menu though. Same idea with no clicks.

@anoldguy
Copy link
Contributor

anoldguy commented Feb 4, 2013

Thoughts...

  1. Yes, that's a UX issue, and I don't know how to solve it.
  2. Ethnocentricity, man... How do we put all of the countries on an equal footing and solve the UX issue?

What would a nested menu look like? Do you have a mockup?

@justinxreese
Copy link
Member

@anoldguy Just a really simple mockup here in the comments section, because either way the actual look of this is still to be determined.

The countries are the top level sorted by number of cities inside or alphabetically.

US

  • Atlanta
  • Austin
  • Buffalo
  • Birmingham

Canada

  • Toronto
  • Windsor

China

  • Beijing

@jahio
Copy link

jahio commented Feb 4, 2013

regarding point number 2 on ethnocentricity, I personally see nothing wrong with going either by number of openhacks per country or alphabetizing by country. Either way has a logical reason behind it and therefore no need for anyone to feel that some one's not on equal footing. It's just numbers and/or letters.

@qrush
Copy link
Member Author

qrush commented Feb 6, 2013

So we can use this data structure in _config.yml:

---
countries:
 USA:
  - atlanta:
      name: Atlanta, GA
  - buffalo:
      name: Atlanta, GA
 Canada:
  - waterloo:
      name: Waterloo, ON
  - toronto:
      name: Toronto, ON

Looping through it is dumb, but works:

{% for country in site.countries %}
  {{ country.first }}

  {% for city in country.last %}
    {{ city.first.first }}
    {{ city.first.last.name }}
  {% endfor %}
{% endfor %}

@ghost ghost assigned aquaranto Feb 6, 2013
@anoldguy
Copy link
Contributor

anoldguy commented Feb 6, 2013

Looks like a good 80/20, and fixes the issue we have. If you don't tackle it, I'll try to get to it tomorrow.

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

No branches or pull requests

5 participants