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

Drawer should be resizable #779

Open
jonathanolson opened this issue Oct 20, 2022 · 2 comments
Open

Drawer should be resizable #779

jonathanolson opened this issue Oct 20, 2022 · 2 comments

Comments

@jonathanolson
Copy link
Contributor

It looks like it's based on static content size. Should be similar to how Panel/ButtonNode was made sizable based on its content.

@jonathanolson jonathanolson self-assigned this Oct 20, 2022
@jonathanolson
Copy link
Contributor Author

@pixelzoom, I'm curious about the purpose and status of Drawer, and whether this is suitable.

It looks like Drawer duplicates a lot of what Panel does (it provides a background/foreground split with a stroke in front), but I'm curious if that is necessary (I see cases where e.g. an EquationDrawer is passed an EquationPanel, where it seems like the Panel-like qualities of Drawer are redundant). Drawer also doesn't support changing the background color.

Thoughts on if Drawer was changed so that it only placed content and handled the translation/clipping? (a bit out of scope for this issue).

It also supports a size option where the content is "sized to fit in container", which seems like it would turn more into an AlignBox (but I don't see preferred sizes set, or options for alignment). If we just take arbitrary content (without styling this), presumably this wouldn't be needed?

I think I might remove this from the dynamic layout board, as my preferred way to add dynamic layout to Drawer would be to remove a lot of functionality, and have it be a very lightweight container with a DrawerHandle type that implements the handle. Let me know your thoughts?

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 17, 2024

@jonathanolson and I talked about Drawer. Since it's only used by function-builder, I think it would be low risk to change the implementation proactively, and low cost to test. But if it were me, I would defer this issue, and address it if needed when function-builder is someday republished with dynamic layout.

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

No branches or pull requests

2 participants