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

create strategy where to assign transferProps #496

Closed
mbohal opened this issue Sep 26, 2023 · 2 comments
Closed

create strategy where to assign transferProps #496

mbohal opened this issue Sep 26, 2023 · 2 comments
Assignees
Labels
BC Breaking change documentation Improvements or additions to documentation

Comments

@mbohal
Copy link
Contributor

mbohal commented Sep 26, 2023

Presently there is no officially stated startegy where HTML attributes should be forwarded to.

@dacerondrej did a good job unifying it in https://react-ui.io/components/popover#forwarding-html-attributes, but in order to provide a good DX we need a stated strategy.

The current state is following:

Alert                   root
Badge                   root
Button                  interactive/root
ButtonGroup             root

Card                    root
CardBody                root
CardFooter              root
`
CheckboxField           interactive
FileInputField          interactive

FormLayout              root
FormLayoutCustomField   root

Grid                    root
GridSpan                root

InputGroup              root

Modal                   modal, not backdrop
ModalBody               root
ModalCloseButton        interactive/root
ModalContent            root
ModalFooter             root
ModalHeader             root
ModalTitle              root

Paper                   root

Popover                 root
PopoverWrapper          root

Radio                   root
ScrollView              root

SelectField             interactive
Table                   root

Tabs                    root
TabsItem                root

Text                    root
TextArea                interactive
TextField               interactive
TextLink                interactive/root
Toggle                  interactive

Toolbar                 root
ToolbarGroup            root
ToolbarItem             root

root = the root node of the component
interactive = the interactive element in the composition - it might or might not be the root node

The problematic ones are:

@mbohal mbohal self-assigned this Sep 26, 2023
@mbohal mbohal added documentation Improvements or additions to documentation BC Breaking change labels Sep 26, 2023
@mbohal mbohal added this to The Board Sep 26, 2023
@github-project-automation github-project-automation bot moved this to 💡Ideas in The Board Sep 26, 2023
@mbohal mbohal moved this from 💡Ideas to 🏗 In progress in The Board Sep 26, 2023
@mbohal
Copy link
Contributor Author

mbohal commented Sep 26, 2023

@adamkudrna Would #461 fix this issue? In other words would that issue allow us to make the <dialog> HTML element the root of our <Modal> component?

I think it should be possible, because for backdrop we could use https://developer.mozilla.org/en-US/docs/Web/CSS/::backdrop, but I'm not sure.

@adamkudrna
Copy link
Member

In other words would that issue allow us to make the <dialog> HTML element the root of our <Modal> component?

Yes!

@adamkudrna adamkudrna moved this from 🏗 In progress to ✅ Done in The Board Oct 16, 2023
@mbohal mbohal closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC Breaking change documentation Improvements or additions to documentation
Projects
Archived in project
Development

No branches or pull requests

2 participants