Skip to content

Commit

Permalink
Improve dashboard for mobile devices (#108)
Browse files Browse the repository at this point in the history
The error list page was not pretty on mobile. This fixes the error list
on mobile and closes #105

Co-authored-by: Óscar de Arriba <[email protected]>
  • Loading branch information
crbelaus and odarriba authored Nov 26, 2024
1 parent 00f8271 commit 4238933
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
13 changes: 8 additions & 5 deletions lib/error_tracker/web/live/dashboard.html.heex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<.form
for={@search_form}
id="search"
class="mb-4 text-black grid grid-cols-4 gap-2"
class="mb-4 text-black grid md:grid-cols-4 grid-cols-2 gap-2"
phx-change="search"
>
<input
Expand Down Expand Up @@ -46,10 +46,10 @@
<table class="w-full text-sm text-left rtl:text-right text-gray-400 table-fixed">
<thead class="text-xs uppercase bg-gray-900">
<tr>
<th scope="col" class="px-4 pr-2 py-3 w-128">Error</th>
<th scope="col" class="px-4 pr-2 w-72">Error</th>
<th scope="col" class="px-4 py-3 w-72">Occurrences</th>
<th scope="col" class="px-4 py-3 w-28">Status</th>
<th scope="col" class="px-4 py-3 w-32"></th>
<th scope="col" class="px-4 py-3 w-28"></th>
</tr>
</thead>
<tbody>
Expand All @@ -66,10 +66,13 @@
<.link navigate={error_path(@socket, error)} class="absolute inset-1">
<span class="sr-only">(<%= sanitize_module(error.kind) %>) <%= error.reason %></span>
</.link>
<p class="whitespace-nowrap text-ellipsis w-full overflow-hidden">
<p class="whitespace-nowrap text-ellipsis overflow-hidden">
(<%= sanitize_module(error.kind) %>) <%= error.reason %>
</p>
<p :if={ErrorTracker.Error.has_source_info?(error)} class="font-normal text-gray-400">
<p
:if={ErrorTracker.Error.has_source_info?(error)}
class="whitespace-nowrap text-ellipsis overflow-hidden font-normal text-gray-400"
>
<%= sanitize_module(error.source_function) %>
<br />
<%= error.source_line %>
Expand Down
8 changes: 2 additions & 6 deletions priv/static/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -893,10 +893,6 @@ select {
width: 7rem;
}

.w-32 {
width: 8rem;
}

.w-5 {
width: 1.25rem;
}
Expand All @@ -917,8 +913,8 @@ select {
grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
.grid-cols-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flex-col {
Expand Down

0 comments on commit 4238933

Please sign in to comment.