-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: allow for auto resizing of plugins [LIBS-487] #814
Conversation
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 am just wondering about the magical number "20" .. wouldn't that 20
equal divRef.current.offsetHeight - divRef.current.clientHeight
? if there is no way to get the number programatically then we can have a quick check in different browsers/OS to make sure nothing is too different (but can defer that later before merging to master).
I actually thought that offsetHeight should include the horizontal scroll bar, so I didn't think I needed to add any additional pixels, but when I tried that, I think I got that it wasn't tall enough which then caused the plugin to also get a vertical scrollbar? |
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 there is no easy way to get rid of the "20" then it's ok .. we can look at it separately, or at least test it more in different browsers
🎉 This PR is included in version 10.4.0-alpha.5 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This adds logic to autoresize plugin wrapper components if no fixed height or width is specified. See also the corresponding change in app-runtime: dhis2/app-runtime#1355.