Skip to content

Keep record of unwinded containers on page refresh - #581

Merged
beorn7 merged 3 commits into
prometheus:masterfrom
ResamVi:master
Oct 17, 2023
Merged

beorn7 merged 3 commits into
prometheus:masterfrom
ResamVi:master

Conversation

@ResamVi

@ResamVi ResamVi commented Oct 2, 2023

Copy link
Copy Markdown
Contributor

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 <julien.midedji@gmail.com>
@ResamVi

ResamVi commented Oct 2, 2023

Copy link
Copy Markdown
Contributor Author

@beorn7 would you have a look?

@beorn7

beorn7 commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

On my list.

@beorn7

beorn7 commented Oct 8, 2023

Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Julien Midedji <julien.midedji@gmail.com>
@ResamVi

ResamVi commented Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

You're right, I replaced it with sessionStorage now

@beorn7 beorn7 left a comment

Copy link
Copy Markdown
Contributor

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 <julien.midedji@gmail.com>
@ResamVi

ResamVi commented Oct 16, 2023 •

Copy link
Copy Markdown
Contributor Author

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 🙂

@beorn7 beorn7 left a comment

Copy link
Copy Markdown
Contributor

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
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

⌂ 换网址