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

Hash filters by state and city #58

Open
ModelEarth opened this issue Jun 21, 2021 · 7 comments
Open

Hash filters by state and city #58

ModelEarth opened this issue Jun 21, 2021 · 7 comments

Comments

@ModelEarth
Copy link

ModelEarth commented Jun 21, 2021

Please populate the brigade filter using hash values. Examples:

https://projects.brigade.network/#state=CA&city=San_Diego

https://projects.brigade.network/#organization=Open_San_Diego

Use a hash name like "organization" rather than "brigade" so we can apply more broadly.

When the hash is changed in the URL, automatically update the list.

This update will allow us to link from the EPA impact map to the brigade project list. Thanks!

https://model.earth/apps/brigades/

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Contributor

I am attempting to extend the query parameters, e.g., https://projects.brigade.network/?topics=codeforall. I haven't had much time with it lately but the draft is #84.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Contributor

k3KAW8Pnf7mkmdSMPHz27 commented Jul 9, 2021

@ModelEarth does something like this work https://deploy-preview-84--dreamy-snyder-8339ae.netlify.app/?organization=Ann+Arbor ? (for the organization, not the city/state)

@giosce
Copy link
Collaborator

giosce commented Oct 19, 2021

@ModelEarth, please review the comment.
Not very clear to me... and what @k3KAW8Pnf7mkmdSMPHz27 has done is on UI, not sure if you would like something in back-end.

@localsite
Copy link

localsite commented Oct 19, 2021

The problem with using post (?) values instead of hash (#) values is that the entire page will have to reload when each search is submitted.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Contributor

@localsite from a pure compliance point-of-view? Right now we are loading a large json file once, and we aren't really submitting any search queries at all 😞

@ModelEarth I don't think I understand the use-case. Do you want to link people to the site, use an iframe, code reuse, or something else?

@LorenHeyns
Copy link

LorenHeyns commented Oct 20, 2021

The primary goal is to be able to copy the URL at any time and return to the currently displayed results. Using the hash (#) is how "single page apps" are created. Using the query parameter (?) required the entire page to reload and produces a slow, unpleasant browsing experience. Speed is key. Pages need to load in under 2 seconds or visitors are not retained.

@k3KAW8Pnf7mkmdSMPHz27
Copy link
Contributor

k3KAW8Pnf7mkmdSMPHz27 commented Oct 21, 2021

The primary goal is to be able to copy the URL at any time and return to the currently displayed results

Yup. We need to revise this aspect of the webpage. Right now (except for the API returning an error) you should be able to copy the URL to return to the same page at https://projects.brigade.network/projects (not /brigades). Some relevant(?) notes,

  1. We are updating the browser URL directly with JS, we are not POSTing anything
  2. Our "API" currently only serves data.json which is all the data, it doesn't accept query parameters of any kind right now.

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