Set size of panel

Set size of panel

Use Case
Presley is making a text formatting like area in a panel for his company employees. He adds a keyboard short cut to open the panel but he is getting feature requests to have it open at a minimum width. He saves the last width they set it to and when they open the panel the panel is restored to the saved width.

Thanks for submitting the feature request. We will review this internally

Or perhaps XD should remember the last-closed-width for each panel and restore on the next open? Makes plenty of sense, and there’s no need for each panel to implement this logic.

Perhaps make it optional with a manifest setting?

1 Like

You can add a keyboard shortcut to open the plugins panel with CMD + SHIFT + P or you can assign a keyboard shortcut to your panel in the manifest to open your specific panel. When you do this it does restore the last closed width.

However, @kerrishotts mentioned the team was contemplating adding a rich text editor in XD (or support of it). To me, I find it hard to write something in such a small column.

So if there’s ever an option to enter rich text or a situation where you might be doing some typing I’d want to make sure that the panel is set to a minimum width, at first, to display the full size of the plugin. They could shorten it if they like.

But there is another case where if there ever is a RTE then I might want to open the RTE to the same width as the scene node so the user typing will get the same line breaks and have an accurate estimation of what the text will display as. If you have text field of 50 columns then having the panel match the width give you that higher fidelity. If you select another text field that’s 180 columns the the panel can resize to that. It could be an option to match the width of the selected element.

OK, good. I’m happy as long as last-closed-width is restored. I should have realized that’s the case just from using panels for many weeks now.

Don’t see how you can affect the height, though.

For me, height is not important as much as width. I don’t have a case where I need to set the height.

Agreed. Was referring to your “…they could shorten it if they liked.”