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

Scope based editor window system #2234

Open
MechWarrior99 opened this issue Apr 22, 2024 · 4 comments
Open

Scope based editor window system #2234

MechWarrior99 opened this issue Apr 22, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@MechWarrior99
Copy link
Contributor

Is your feature request related to a problem? Please describe.

In the editor, editing assets have a couple of workflow and implementation issues.

  • Limited customization of panel layout, meaning you can't optimize workflows or screen real-estate usage.
    • For example, you can't dock the scene hierarchy above the Property grid to give a wider viewport view.
  • Inconsistent UI and UX for viewing and editing similar data, and doing similar tasks
    • For example, the entity hierarchy in the scene and the visual tree hierarchy in the UI Page both do the same thing, but are different implementations.
    • This also means repeated work for implementing improvements in to Stride.

Describe the solution you'd like

Think of each asset type as a "document scope", when a asset is opened its scope is set as the active scope. All relevant windows change to show the data of the asset when its scope is active.

Windows are designed for specific data types and tasks, instead of for specific assets. Such as Outliner, Viewport, Properties, Preview, Blackboard, and so forth.

  • For example, when opening a Scene asset, if there is a Viewport window, it would show the 3D view of the scene, and if there is a Outliner window, it would show the entity hierarchy.

Windows can specify which scopes they do or don't listen to, or even specific entities (like a lock/freeze).
If a window is focused/selected that was set to a scope that is not the active scope, the active scope changes to that one. Updating all windows listening to that newly activated scope.

ScopeChange
This allows for having multiple assets open and active at once and easily switch between editing them.

Describe alternatives you've considered

There is also the 'Unreal engine' way, where we have windows that are nested in 'main asset' windows, and opening a asset for editing opens its own window. But this duplicates a lot of windows and is not very screen real-estate friendly.

Additional context

  1. Blender style Workspaces and being able to save and open groups of windows together (save a Viewport, a Bloackboard, and a Preview window set to the Material scope and save it as a "material editor" which can be opened in a new OS window). I think is a feature set that would work extremely well with this proposed window architecture, but is also something that is not core to it.
  2. This proposed system only applies to windows having to do with editing assets of course, so thngs like the Output window would remain unchanged.

Closing

Beyond the obvious issues this solution addresses, it also has the benefit of overall speeding up development and providing nicer UX by default as a whole because any improvement to one window benefits all assets. Such as improving drag and drop in the Outliner would benefit the Scene, UIPage, Skeleton and any other asset that uses it, without 'any' additional work.

With the editor rewrite underway it seemed like a good time to come back and 'formally' write up this proposal. Please give any thoughts on it or ask questions.
Thanks.

@MechWarrior99 MechWarrior99 added the enhancement New feature or request label Apr 22, 2024
@Eideren
Copy link
Collaborator

Eideren commented Apr 23, 2024

So, if you want to open a scene and a prefab alongside, you would have to lock your viewport, lock your outliner, then open a new viewport and outliner, and then open your asset ?

@MechWarrior99
Copy link
Contributor Author

MechWarrior99 commented Apr 23, 2024

If you mean have them both 'open'/loaded for editing, like how we have 'document tabs' now, then no you wouldn't. All open assets would be show in the UI, so they could be switched between easily.

One option would be to show all open assets in the system window bar with the save/build/buold and play/stop/etc. buttons.
Header
Another option would be to show them in the Outliner, having it act like an accordion control where when you select one it will be set as the active scope and expand to show its content. This is a screenshot from IO Interactive's Glaciar Engine which has a very similar system.
image

If you mean editing having windows side by side for the two different assets. You would have to lock one window, then select a different asset scope. The UX for this shouldn't be bad, we could have a button in each window's title bar or even a shortcut (like alt+click on the window title bar) to lock to the current scope.

@manio143
Copy link
Member

I think I would agree on the UX part that if you have multiple asset windows and a single Properties pane, by selecting a different asset window we should update whose properties are shown. This is similar to how in VS clicking on the Solution Explorer shows properties of the files, clicking on an open App.xaml editor shows properties of the app and clicking on a C# file editor shows no properties.

@MechWarrior99
Copy link
Contributor Author

So @Eideren and @manio143 I used Figma to throw together this little mockup example of the sort of behaviour I am talking about.
In it, you can see the Outliner window on the left has the open assets for editing. In the bottom is a Viewport window that is locked to showing graphics compositors, since one is open, it is being shown there right now.

Clicking on the GraphicsCompositor in the Outliner makes it the active document and updates the windows. Then selecting the MainScene switch back to that one.

stride-window-mockup.mp4

This isn't the most compelx senario or UI layout, but I hope it demonstrates the workflow of being able to switch between editing different assets quickly while respecting screenspace usage and keeping window implementation to a minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants