Conversation
crbelaus
commented
Mar 27, 2025
crbelaus
commented
Mar 27, 2025
Comment on lines
+2
to
+4
| <.link navigate={dashboard_path(@socket, @search)}> | ||
| <.icon name="arrow-left" /> Back to the dashboard | ||
| </.link> |
Contributor
Author
There was a problem hiding this comment.
Previously we were triggering a full page reload when going back to the dashboard page. With this change we just do a LiveView navigation over the existing websocket connection.
This is faster and does not require negotiating a TLS handshake or reloading all static assets again.
This was referenced Mar 27, 2025
When navigating from the dashboard to the error detail page we now propagate the active filters so users can navigate back and fort without losing them.
This commit adds next/prev navigation links between occurrences. This can be used in addition to the occurrence selector which has been present since the beginning.
Since both the dashboard and the error page are in the same live_session we can navigate between them using LiveView navigation instead of triggering a full page reload. This is more efficient as we don't need to negotiate TLS and fetch assets again.
071e8f7 to
55c6994
Compare
odarriba
approved these changes
Mar 27, 2025
Contributor
odarriba
left a comment
There was a problem hiding this comment.
I'm not sure if it is better to save the filters in the user session instead of prepagate it through all URLs (specially if we have more routes in the future). But as for now it looks good to me! 🚀 🤌
| def error_path(socket = %Socket{}, %Error{id: id}, params \\ %{}) do | ||
| socket | ||
| |> dashboard_uri(params) | ||
| |> URI.append_path("/#{id}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request contains three improvements to the web dashboard navigation:
Closes Filter selection on index page is lost #136
Closes Quick navigation for bug occurrences #139
To test this:
iex dev.exs