-
Notifications
You must be signed in to change notification settings - Fork 27
Improve web dashboard navigation #141
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
Conversation
<.link navigate={dashboard_path(@socket, @search)}> | ||
<.icon name="arrow-left" /> Back to the dashboard | ||
</.link> |
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.
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.
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
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.
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}") |
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.
Much nicer solution ❤️
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