-
Notifications
You must be signed in to change notification settings - Fork 130
feat: bumps autocomplete element package, updates API #1050
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
Conversation
| integrity sha512-2N6SP/WOvPPnMm5E0uq21AyCxsJ0d6cBxBZ0yVNpvgeaNgPNI8gR1h54c2Ao4iQtvFce6eWdIezBXLDPMPbDag== | ||
| "@github/auto-complete-element@^3.1.0": | ||
| version "3.1.0" | ||
| resolved "https://registry.yarnpkg.com/@github/auto-complete-element/-/auto-complete-element-3.1.0.tgz#afd5ee64a17b4507c42136cfd790103217009b50" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right that it should change from npmjs.org to yarnpkg.com? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't have an answer why, but I notice @github/details-menu-element and @github/image-crop-element also use yarnpkg.com so I think it's okay...
I hope someone else has an answer!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone probably used npm-cli to add it originally but the docs say to use yarn - I don't think it matters but it's probably better using yarn while that's the documented tooling.
|
You may want to rebase and rerun |
d491173 to
f36934c
Compare
f36934c to
90a43c6
Compare
Lots has changed since this was approved, will re-request once it's actually ready!
|
@owenniblock Thanks for making the API updates! Just a note so we remember to update the Storybook stories and tests once we're happy with the changes 😄 |
khiga8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple comments as someone very new to the autocomplete work! Thanks for starting this work 💪
I agree with @lindseywild suggestion of explaining why autofocus is bad, maybe in the @accessibility section. In addition, we might want to explain the purpose of the optional clear button.
|
We need to make some changes. Currently the To fix the icon issue (icon sits above input) - we can move the icon below the input in the markup (it's The This element is no longer the |
|
This diverges from how we're handling input icons and actions in primer/react. We're putting icons and actions inside the text input border: There's a new PR for text input trailing actions: primer/react#1947 |
|
Thanks, @mperrotti ! This was a work in progress before checking with design just to get something working in the examples - we will definitely make sure that this is correct before going live 😄 |
|
I removed all the If it's actually necessary, feel free to add it back in, but maybe it should be a default part of the API. |
|
@khiga8 @owenniblock @smockle I believe all of the work is now complete in this PR - If you all would be so kind as to check it over, review the docs and that they make sense, any other nitpicks... Please let me know! |
|
I'd encourage everyone to double check swaps now that the API has been updated with new CSS classes. We'll need to make a couple minor adjustments. For my
|
|
I added a to do list at the top of the draft PR in dotcom of what is left and to make sure we verify all instances are accurate! |
|
From @khiga8 in #1050 (comment):
Super advice! I found numerous issues. I pushed https://github.com/github/github/commit/78e62821b19f42fdd3c56a02cd1a1f51269208cb to address a red-screen-of-death caused by a required/missing |
|
Hello @primer/rails-reviewers! This is ready for review. We have a branch in dotcom linked to these changes and have confirmed all instances look good: https://github.com/github/github/pull/214414. Through our swaps, we discovered additional CSS changes need to be made so we'll temporarily house those in dotcom while we work on getting it in Primer CSS. |
camertron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!





Closes https://github.com/github/accessibility/issues/796.
Changes
Package updates
API updates
autocomplete-label-inlineto thelabelelementautocomplete-label-stackedto thelabelelementautocomplete-bodysvgandinputin a<div class="form-control autocomplete-embedded-icon-wrap">(see example here)