Skip to content

Commit d03830f

Browse files
authored
fix(activity): Prevent long values from overflowing the Activity rail (#1239)
1 parent 04a250d commit d03830f

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

daiv/activity/templates/activity/_rail_context.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<h5 class="text-[11px] font-semibold uppercase tracking-wider text-gray-500">Context</h5>
44
<dl class="mt-3 space-y-1.5 text-sm">
55
<div class="flex justify-between gap-2">
6-
<dt class="text-gray-500">Repository</dt>
7-
<dd class="text-right text-gray-300">{{ activity.repo_id }}</dd>
6+
<dt class="shrink-0 text-gray-500">Repository</dt>
7+
<dd class="min-w-0 text-right text-gray-300 break-all">{{ activity.repo_id }}</dd>
88
</div>
99

1010
{% if activity.ref %}
1111
<div class="flex justify-between gap-2">
12-
<dt class="text-gray-500">Branch</dt>
13-
<dd class="text-right text-gray-300">{{ activity.ref }}</dd>
12+
<dt class="shrink-0 text-gray-500">Branch</dt>
13+
<dd class="min-w-0 text-right text-gray-300 break-all">{{ activity.ref }}</dd>
1414
</div>
1515
{% endif %}
1616

@@ -39,8 +39,8 @@ <h5 class="text-[11px] font-semibold uppercase tracking-wider text-gray-500">Con
3939

4040
{% if activity.scheduled_job %}
4141
<div class="flex justify-between gap-2">
42-
<dt class="text-gray-500">Schedule</dt>
43-
<dd class="text-right">
42+
<dt class="shrink-0 text-gray-500">Schedule</dt>
43+
<dd class="min-w-0 text-right break-words">
4444
{% if is_schedule_owner_or_admin %}
4545
<a href="{% url 'schedule_update' activity.scheduled_job.pk %}"
4646
class="text-blue-300 underline decoration-blue-500/40 hover:decoration-blue-400">
@@ -66,10 +66,10 @@ <h5 class="text-[11px] font-semibold uppercase tracking-wider text-gray-500">Con
6666

6767
{% if user.is_admin and activity.user and activity.user != user %}
6868
<div class="flex items-center justify-between gap-2">
69-
<dt class="text-gray-500">Owner</dt>
70-
<dd class="flex items-center justify-end gap-2 text-gray-300">
69+
<dt class="shrink-0 text-gray-500">Owner</dt>
70+
<dd class="flex min-w-0 items-center justify-end gap-2 text-gray-300">
7171
{% include "accounts/_avatar.html" with user=activity.user label="Owner" %}
72-
<span>{{ activity.user }}</span>
72+
<span class="break-all">{{ activity.user }}</span>
7373
</dd>
7474
</div>
7575
{% endif %}
@@ -82,19 +82,19 @@ <h5 class="text-[11px] font-semibold uppercase tracking-wider text-gray-500">Con
8282
{% endif %}
8383

8484
<div class="flex justify-between gap-2">
85-
<dt class="text-gray-500">Environment</dt>
86-
<dd class="text-right">
85+
<dt class="shrink-0 text-gray-500">Environment</dt>
86+
<dd class="min-w-0 text-right">
8787
{% if activity.sandbox_environment %}
8888
{% if can_edit_sandbox_environment %}
8989
<a href="{% url 'sandbox_envs:edit' activity.sandbox_environment.id %}"
90-
class="text-blue-300 underline decoration-blue-500/40 hover:decoration-blue-400">
90+
class="break-words text-blue-300 underline decoration-blue-500/40 hover:decoration-blue-400">
9191
{{ activity.sandbox_environment.name }}
9292
</a>
9393
{% else %}
94-
<span class="text-gray-300">{{ activity.sandbox_environment.name }}</span>
94+
<span class="break-words text-gray-300">{{ activity.sandbox_environment.name }}</span>
9595
{% endif %}
9696
{% if activity.sandbox_environment.short_summary %}
97-
<div class="text-xs text-gray-500">{{ activity.sandbox_environment.short_summary }}</div>
97+
<div class="break-all text-xs text-gray-500">{{ activity.sandbox_environment.short_summary }}</div>
9898
{% endif %}
9999
{% else %}
100100
<span class="italic text-gray-500">{% translate "(deleted)" %}</span>

0 commit comments

Comments
 (0)