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

docs(Icon): add icon search #977

Merged
merged 1 commit into from
Dec 3, 2016
Merged

docs(Icon): add icon search #977

merged 1 commit into from
Dec 3, 2016

Conversation

levithomason
Copy link
Member

@levithomason levithomason commented Dec 2, 2016

Finding icons can be a pain. The current icon set examples are far too large to be of any use with the code editor provided. You need to scroll up and down for pages to make changes and see your results. Users probably also have no idea that there are other examples at the bottom of that massive page.

This PR removes the code editor icon set examples and replaces them with an icon search. It moves the other examples to an "Examples" tab for clarity.

Search Features

  • auto focused search input on mount / load, so you can search instantly
  • show names and aliases that "contain" the query
  • optionally show names/alias that are "similar to" query (default on)
  • click to copy

Demo

http://g.recordit.co/dgMeUfBcbZ.gif

@codecov-io
Copy link

codecov-io commented Dec 2, 2016

Current coverage is 100% (diff: 100%)

Merging #977 into master will not change coverage

@@           master   #977   diff @@
====================================
  Files         137    137          
  Lines        2284   2286     +2   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits         2284   2286     +2   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update c113cf5...b03f5f1

@levithomason levithomason force-pushed the docs/icon-search branch 3 times, most recently from 7dd2b5d to 83db94f Compare December 3, 2016 01:10
@@ -153,7 +153,7 @@ class Menu extends Component {
const { activeIndex } = this.state

return _.map(items, (item, index) => {
return createShorthand(MenuItem, val => ({ content: val }), item, {
return createShorthand(MenuItem, val => ({ content: val, name: val }), item, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using shorthand items as an array of strings, the strings were not passed to the name prop of the menu item, so the callback name was undefined. I've added the literal shorthand values to the name prop so the callbacks contain the name.

@levithomason levithomason merged commit a52499d into master Dec 3, 2016
@levithomason levithomason deleted the docs/icon-search branch December 3, 2016 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants