-
Notifications
You must be signed in to change notification settings - Fork 154
Long-term layout idea: panels! #155
Comments
Blender has a similar layout system, although it goes a bit farther — there’s a dropdown available in one of the window types (the application menu/log viewer, which typically appears at the top of the window), that allows you to select different layouts and even create your own. The UI is fully resizable and any pane can be split into two or changed to show different content. |
@joshwcomeau I've added my WIP panels-setup it is using react-grid-layout for the panels. At the moment, the basic setup is working but there is a lot todo. But I think we need to discuss the details and I need some help for the styling & UI concept. Summary of the setup
The following points I've hit during creating the setupBusiness logic
UI
|
If you like the branch I can create a WIP PR for tracking the changes of I've noticed that this is a large task & I think we should split into smaller pieces:
|
Hi @AWolf81, Thanks for giving this a shot. I've been working on this myself, and I don't think we can use It's close to what I'm imagining, but the layout model is different. Specifically, I'm imagining it as a series of columns; each column can have 1 or more module, and critically, each column can be resized. With react-grid-layout, there's no idea of columns. When you resize one module, the others move out of the way, instead of shrinking: In my Panels branch, I have it as a series of rows and columns that can be resized: In this model, even the Sidebar could be a panel: (obviously styles need to be fixed) I couldn't find any third-party tool that did exactly what I want (react-mosaic was closest, but still not quite), so I think this might be something we have to build ourselves. Well, I think we'll be able to use The good news is that I have it mostly working already in my Totally agree it makes sense as multiple PRs. I haven't been able to give this very much attention (speaking at React Boston in a week and a half so a lot of my time recently has been going towards that), but I do plan to get back on top of this shortly =) here are what I see as the next steps:
If you're interested in helping, maybe you could look at integrating Lemme know what you think. Also lemme know if you think |
@joshwcomeau I played a bit with Sure styling needs to be improved. I also think we could have one panel for adding & removing modules from the panels at a fixed position. I think we could show a trash bin on I think it would be good to have panel control icons on right sidebar. So we could have the following things in the menu:
In my Do you think the drag & drop panel concept like in the Codesandbox could work? If yes, I'll add it to the branch. OK, I think I leave the panels for now and we can work on it later. |
Hm, I'm not sure that I want an always-present panel for panel management. I think it's something that most users won't actually need very often, and might confuse newcomers. I'm a fan of keeping the UI as minimal as we can. I think the norm for desktop apps is to have the menu deal with that, like a top-level "Window" menu. I think it can do everything we need Let's look at the concerns 1 by 1:
I imagine a menu like:
So yeah, you'd just toggle the one you want to add. For placement, I imagine us working it out automatically, based on sizes. Each panel will have a Let's say this is your layout:
Let's say the window is 1000px tall, and DevServer currently takes up 750px, but has an acceptable range of 500px - 1000px. If we want to add a new module which has a min-height of 400px, it'll add it to the first column (it can resize DevServer to be 600px, which is still bigger than its min). If we want to add a new module which has a min-height of 600px, though, it won't fit in the first column, and the second column is already full, so it'll create a new third column.
I don't think we have a concept of an "empty" panel, unless you mean columns? For columns, I think we can let the process I described above take care of columns most of the time, but maybe we can also add a menu item, "Add new column", which'll just add a new empty column on the right side of the screen?
I imagine that each module has a title bar, and so we could add a little X to close it in that. But yeah you can also "untick" it from the menu, by clicking an already-ticked menu item We could also maybe fade in a trashcan in the bottom left corner when you start dragging it... although that feels like the kind of detail we can decide to add at the end, once all the other concerns are figured out.
I think this is definitely a menu item, that's where I'd look for that kind of functionality. But yeah, there's still a lot of this stuff that's in my head, I haven't had the chance to get it out. I'm working on a proper mockup for this stuff in Figma, but it's a bit of a new process for me and I've been busy with other stuff. Hopefully once I have that, it'll be helpful to clarify what I'm imagining.
Awesome! Yeah, this remains the most pressing issue. Once that's worked out, I'll start working on adding code signing, and we can broadcast the release :D |
Oh boy, here we go.
So, yesterday I had a bit of an epiphany: I designed Guppy like a webpage, not a desktop app.
It's meant to be used in a relatively small window, and is meant to be scrolled vertically. Nothing is rearrangeable or moveable. It's essentially a website in a desktop-app wrapper.
I had this realization when I started learning AfterEffects. While its interface is complex, it's undeniably powerful:
Like other Adobe products, it's comprised of a bunch of panels. Each panel is resizable, and can be toggled on/off.
Another example is a program I use for audio stuff, Ableton Live:
This program is still too complicated-looking, but it's a bit more whimsical/colourful/fun. It too has resizable panels, and panels have different tabs.
Even Spotify has some of this; a resizable sidebar on the left, and a persistent bottom bar:
I think Guppy could be much more powerful if we leverage some of the ideas. I'm imagining something like this:
I imagine it would share much of the same aesthetic / wouldn't look that different from how it does now. The big thing would be that each section would be a panel, and would be movable / toggleable / resizable. That way you can adjust your view of things, kill the "eject" window if you don't need it, swap "dev server" and "build" when you're focused on bundling, etc. It feels so much more powerful.
Like in Photoshop, we could have a "Window" application menu to toggle specific panels (the drawing doesn't include a way to create new tasks, for example; maybe that could be a disabled-by-default panel).
I also imagined having a persistent bottom bar that could be used for statuses / notifications. A quick way to track tasks, and clicking on one of them would focus that project/panel or something.
I think that we could still make it very friendly for absolute beginners (by having a sensible default layout, so that nothing has to be toggled for most beginner usecases), and it means it could scale with the user as they learn more. Maybe one panel could even just be a terminal, as a way of transitioning users to a terminal / supporting things that absolutely need a terminal.
I think this is a problem we're going to have to face, one way or another; as Guppy gets more powerful, how do we ensure that it remains easy to grasp for beginners, while still being powerful for intermediate/advanced users?
I'm really excited about this idea, although I don't foresee having the time to work on it anytime soon. It would be a big task, and something I'm thinking of as like a long-term, 2019ish vision.
What do y'all think?
The text was updated successfully, but these errors were encountered: