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

Ensure full_width: option is respected by the auto_complete input #3205

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

camertron
Copy link
Contributor

@camertron camertron commented Nov 21, 2024

What are you trying to accomplish?

This PR passes the full_width: option through to the auto complete component from the form input. The AutoComplete component accepts the full_width: option, but that's also a shared/common option that all form controls accept. The Input base class deletes it from the hash of system_arguments, meaning it does not then get passed to the AutoComplete component. I believe full_width: is the only attribute with this problem, as other shared attributes are not deleted from system_arguments.

Screenshots

The AutoComplete component uses the same CSS classes for the <input> element as the rest of the forms framework. Take a look at the text field input or the TextField component to preview the effect of the full_width: option.

Integration

No changes necessary in production. I should note however that full_width: true is the default for all form inputs, which now includes AutoComplete. The AutoComplete component itself however defaults to full_width: false, meaning this PR will effectively change the default from false to true. Dotcom does not appear to use the auto complete input at all, so changing the default should have no practical effect in production.

List the issues that this change affects.

Fixes #3195

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

Accessibility

  • No new axe scan violation - This change does not introduce any new axe scan violations.

Merge checklist

  • Added/updated tests
    - [ ] Added/updated documentation
    - [ ] Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

Copy link

changeset-bot bot commented Nov 21, 2024

🦋 Changeset detected

Latest commit: 52c26c3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@camertron camertron merged commit 79ca4f9 into main Nov 25, 2024
40 checks passed
@camertron camertron deleted the forms_autocomplete_full_width branch November 25, 2024 17:36
@primer primer bot mentioned this pull request Nov 22, 2024
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.

Setting properties on a form control when using the form builder
2 participants