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
Allow viewport width/height fields to be editable + draggable viewport #12586
Comments
That sounds like a great enhancement. As long as it doesn't complexify the code or the UI too much, would love it if you can contribute a PR for this. @domyen got any design requests here? |
@domyen it seems there isn't currently a numeric input in
|
Excited! 🤗 @AndrewLeedham we have a SB numeric input as part of the Controls addon. Perhaps you can reference that and add a generic/basic version to File path storybook/lib/components/src/controls/Number.tsx |
Nice! I suspect we'll need to create an input styling for the Toolbar because its dimensions are quite constrained. Our standard Inputs aren't designed to handle out of the box. If you can get the behavior working, I'll think through the styling/UX changes. wdyt? |
I had a go in that PR, I gave it a min-height of
I have the numeric input behaviour all working, are you happy with that implementation in the PR? For the resize stuff I am thinking of moving the |
Fantastic work @AndrewLeedham! Tweaks:
re: If so, that sounds good to me. |
👍 will amend, sounds good.
Yes exactly that. I will see if I can get this working when I get the chance. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Still working on this, just a little short on time atm. |
This is dropped fairly low on my priority list, if anyone wants to pick it up I can share what I have, or better yet start from scratch because I would probably rewrite what I have anyway :/ |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Any progress on this regards? |
Describe the solution you'd like
When a viewport is selected, it shows the width and the height and allows them to be swapped, it would be nice if we could also edit those fields as number inputs. It would also be useful to make the right and bottom of the canvas draggable.
Describe alternatives you've considered
I realise there is an add-on called taffy which adds this behaviour, but I am not sure it is maintained and the viewport plugin looks more inline with storybook's design.
Are you able to assist to bring the feature to reality?
Yes I can take a shot at implementing this.
The text was updated successfully, but these errors were encountered: