-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Document getAnchorRect prop for Popover component. #17709
Document getAnchorRect prop for Popover component. #17709
Conversation
To be honest, I'm not sure if |
I was thinking about this too and I agree that we can have a more friendly prop, "position stategy" or something like that and it could have values like "parent" (default), "element" (pass a ref there somehow)... That said, that prop still need to be supported anyway, so I won't be against documenting it now since it's not deprecated. |
Sounds good. Yeah, I was thinking if we could pass reference nodes directly to Popover... And allow a buffer to be set, an option to ignore padding, etc. Would simplify a lot of use cases. |
I wasn't aware this is going to be changed. (cc: @aprea) At my work, I stumbled upon this and I had to use it in one of the use-case that I wanted to support. So I used it and thought that this should be documented. It was hard enough for me to understand it by reading the code, and not many people would know about it. So better to document it. Happy to wait until it's matured and close this or leave this open for comments/review. |
…or-popover-component
…or-popover-component
@ellatrix @youknowriad Can this be reviewed and merged, if all okay? |
@youknowriad @peterwilsoncc I'm not sure if we should be documenting this. Currently we don't use this prop at all anymore anywhere in Gutenberg. Instead we use (and should use) |
Documenting it or not doesn't change the fact that it's a public API that we need to support. If you think it's a deprecated API, why not mark it explicitly (trigger a deprecated call?) |
Description
Add missing documentation for this hidden gem-like prop for Popover component.
Types of changes
Documentation change. (Non-breaking)