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(#4208): Form includes label prop inherited from SpectrumLabelableProps that goes unused #4209

Conversation

majornista
Copy link
Collaborator

@majornista majornista commented Mar 15, 2023

Closes #4208

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue #4208.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Verify that label is not listed as a prop in Form documentation: https://reactspectrum.blob.core.windows.net/reactspectrum/ac82aa5dfd1e59654194ae56d00260b08e78d84f/docs/react-spectrum/Form.html#props

🧢 Your Project:

Adobe/Accessibility

@majornista majornista added bug Something isn't working documentation Improvements or additions to documentation rsp:Form typescript small review Easy to review PR labels Mar 15, 2023
@rspbot
Copy link

rspbot commented Mar 15, 2023

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

I see it removed in the docs table

I noticed that the labelPosition prop description and a few of the others don't make a lot of sense as they don't mention that it affects every field in a form. Something for us to address later. Thanks for the fix

@majornista
Copy link
Collaborator Author

I noticed that the labelPosition prop description and a few of the others don't make a lot of sense as they don't mention that it affects every field in a form. Something for us to address later. Thanks for the fix

From https://reactspectrum.blob.core.windows.net/reactspectrum/ac82aa5dfd1e59654194ae56d00260b08e78d84f/docs/react-spectrum/Form.html#content.

Form accepts one or more children to render as its form elements. Label alignment, positioning, and other properties are set on the Form itself and propagated to its children to generate a cohesive design. To override these top level Form props on individual children, set them directly on the child instead.

Props that propagate to children are further documented below: https://reactspectrum.blob.core.windows.net/reactspectrum/ac82aa5dfd1e59654194ae56d00260b08e78d84f/docs/react-spectrum/Form.html#label-position-and-alignment. The props table is a bit vague on this behavior, because the descriptions are inherited from SpectrumLabelableProps.

@snowystinger
Copy link
Member

Yes, I wasn't commenting on your work. We could override those descriptions and we should, but not in this PR. That was all.

@rspbot
Copy link

rspbot commented Mar 17, 2023

@rspbot
Copy link

rspbot commented Mar 17, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

@snowystinger snowystinger merged commit e849aef into main Mar 17, 2023
@snowystinger snowystinger deleted the 4208-form-includes-label-prop-inherited-from-spectrumlabelableprops-that-goes-unused branch March 17, 2023 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation rsp:Form small review Easy to review PR typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form includes label prop inherited from SpectrumLabelableProps that goes unused
4 participants