Persistent UI during the session, panels positions are reset. #2354
Replies: 11 comments
-
@Bouh and @4ian |
Beta Was this translation helpful? Give feedback.
-
Yes sure you can no need to ask :) |
Beta Was this translation helpful? Give feedback.
-
@Bouh
WITH YARNWITH Npm
I also tried cleaning the npm cache and then installing it. But the command failed. |
Beta Was this translation helpful? Give feedback.
-
Use Node.js version 12 while we fix an issue with Node.js 14: #2122 |
Beta Was this translation helpful? Give feedback.
-
@4ian and @Bouh |
Beta Was this translation helpful? Give feedback.
-
@4ian and @Bouh So I went through the react mosaic code and found that the onRelease property can be used to get the latest split percentage and direction property. My imports Functions for onRelease
My PROBLEM Apart from these all, we also need to add state to the SceneEditor for each layer in my opinion as it will be responsible for holding the latest positions which we will pass in place of hardcoded with default values as currently used. Should I proceed with this solution? |
Beta Was this translation helpful? Give feedback.
-
Possibly, though maybe it's something to save not in the SceneEditor state, but in the preferences (much like how we persist the existing layout with So you seem on the right track :) But it's not an easy problem, you must see if there is a way to properly persist the information about where the editor window is, then see if you can set it back when it's opened. |
Beta Was this translation helpful? Give feedback.
-
I will try to solve the problem and let you know if I get into any trouble |
Beta Was this translation helpful? Give feedback.
-
@4ian |
Beta Was this translation helpful? Give feedback.
-
Yes indeed. So I'm not sure the problem is solvable easily, as the layout can have changed. Maybe we could offer a preference to change the default position/split percentage of each panel. Not sure what's the best to do to be honest. |
Beta Was this translation helpful? Give feedback.
-
In my opinion, the default opening is the best one as just by using
these properties alone, it is impossible to determine the exact position and location of the panels. We need to change the codebase and add a few more details to be able to solve the problem. This task also is easier said than solved. At the current moment, the maximum thing which I can do is to make the panels render with the direction and split percentage. |
Beta Was this translation helpful? Give feedback.
-
Description
Currently there is a persistent UI when we close and open GDevelop.
But the positions of panels isn't saved when an panel is hidden during the session.
A short example:
We open the layer panel, move the panel somewhere else, and close the panel.
The next time the panel is open, the default position is used.
Solution suggested
Use the lastest position of the panel.
Alternatives considered
No alternative.
To go further
The panels should be toggleable, with the button in the toolbar and with the shortcut.
Beta Was this translation helpful? Give feedback.
All reactions