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(field): making description show up #3675

Merged
merged 2 commits into from
Apr 7, 2023
Merged

Conversation

dbanksdesign
Copy link
Contributor

Description of changes

Field description wasn't showing up for the internal Field component. This fixes that.

Issue #, if available

Description of how you validated changes

Added tests

Checklist

  • PR description included
  • yarn test passes
  • Tests are updated
  • No side effects or sideEffects field updated
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dbanksdesign dbanksdesign requested a review from a team as a code owner April 7, 2023 16:50
@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2023

🦋 Changeset detected

Latest commit: fe6dab9

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

This PR includes changesets to release 2 packages
Name Type
@aws-amplify/ui-react Patch
@aws-amplify/ui-react-storage 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

hein-j
hein-j previously approved these changes Apr 7, 2023
@@ -50,11 +50,12 @@ const FieldPrimitive: Primitive<FieldPrimitiveProps, typeof Flex> = (
{...rest}
>
{label ? <Label visuallyHidden={labelHidden}>{label}</Label> : null}
{descriptiveText ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, why remove this logic? Shouldn't descriptiveText be provided to show the descriptive text?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

but why did that cause a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This didn't cause the bug, the bug was I was passing it as a child instead of prop

@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 17:12 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 17:12 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 17:12 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 17:12 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 18:22 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 18:22 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 18:22 — with GitHub Actions Inactive
@dbanksdesign dbanksdesign temporarily deployed to ci April 7, 2023 18:22 — with GitHub Actions Inactive
Copy link
Contributor

@ioanabrooks ioanabrooks left a comment

Choose a reason for hiding this comment

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

Thank you for adding tests!

@dbanksdesign dbanksdesign merged commit c3918d9 into main Apr 7, 2023
@dbanksdesign dbanksdesign deleted the field-description-fix branch April 7, 2023 18:49
@github-actions github-actions bot mentioned this pull request Apr 7, 2023
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.

None yet

5 participants