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

Add extra categories/sub-categories #21

Open
Pjaerr opened this issue Jun 4, 2019 · 0 comments
Open

Add extra categories/sub-categories #21

Pjaerr opened this issue Jun 4, 2019 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers improvement Not important, but could be fixed if time allows.

Comments

@Pjaerr
Copy link
Owner

Pjaerr commented Jun 4, 2019

Currently there are the following categories and their sub categories (defined in /frontend/pages/index.js)

{
    name: 'Attractions',
    subCategories: [
      { displayName: 'Museums', query: 'Museums' },
      { displayName: 'Theme Parks', query: 'Theme Parks' },
      { displayName: 'Historic', query: 'Historic' },
      { displayName: 'Art', query: 'Art' },
      { displayName: 'Theatre', query: 'Theatre' },
      { displayName: 'Zoos', query: 'Zoos' }
    ]
  },
  {
    name: 'Sights',
    subCategories: [
      { displayName: 'Landmarks', query: 'Landmarks' },
      { displayName: 'Lakes', query: 'Lakes' },
      { displayName: 'Parks', query: 'Parks' },
      { displayName: 'City Views', query: 'City Views' }
    ]
  },
  {
    name: 'Social',
    subCategories: [
      { displayName: 'Nightlife', query: 'Nightlife' },
      { displayName: 'Pubs', query: 'Pubs' },
      { displayName: 'Sports', query: 'Sports' },
      { displayName: 'Community', query: 'Community' }
    ]
  },
  {
    name: 'Food',
    subCategories: [
      { displayName: 'Chinese', query: 'Chinese Food' },
      { displayName: 'American', query: 'American Food' },
      { displayName: 'German', query: 'German Food' },
      { displayName: 'Spanish', query: 'Spanish Food' },
      { displayName: 'Vietnamese', query: 'Vietnamese Food' },
      { displayName: 'Thai', query: 'Thai Food' },
      { displayName: 'Indian', query: 'Indian Food' },
      { displayName: 'Japanese', query: 'Japanese Food' }
    ]
  }
];

The categories (eg. Attractions, Sights) are searched for when the user selects Everything under the respective category and the Sub categories are given their own box to be selected. On clicking the box, it will just send the text in query to the foursquare api as a search query.

With that in mind, any category or subcategory can be added to this list and it should work as expected, provided every sub category has a corresponding image in /frontend/static/category-images matching the name of its query.

@Pjaerr Pjaerr added enhancement New feature or request good first issue Good for newcomers improvement Not important, but could be fixed if time allows. labels Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers improvement Not important, but could be fixed if time allows.
Projects
None yet
Development

No branches or pull requests

1 participant