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

fix: associate labels with autosuggest input #2755

Merged

Conversation

brian-smith-tcril
Copy link
Contributor

Description

Fixes #2436

Merge Checklist

  • Is there adequate test coverage for your changes?
  • Consider whether this change needs to reviewed/QA'ed for accessibility (a11y). If so, please add wittjeff and adamstankiewicz as reviewers on this PR.

Post-merge Checklist

  • Verify your changes were released to NPM at the expected version.
  • If you'd like, share your contribution in #show-and-tell.
  • 🎉 🙌 Celebrate! Thanks for your contribution.

@netlify
Copy link

netlify bot commented Oct 27, 2023

Deploy Preview for paragon-openedx ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a1f5abb
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx/deploys/65775f539560920008eec6f4
😎 Deploy Preview https://deploy-preview-2755--paragon-openedx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (64611f7) 92.82% compared to head (a1f5abb) 92.84%.
Report is 68 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2755      +/-   ##
==========================================
+ Coverage   92.82%   92.84%   +0.01%     
==========================================
  Files         235      235              
  Lines        4237     4247      +10     
  Branches     1029     1032       +3     
==========================================
+ Hits         3933     3943      +10     
  Misses        300      300              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@cintnguyen cintnguyen left a comment

Choose a reason for hiding this comment

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

Tested locally, the icon button (dropdown arrow) is behaving as expected. As well as having the label associated with the input box correctly. LGTM!

Copy link
Contributor

@httpsmenahassan httpsmenahassan left a comment

Choose a reason for hiding this comment

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

Apologies for missing this earlier! +1 to everything Cindy said -- I saw the same things when testing locally so this LGTM.

Out of curiosity, would we want to get rid of mentions/uses of floatingLabel within the Form.Autosuggest component at this point since labels are now associated with the input in another way?

@brian-smith-tcril
Copy link
Contributor Author

Out of curiosity, would we want to get rid of mentions/uses of floatingLabel within the Form.Autosuggest component at this point since labels are now associated with the input in another way?

Good call! I don't think removing the floatingLabel functionality from the component makes sense at this point, but removing it from the examples on the docsite as not to encourage floatingLabel use seems like a good plan. I'll update the docsite page in this PR.

@httpsmenahassan
Copy link
Contributor

Sounds good -- thanks, Brian!

Option with custom onClick
</Form.AutosuggestOption>
</Form.Autosuggest>
<Form.Group>
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to me that this mdx file should have 2 indent spaces (currently 4). This can be seen by looking at other mdx files of the Form component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@brian-smith-tcril brian-smith-tcril merged commit d32e6d0 into openedx:master Dec 19, 2023
10 checks passed
@openedx-semantic-release-bot

🎉 This PR is included in version 21.11.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@openedx-semantic-release-bot

🎉 This PR is included in version 22.0.0-alpha.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Form.Autosuggest Accessibility - Label Association
6 participants