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

Add back and forward support for app actions #294

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joey-grafana
Copy link
Collaborator

Fixes #34

@joey-grafana joey-grafana added area/ux issues related to UX, UI or research area/frontend labels Jan 17, 2025
@joey-grafana joey-grafana self-assigned this Jan 17, 2025
@joey-grafana joey-grafana marked this pull request as ready for review January 17, 2025 11:22
Copy link
Collaborator

@adrapereira adrapereira left a comment

Choose a reason for hiding this comment

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

Is manipulating the URL params manually the only option? It feels unintuitive and unsafe to me. I would guess that we can update the variables state or the scene state and let scenes automatically sync the state with the URL, propagating the changes as needed.

@joey-grafana
Copy link
Collaborator Author

Is manipulating the URL params manually the only option? It feels unintuitive and unsafe to me. I would guess that we can update the variables state or the scene state and let scenes automatically sync the state with the URL, propagating the changes as needed.

I thought it was already syncing the state with the url? I'm looking to add a historyStep and would love to have the url state handle that but I'm getting a bit confused with the differing scenes versions and the appropriate approach to accomplish this. I've seen an example in the docs of using the url-sync but also seen a comment that mentions using locationService.partial so not certain right now which approach is best.

@ifrost
Copy link
Collaborator

ifrost commented Jan 20, 2025

Have you tried grafana/scenes#878 (createBrowserHistorySteps)

Is manipulating the URL params manually the only option?

In explore-profiles instead of manipulating the URL we push the current one to the history. Not ideal but at least doesn't require manually building URL, but we're not on the latest scenes so cannot make use of it yet

@adrapereira
Copy link
Collaborator

Let's update scenes!

@adrapereira
Copy link
Collaborator

I'm really not a fan of manipulating the URL manually.
Can you look into these two scenes functions? These should provide a cleaner way to manage the history steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend area/ux issues related to UX, UI or research
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a pattern to let users navigate back
3 participants