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

Embeddable version #13

Open
ghing opened this issue Feb 11, 2017 · 8 comments
Open

Embeddable version #13

ghing opened this issue Feb 11, 2017 · 8 comments

Comments

@ghing
Copy link

ghing commented Feb 11, 2017

I've seen a number of different versions of representative lookup tools. IMHO, the biggest missing feature is the ability to embed a version of the search form and results within a campaign (or news organization's) website allowing users to look up their reps without leaving the page with the information about why they should contact them in the first place.

Additionally, it would be great to configure which levels of representatives should be returned by the search since most campaigns reflect issues or legislation impacted at only one level of government.

@derekeder
Copy link
Member

@ghing the site has been setup to be embeddable on other sites. our prototype version does exactly that via an iframe: https://www.participatorybudgeting.org/resources-to-do-pb/myreps/

I could, like I do with my Fusion Tables Template, provide a pre-made iframe version of index.html and give some instructions on how to use it. Think that would be sufficient?

For the levels of reps, you can configure that by setting the flags in js/lookup_tool.js described in step 5. Did you try using that?

@ghing
Copy link
Author

ghing commented Feb 12, 2017

I think the use case I'm imagining is for an instance usable by multiple campaigns rather than deploying a static site for each campaign.

A pre-made iframe version of index.html and some docs would be helpful, I think.

I see that you can configure levels in js/lookup_tools.js, but it would be better to read these from URL query parameters. That way, someone could iframe in the search and just change the iframe URL to specify different levels of government.

@derekeder
Copy link
Member

Ok. I'll put together an iframe version.

Good idea on adding the levels as query parameters. I'll open it up as a separate issue.

@fgregg
Copy link
Member

fgregg commented Feb 13, 2017

@derekeder if we host an i-frame version, won't we run into API limits?

@derekeder
Copy link
Member

We've already run into API limits with Google from people using the regular myreps.datamade.us URL and are now paying Google. I'm fine with paying a bit of money for more people to look up their reps.

@fgregg
Copy link
Member

fgregg commented Feb 13, 2017 via email

@ghing
Copy link
Author

ghing commented Feb 13, 2017

Let me know if you all need any help with this.

@derekeder
Copy link
Member

I'd love help - pull request definitely welcome!

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

3 participants