-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
inline=X ⇒ usePortal=!X #2045
inline=X ⇒ usePortal=!X #2045
Conversation
Overlay/Dialog default usePortal=true :fire: Popover/Tooltip default usePortal=false (cuz Popper.js is really great)
overlay and popover docsPreview: documentation | landing | table |
fix menu testPreview: documentation | landing | table |
fix select testPreview: documentation | landing | table |
please elaborate on this. |
I have found that in simple cases inline Popovers (powered by Popper.js) work identically to portaled popovers. This was not the case with Tether, but "Popper.js is really great," so things just work now. I also found that in most cases I prefer to use inline Popovers cuz they're easier to style and reason about. So with the improved functionality from Popper.js, seems reasonable to change the default. |
How does it work? Is Popper creating its own portal-like thing under the hood? |
no, Popper is just better at positioning than Tether. |
Merge branch 'develop' into gg/usePortalPreview: documentation | landing | table |
oopsPreview: documentation | landing | table |
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.
if Popper isn't pulling its contents out of the DOM tree and attaching it in another spot, then I'm strongly against the default change. it requires users to think about z-stacking and overflow more than necessary.
@adidahiya play with this example for a bit, look at the inline styles that Popper injects in each case, and then get back to me: https://9326-71939872-gh.circle-artifacts.com/0/home/circleci/project/packages/docs-app/dist/index.html#core/components/popover.portal-rendering (updated link) |
18d15e3
to
60b55b3
Compare
revert Popover default value: usePortal=true nowPreview: documentation | landing | table |
@@ -72,6 +72,7 @@ export class CollapsibleListExample extends BaseExample<ICollapsibleListExampleS | |||
<RadioGroup | |||
key="collapseFrom" | |||
name="collapseFrom" | |||
inline={true} |
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.
what's this?
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.
the other inline modifier, the one that makes checkboxes etc display: inline-block
so they'll lie on the same line
Merge branch 'develop' of github.com:palantir/blueprint into gg/usePortalPreview: documentation | landing | table |
#2053 will fix the test failures here because it removes those tests (MenuItem dynamic layout)! |
refactor Overlay background scrolling testsPreview: documentation | landing | table |
fix popover examples usePortalPreview: documentation | landing | table |
Fixes #1341
Changes proposed in this pull request:
inline=X
⇒usePortal=!X
Overlay/Dialog
defaultusePortal=true
Popover/Tooltip
defaultusePortal=false
(cuz Popper.js is really great)