Open garyvh2 opened 9 months ago
This issue is even more evident when the group is maximized but the visible panel is not active. If you click anywhere in the maximized panel (inactive), onDidLayoutChange gets triggered and the maximized state is exited.
https://github.com/mathuo/dockview/assets/118962418/59eb2a77-2ee4-46ca-b8bc-ab1da4a1d969
This issue is even more evident when the group is maximized but the visible panel is not active. If you click anywhere in the maximized panel (inactive), onDidLayoutChange gets triggered and the maximized state is exited.
Screen.Recording.2024-02-08.at.16.00.42.mov
This particular issue has been fixed in v1.10.0 - when a group is maximized it's automatically set as the active group
As for the fullscreen state not being persisted - it would require some non-trival code changes to get to work due the fact of having to store extra metadata in the persisted state.
I agree it's a feature that should exist and will look into it at some point in the near future.
Hi @mathuo. Is there an update on the maximized state persistence issue? I see v2.0.0. was released recently
Let me move this up the priority list since it's clearly a wanted feature. I will take a look, recorded here https://github.com/mathuo/dockview/issues/756
Describe the bug Fullscreen (or maximized) state, is not persisted when calling
api.toJSON
. Insteadthis.exitMaximizedView();
is called modifying the end users state.To Reproduce Codesandbox example
https://github.com/mathuo/dockview/assets/21265830/25e8f289-fa7b-4296-9d87-daed56e58d5c
Whenever there's a call to
onDidLayoutChange
we persist the user's layout state, withtoJSON()
so we store the layout structure on our end.When we added the Maximize feature we noticed that the when the
user maximizes the group
, and changes theactive tab
, the call totoJSON()
executed ononDidLayoutChange
causes the maximize state to be lost.Upon closer inspection on the library we noticed that
Additionally we noticed the comment on
And were wondering if there was a reason for such, we on our end wanted to persist the maximized state, as it's originated from a user interaction, so forcefully removing state is thought as a non expected behavior, but not sure if there was a deeper reason as to not persist such state on your end.
Expected behavior When the layout is persisted through
toJSON
method, the maximized state is persisted along the other components.Screenshots N/A
Desktop (please complete the following information):
all
all