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

feat: allow for auto resizing of plugins [LIBS-487] #814

Merged
merged 4 commits into from
Sep 28, 2023

Conversation

tomzemp
Copy link
Member

@tomzemp tomzemp commented Aug 21, 2023

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.

Copy link
Contributor

@kabaros kabaros left a 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).

@tomzemp
Copy link
Member Author

tomzemp commented Aug 28, 2023

I am just wondering about the magical number "20" .. wouldn't that 20 equal divRef.current.offsetHeight - divRef.current.clientHeight?

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?

Copy link
Contributor

@kabaros kabaros left a 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

@tomzemp tomzemp merged commit e5c66b8 into alpha Sep 28, 2023
8 checks passed
@tomzemp tomzemp deleted the LIBS-487/auto-dimensions branch September 28, 2023 08:15
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 10.4.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants