Skip to content

Commit 4238933

Browse files
crbelausodarriba
andauthored
Improve dashboard for mobile devices (#108)
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]>
1 parent 00f8271 commit 4238933

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

lib/error_tracker/web/live/dashboard.html.heex

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<.form
22
for={@search_form}
33
id="search"
4-
class="mb-4 text-black grid grid-cols-4 gap-2"
4+
class="mb-4 text-black grid md:grid-cols-4 grid-cols-2 gap-2"
55
phx-change="search"
66
>
77
<input
@@ -46,10 +46,10 @@
4646
<table class="w-full text-sm text-left rtl:text-right text-gray-400 table-fixed">
4747
<thead class="text-xs uppercase bg-gray-900">
4848
<tr>
49-
<th scope="col" class="px-4 pr-2 py-3 w-128">Error</th>
49+
<th scope="col" class="px-4 pr-2 w-72">Error</th>
5050
<th scope="col" class="px-4 py-3 w-72">Occurrences</th>
5151
<th scope="col" class="px-4 py-3 w-28">Status</th>
52-
<th scope="col" class="px-4 py-3 w-32"></th>
52+
<th scope="col" class="px-4 py-3 w-28"></th>
5353
</tr>
5454
</thead>
5555
<tbody>
@@ -66,10 +66,13 @@
6666
<.link navigate={error_path(@socket, error)} class="absolute inset-1">
6767
<span class="sr-only">(<%= sanitize_module(error.kind) %>) <%= error.reason %></span>
6868
</.link>
69-
<p class="whitespace-nowrap text-ellipsis w-full overflow-hidden">
69+
<p class="whitespace-nowrap text-ellipsis overflow-hidden">
7070
(<%= sanitize_module(error.kind) %>) <%= error.reason %>
7171
</p>
72-
<p :if={ErrorTracker.Error.has_source_info?(error)} class="font-normal text-gray-400">
72+
<p
73+
:if={ErrorTracker.Error.has_source_info?(error)}
74+
class="whitespace-nowrap text-ellipsis overflow-hidden font-normal text-gray-400"
75+
>
7376
<%= sanitize_module(error.source_function) %>
7477
<br />
7578
<%= error.source_line %>

priv/static/app.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -893,10 +893,6 @@ select {
893893
width: 7rem;
894894
}
895895

896-
.w-32 {
897-
width: 8rem;
898-
}
899-
900896
.w-5 {
901897
width: 1.25rem;
902898
}
@@ -917,8 +913,8 @@ select {
917913
grid-template-columns: repeat(1, minmax(0, 1fr));
918914
}
919915

920-
.grid-cols-4 {
921-
grid-template-columns: repeat(4, minmax(0, 1fr));
916+
.grid-cols-2 {
917+
grid-template-columns: repeat(2, minmax(0, 1fr));
922918
}
923919

924920
.flex-col {

0 commit comments

Comments
 (0)