-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
feat: remember pane sizes #2556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're using this AppPaneLayout
for many pages. And we should remember pane sizes for every page separately. Your implementation is just remembering globally. So, whenever we change pane size it affects all the pages wherever we use the PaneLayout
.
Instead of doing it globally we can get the layout-id
as prop from the parent component. And use that prop as a prefix to define keys. Also, don't use localStorage
directly to the component. We already have the implementation to store values in localpersistence.ts
file. You can use that function to store.
879a01d
to
f6f3f38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still have the same issue. the default value is getting applied to every page if there's no layout-id
. Instead of doing that way just do not store/restore values if there's no layout-id
. And go with the default values.
27f435e
to
6b12660
Compare
@AndrewBastin, it seems okay to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more changes are required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems okay to me. @AndrewBastin @liyasthomas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor variable naming scheme corrections.
Also, this is only implemented for documentation.vue as of right now, other pages should also implement this thing.
(note to reviewer: @anwarulislam make sure you check variable naming schemes on your reviews as well)
Noted! |
bb2d0d8
to
de7d30d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 💯
@liyasthomas a final round of checks and you can merge it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
Closes #2456
Description
Save the different pane sizes (for instance, in local storage) in order to restore the visual configuration the next time the app is opened
Checks
Additional Information