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

Adding some docs for evergreen's Autocomplete #162

Merged
merged 15 commits into from
Mar 20, 2018
Merged

Conversation

fforres
Copy link
Contributor

@fforres fforres commented Mar 19, 2018

  • Adding some docs for evergreen's Autocomplete
  • I kept having some props error, so I changed TextTableCell prop textProps to be PropTypes.shape(Text.propTypes) instead of a PropTypes.shape(PropTypes.object)

2018-03-19 11 44 16

Copy link
Contributor

@jeroenransijn jeroenransijn left a comment

Choose a reason for hiding this comment

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

Looks awesome! I left some minor feedback on nomenclature.

})

const title = 'Autocomplete'
const subTitle = 'A component to filter trhough a dataset'
Copy link
Contributor

Choose a reason for hiding this comment

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

A component to filter through a list of options

const title = 'Autocomplete'
const subTitle = 'A component to filter trhough a dataset'

const introduction = (
Copy link
Contributor

Choose a reason for hiding this comment

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

introduction => implementationDetails.

introductions should try to use accessible language to both designers and engineers on the long run.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can ignore the introduction and just use implementationDetails instead.


const components = [
{
name: 'AutoComplete',
Copy link
Contributor

Choose a reason for hiding this comment

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

Autocomplete


const description = (
<p>
The <code>AutoComplete</code> component.
Copy link
Contributor

Choose a reason for hiding this comment

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

The Autocomplete component.

<div>
<p>
The <code>Autocomplete</code> components implements a{' '}
<code>VirtualList</code> inside a React Portal, list and to be enable
Copy link
Contributor

Choose a reason for hiding this comment

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

The Autocomplete renders a filterable list of options in a Popover — it does not render the text input. If you need a combination with a text input and trigger button, take a look at the Combobox component. This component is mainly used to create type aheads.

The Autocomplete component combines a set of external libraries

  • Uses Downshift for autocomplete
  • Uses react-tiny-virtual-list for performant list rendering
  • Uses fuzzaldrin-plus for fuzzy filtering

</div>
)

const designGuidelines = (
Copy link
Contributor

Choose a reason for hiding this comment

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

We can delete this if it's empty

scope
},
{
title:
Copy link
Contributor

Choose a reason for hiding this comment

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

title: 'Fully Featured Example'
description: 'Full width (using flex) example with options, title, onFocus, filtering, and a button to trigger the autocomplete''

children: PropTypes.func.isRequired,
/**
* Proptype to set the lits items size beforehand for the virtual list to render properly.
Copy link
Contributor

Choose a reason for hiding this comment

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

The height of each item. Because the list is virtualized this is required beforehand.

itemSize: PropTypes.number,
/**
* Function that returns a component to render the iist item.
Copy link
Contributor

Choose a reason for hiding this comment

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

Function that returns a component to render the item.

renderItem: PropTypes.func,
/**
* Function used to filter items it should just return a subset of the initial items.
Copy link
Contributor

Choose a reason for hiding this comment

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

A function that is used to filter the items. It should return a subset of the initial items. By default the "fuzzaldrin-plus" package is used.

@fforres
Copy link
Contributor Author

fforres commented Mar 20, 2018

Updated comments @jeroenransijn :D

<div>
<p>
The <code>Autocomplete</code> components renders a filterable list of
options in a Popover — it does not render the text input - If you need a
Copy link
Contributor

Choose a reason for hiding this comment

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

Being a type nazi here. hyphen (-) is not an em dash (—). Please use a em dash in this case. Learn more here: https://practicaltypography.com/hyphens-and-dashes.html

Copy link
Contributor

@jeroenransijn jeroenransijn Mar 20, 2018

Choose a reason for hiding this comment

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

Note that because code editors uses a monospace font, it doesn't look any different in the code editor.

'search input': searchInputDocs,
icons: iconsDocs
icons: iconsDocs,
autocomplete: autocompleteDocs
Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunate merge :(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Woops :(

@jeroenransijn
Copy link
Contributor

@fforres 🥇 👍 🎉 🌲

@jeroenransijn jeroenransijn merged commit 528e01a into master Mar 20, 2018
@jeroenransijn jeroenransijn deleted the fforres/docs branch March 20, 2018 23:24
jeroenransijn added a commit that referenced this pull request Mar 26, 2018
* Adding some docs for evergreen's Autocomplete (#162)

* adding eslint for IDE && initial commit

* Adding all default exapmples

* fix lint

* default export

* package

* marker

* Adding some more options

* Adding proptypes explanation

* fixing textProps

* remove children

* Adressing comments from @jeroenransijn

* adding emdash

* Update

* Docs corner dialog (#165)

* breaking improvements and docs corner dialog

* minor copy update

* docs and bbreaking improvements (#167)

* label change

* improvements positioner, popover  and tooltip

* update Autocomplete and Combobox

* improved positioner

* improved components
jeroenransijn added a commit that referenced this pull request Mar 28, 2018
* Docs corner dialog (#165)

* breaking improvements and docs corner dialog

* minor copy update

* docs and bbreaking improvements (#167)

* label change

* Improves Popover, Positioner, Overlay and Side Sheet (#169)

* Adding some docs for evergreen's Autocomplete (#162)

* adding eslint for IDE && initial commit

* Adding all default exapmples

* fix lint

* default export

* package

* marker

* Adding some more options

* Adding proptypes explanation

* fixing textProps

* remove children

* Adressing comments from @jeroenransijn

* adding emdash

* Update

* Docs corner dialog (#165)

* breaking improvements and docs corner dialog

* minor copy update

* docs and bbreaking improvements (#167)

* label change

* improvements positioner, popover  and tooltip

* update Autocomplete and Combobox

* improved positioner

* improved components

* unify system (#168)

* Focus support dialog (#170)

* improved focus management dialog

* focus management docs dialog

* tooltip docs (#171)

* tooltip docs

* improve tooltip + links

* combobox docs (#172)

* export Position

* remove old readmes

* Docs radio (breaking change) (#177)

* segmented control docs (#176)

* radio docs

* is required prop

* doc text

* improved focus handling (#178)

* fix rowno comments

* added isInvalid back to radio

* default position prop tooltip

* 3.0.0
prateekgoel pushed a commit to prateekgoel/evergreen that referenced this pull request Oct 26, 2018
* adding eslint for IDE && initial commit

* Adding all default exapmples

* fix lint

* default export

* package

* marker

* Adding some more options

* Adding proptypes explanation

* fixing textProps

* remove children

* Adressing comments from @jeroenransijn

* adding emdash

* Update
prateekgoel pushed a commit to prateekgoel/evergreen that referenced this pull request Oct 26, 2018
* Docs corner dialog (segmentio#165)

* breaking improvements and docs corner dialog

* minor copy update

* docs and bbreaking improvements (segmentio#167)

* label change

* Improves Popover, Positioner, Overlay and Side Sheet (segmentio#169)

* Adding some docs for evergreen's Autocomplete (segmentio#162)

* adding eslint for IDE && initial commit

* Adding all default exapmples

* fix lint

* default export

* package

* marker

* Adding some more options

* Adding proptypes explanation

* fixing textProps

* remove children

* Adressing comments from @jeroenransijn

* adding emdash

* Update

* Docs corner dialog (segmentio#165)

* breaking improvements and docs corner dialog

* minor copy update

* docs and bbreaking improvements (segmentio#167)

* label change

* improvements positioner, popover  and tooltip

* update Autocomplete and Combobox

* improved positioner

* improved components

* unify system (segmentio#168)

* Focus support dialog (segmentio#170)

* improved focus management dialog

* focus management docs dialog

* tooltip docs (segmentio#171)

* tooltip docs

* improve tooltip + links

* combobox docs (segmentio#172)

* export Position

* remove old readmes

* Docs radio (breaking change) (segmentio#177)

* segmented control docs (segmentio#176)

* radio docs

* is required prop

* doc text

* improved focus handling (segmentio#178)

* fix rowno comments

* added isInvalid back to radio

* default position prop tooltip

* 3.0.0
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

Successfully merging this pull request may close these issues.

2 participants