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

Keep record of unwinded containers on page refresh #581

Merged
merged 3 commits into from
Oct 17, 2023

Conversation

ResamVi
Copy link
Contributor

@ResamVi ResamVi commented Oct 2, 2023

The solution retains a record of the currently un-collapsed container and unwinds it on a page refresh.
No extra refresh button and no live-update.

The minor inconvenience of this solution is that on a page refresh the unwind animation plays.

Screencast.from.2023-10-02.18-40-31.webm

Helps #568

The solution retains a record of the currently un-collapsed container and unwinds it on a page refresh. No extra refresh button and no live-update.
The minor inconvenience of this solution is that on a page refresh the unwind animation plays.

Helps prometheus#568

Signed-off-by: Julien Midedji <[email protected]>
@ResamVi
Copy link
Contributor Author

ResamVi commented Oct 2, 2023

@beorn7 would you have a look?

@beorn7
Copy link
Member

beorn7 commented Oct 3, 2023

On my list.

@beorn7
Copy link
Member

beorn7 commented Oct 8, 2023

I think this is quite good for a start.

But maybe we should use the session storage rather than the local storage? A user might open different windows with different views on the same PGW. Also, it might confusing if you come back to the PGW UI after some time and get elements expanded because they are still persisted in your local storage. You might also get garbage left behind, maybe even leading to multiple elements getting expanded on reload.

@ResamVi
Copy link
Contributor Author

ResamVi commented Oct 9, 2023

You're right, I replaced it with sessionStorage now

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I think this will work as intended.

However, you need to run make assets and commit the results to bake the changes into the Go binary.

Signed-off-by: Julien Midedji <[email protected]>
@ResamVi
Copy link
Contributor Author

ResamVi commented Oct 16, 2023

However, you need to run make assets and commit the results to bake the changes into the Go binary.

Alright, done.

Thanks, I appreciate the guidance and your time in reviewing this 🙂

Copy link
Member

@beorn7 beorn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much.

@beorn7 beorn7 merged commit e3409b1 into prometheus:master Oct 17, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants