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

Autocomplete + Suggester components #981

Merged
merged 13 commits into from
Nov 19, 2019
Merged

Autocomplete + Suggester components #981

merged 13 commits into from
Nov 19, 2019

Conversation

simurai
Copy link
Contributor

@simurai simurai commented Nov 12, 2019

This adds the Autocomplete and Suggester components from dotcom.

.autocomplete-results .suggester
image suggester

📖 Docs Preview

TODO

  • Add styles from dotcom
  • Add documentation
  • Refactor (partially)

TODO on dotcom

/cc @primer/ds-core

@vercel
Copy link

vercel bot commented Nov 12, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/primer/primer-css/2778zsbso
🌍 Preview: https://primer-css-git-autocomplete.primer.now.sh

Will stay in /hacks for now
@simurai
Copy link
Contributor Author

simurai commented Nov 15, 2019

The only "visual" change so far for .autocomplete-results: Adjust padding from 5px to 4px 8px. So that it horizontally aligns with the input above.

Before After
image image

For suggester the border-radius, border and box-shadow got tweaked a bit:

Before After
Screen Shot 2019-11-15 at 12 00 37 PM Screen Shot 2019-11-15 at 2 04 23 PM

Switching around source order makes it possible drop the `suggestions list-style-none position-absolute` classes.
@simurai
Copy link
Contributor Author

simurai commented Nov 15, 2019

  • Refactor (partially)

Something we might can consider one day: Combine the "Autocomplete" and "Suggester" component. Visually, the main difference is that the "Suggester" has a border between items, but otherwise they are pretty similar.

Copy link
Contributor

@shawnbot shawnbot left a comment

Choose a reason for hiding this comment

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

Huzzah! Nice work. I'm going to file an issue re: one of my pet peeves in this UI, but we can address that later. 😉

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