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

Pin description style #26

Open
vonbearshark opened this issue Jan 23, 2017 · 5 comments
Open

Pin description style #26

vonbearshark opened this issue Jan 23, 2017 · 5 comments

Comments

@vonbearshark
Copy link
Contributor

vonbearshark commented Jan 23, 2017

When we hover over the pins, or click on them, the description that pops up should be prett-ified. This will need coordination from the UI team and the Data team, because the contexts for each dataset is different.

@vonbearshark
Copy link
Contributor Author

vonbearshark commented Jan 24, 2017

Right now both datasets we have (city 311 and police) are displaying different info (#46). We should have some UI to standardize this; maybe a key-value table. On the other hand, the keys from the dataset are really ugly... maybe we can hard-code map the keys we want to display to some user-friendly property name in the record before it's pushed to the array of markers.

@vonbearshark
Copy link
Contributor Author

@chrisski44 , would you be interested in taking this issue? Essentially, I think you should create a function that takes an object that has the general form:

{
   title: "Example Title",
   fields:[{
       label: "Field label example 1",
       value: "Field label example 1 value",
   }, {
       label: "Field label example 2",
       value: "Field label example 2 value",
   }]
}

Then it creates an HTML string for this. For example, the obj.title should be inside a <h4> tag, I think, and I think you should create a <table> you should loop over all the obj.fields and add a two-column table mapping the label to the value. Normally, we should stay away from tables in HTML, but this is actually tabular data, so it's the right use-case. Here's an MDN reference on tables: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table. Test it on the 311 data, for example, using some of the important fields that are returned in the record, and we'll go from there.

Are you interested?

@vonbearshark
Copy link
Contributor Author

This will fix #46, too.

@chrisski44
Copy link
Contributor

@vonbearshark Yeah for sure I'll take this one on. I may have a few questions but I'll let you know!

@chrisski44 chrisski44 self-assigned this Jan 26, 2017
@vonbearshark
Copy link
Contributor Author

vonbearshark commented Jan 26, 2017

I'll be happy to help. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants