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

Dropdown Component: Hidden menu div can exceed with dimensions of the plugin window causing scrollbars to appear unintentionally #97

Closed
aashreys opened this issue Apr 24, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@aashreys
Copy link

aashreys commented Apr 24, 2022

I'm placing two Dropdown components side-by-side in a div flexbox and the hidden menu component on the rightmost dropdown is exceeding the bounds of the window causing a horizontal scrollbar, as shown in the picture below.

Screen Shot 2022-04-24 at 12 20 23 PM

If I reduce the width of the hidden menu through developer tools, the scrollbar disappears once the menu fits the plugin window dimensions.

@aashreys
Copy link
Author

Curious how I can set up a local development version of Create Figma Plugin and test changes to fix this? If I make progress, happy to contribute directly with a PR.

@yuanqing
Copy link
Owner

There’s a script to symlink to the local copy of Create Figma Plugin from your plugin. Instructions are in the README: https://github.com/yuanqing/create-figma-plugin/blob/8b63d7bb9a12351d4d3a43ab7b9085e62f7e9f43/README.md#contributing

@yuanqing yuanqing added the bug Something isn't working label Apr 28, 2022
@aashreys
Copy link
Author

aashreys commented Apr 29, 2022

Upon further investigation, I've found that the same issue causes a vertical scrollbar to appear if a dropdown is the last element in a vertical UI stack.

image

@yuanqing yuanqing self-assigned this Apr 30, 2022
@yuanqing
Copy link
Owner

yuanqing commented May 3, 2022

@aashreys – The fix for this bug is currently on the next branch, and will be included in the next release. (In the meantime, if you can help to test the changes locally in your plugin, that would be awesome!)

@aashreys
Copy link
Author

aashreys commented May 4, 2022

Tested locally. Still seeing the scrollbars and now a new bug where the dropdown menu jumps around as I move the cursor over it. Attached a video.

Prototyper.Dropdown.Test.-.minified.mp4

Thanks for looking into this!

@yuanqing
Copy link
Owner

yuanqing commented May 4, 2022

Oof this is a weird one. (In the Storybook, the UI works OK while in dev tools and in “Responsive” mode.) Just pushed a fix!

@aashreys
Copy link
Author

aashreys commented May 4, 2022

Oof this is a weird one. (In the Storybook, the UI works OK while in dev tools and in “Responsive” mode.) Just pushed a fix!

Yep this fixed it. Dropdowns work as expected and scrollbars do not appear.

@yuanqing
Copy link
Owner

yuanqing commented May 8, 2022

Fixed in 1.9.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants