-
Notifications
You must be signed in to change notification settings - Fork 377
docs(Expandable section, file upload, modal, pagination): add compone… #7979
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
|
Preview: https://patternfly-react-pr-7979.surge.sh A11y report: https://patternfly-react-pr-7979-a11y.surge.sh |
nicolethoen
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.
By reading these descriptions of ModalBoxXX components, It's feeling like we shouldn't be exporting the ModalBoxXX components? they are used by the ModalContent component. That component likely shouldn't be exported either, since its imported by the Modal component and not used in our examples?
Ceasing to export these sub-components would definitely be a breaking change, but we may not need to reference them in the docs if they are meant to be internal components only? Either that, or we should open an issue to build an example demonstrating how consumers can use these exported components. @tlabaj do you have more insights or a preference here?
| import topSpacer from '@patternfly/react-tokens/dist/esm/c_modal_box_m_align_top_spacer'; | ||
|
|
||
| /** Acts as a wrapper that contains only the modal content. */ | ||
|
|
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.
Do any of our examples demonstrate using this component? I don't think this comment is clear enough about why Id want or need to use a ModalBox. Does it change the layout or padding of the modal content? How would I pass this to the Modal?
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'm wondering, if this is really meant to be an internal components and not something exposed in our docs...
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.
@thatblindgeye @nicole The Modal sub components were never design to be exported initially. Someone exported them at some point. We have an issue for the major release to make the Modal composable. I would actually hold of on documenting the modal until that is implemented.
| import { css } from '@patternfly/react-styles'; | ||
| import styles from '@patternfly/react-styles/css/components/ModalBox/modal-box'; | ||
|
|
||
| /** The main body content of a modal. Depending on the context, this sub-component may be optional. */ |
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.
How is this related to a ModalBox? it's name implies that it's a child of ModalBox? their relationship an and the context during which this might be desired should be clearer if possible.
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'm wondering, if this is really meant to be an internal components and not something exposed in our docs...
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 would not make any changes to Modal, it was not design to be composable. If anything I would hide the sub components form docs. They are not used in any of the examples.
ffd6f3e to
d67b0b9
Compare
|
@tlabaj @nicolethoen The latest update removes descriptions to the Modal components, and also removes all but Modal from the prop docs. |
tlabaj
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
…nt descriptions
What: Closes #7978
I also reordered props alphabetically to make it easier to parse (most files updated involve just this), and did some minor tidying of prop descriptions.
Currently only some of the Modal sub-components are exposed on the Modal page. I'm wondering whether any others should be as well, or if any should be removed from the Modal page.
Additional issues: