vega / polestar

Lightweight Tableau-style interface for visual analysis, built on Vega-lite.
http://vega.github.io/polestar
Other
367 stars 47 forks source link

Add Icons to Mark Type’s Select Box #150

Closed kanitw closed 7 years ago

kanitw commented 9 years ago

Right now mark type's select box is HTML native select box. It's much nicer to have some icons.

kanitw commented 9 years ago

font_awesome_icons font_awesome_icons

light-and-salt commented 9 years ago

It seems that the html

I like the UI-bootstrap module (http://angular-ui.github.io/bootstrap/) because it covers a lot of things in the UI. But it's an overkill for issue #150. Do we want to use UI-bootstrap?

kanitw commented 9 years ago

You’re right. We can’t use html select box for this.

For now, I prefer not to use bootstrap as bootstrap overrides too many default css, which makes developing other module difficult. If you include bootstrap, basically all our UI components will suddenly becomes broken.

For other dropdowns in the system we use Drop.js to implement. So it’s good to be consistent.
For example see fieldinfo.js for example dropdown:

The “include / optional / exclude” in Voyager’s fieldlistitem.html is a good example style that we can use with the mark type select box.

data_voyager

domoritz commented 9 years ago

Icons are font awesome https://fortawesome.github.io/Font-Awesome/icons/

kanitw commented 9 years ago

@ZeningQu

I was thinking about it again. I think non-bootstrap UI components are generally fine as they don’t require all of bootstrap’s css. Or if you want to use some bootstrap css, make sure to encapsulate your stylesheet within the module so it doesn’t override other parts.

FYI, Dominik has start using angular-ui-select in another PR, so maybe you want to use that too. It might be easier than what I suggested earlier.

domoritz commented 9 years ago

See https://github.com/angular-ui/ui-select

light-and-salt commented 8 years ago

@kanitw @domoritz Hey hey! Sorry it's been so long! I finished this using Drop.js (screenshot below): screen shot 2016-01-19 at 11 15 37 pm But this is only on my local machine. I tried to push to origin and got error 403: screen shot 2016-01-19 at 11 18 29 pm

kanitw commented 8 years ago

@ZeningQu Could you please fork polestar and push to your fork and send a pull request from there?