Skip to content

Commit 5adbc07

Browse files
authored
Home page tweaks (#11933)
Since we're planning to release the home page publicly, it's essential we make some minor changes to the UI to ensure it looks great! Here's what changed: * Renamed Graphs → Insights * Added links and border to Total raised/Total spent heading to make it look less empty * <img width="451" height="327" alt="image" src="https://github.com/user-attachments/assets/7b770a53-e80a-4f70-977e-5a7d343841f9" /> * Removed inconsistent background from "All time" button on light mode * Adjusted padding/margin in card titles * Fixed center adjustment for top tags/top merchants empty states * Fixed line breaks for empty states so it looks even
1 parent 9241c20 commit 5adbc07

File tree

8 files changed

+29
-18
lines changed

8 files changed

+29
-18
lines changed

app/views/events/home/_categories_chart.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
It's quiet here...
1212
</h3>
1313
<p class="text-gray-500 my-1">
14-
Categories will appear here as you spend more money
14+
Categories will appear here<br>as you spend more money
1515
</p>
1616
</div>
1717
<% end %>

app/views/events/home/_merchants_chart.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
It's quiet here...
1313
</h3>
1414
<p class="text-gray-500 my-1">
15-
Merchants will appear here as you spend more money
15+
Merchants will appear here<br>as you spend more money
1616
</p>
1717
</div>
1818
<% end %>
Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
1-
<div class="card card--breakdown shadow-none p-4 flex flex-1 flex-col gap-4 justify-center">
2-
<div class="stat stat--small flex flex-col">
1+
<div class="card card--breakdown shadow-none p-4 flex flex-1 flex-col gap-4 justify-center sm:items-center">
2+
<div class="stat stat--small flex flex-col sm:items-center">
33
<span class="muted uppercase text-sm" style="font-weight: 700">Total raised</span>
4-
<span class="stat__value"><%= render_money_amount @event.total_raised %></span>
4+
<span class="stat__value -mb-2"><%= render_money_amount @event.total_raised %></span>
55
</div>
6-
<div class="stat stat--small flex flex-col">
6+
<%= link_to event_transactions_path(@event), class: "flex items-center shrink-0 no-underline -mr-2" do %>
7+
See transactions
8+
<%= inline_icon "view-forward" %>
9+
<% end %>
10+
11+
<div class="menu__divider w-full my-5"></div>
12+
13+
<div class="stat stat--small flex flex-col sm:items-center">
714
<span class="muted uppercase text-sm" style="font-weight: 700">Total spent</span>
8-
<span class="stat__value"><%= render_money_amount @event.total_spent_cents %></span>
15+
<span class="stat__value -mb-2"><%= render_money_amount @event.total_spent_cents %></span>
916
</div>
17+
<%= link_to event_transactions_path(@event), class: "flex items-center shrink-0 no-underline -mr-2" do %>
18+
See transactions
19+
<%= inline_icon "view-forward" %>
20+
<% end %>
1021
</div>

app/views/events/home/_recent_activity.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<% if @activities.length > 0 %>
33
<div class="card card--breakdown relative shadow-none flex-1 flex flex-col p-0" style="height: <%= 67.7 * 5 %>px">
44
<div style="position: absolute; bottom: 0; left: 0; height: 100px; width: 100%; background: linear-gradient(transparent, var(--card-bg)); pointer-events: none; z-index: 1"></div>
5-
<div class="flex items-center p-2 pl-0 sm:p-4 mt-auto justify-between">
5+
<div class="flex items-center p-2 pl-0 pt-4 sm:p-4 mt-auto justify-between">
66
<h3 class="m-0">Recent activity</h3>
77
<%= link_to edit_event_path(@event, tab: "audit_log"), class: "flex items-center shrink-0 no-underline" do %>
88
See all
@@ -15,7 +15,7 @@
1515
<i class="muted">Nothing has happened recently.</i>
1616
</p>
1717
<% end %>
18-
<ul class="list-reset comments w-100 my-0 pb-2 p-4 pt-1 flex-1">
18+
<ul class="list-reset comments w-100 my-0 pb-2 p-4 pt-0 -mt-2 flex-1">
1919
<%= render_activities(@activities.reject { |activity| activity.trackable.nil? && !activity.trackable_is_deletable? }) %>
2020
</ul>
2121
</div>

app/views/events/home/_tags_chart.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%= turbo_frame_tag "tags" do %>
2-
<div id="tags-chart">
2+
<div id="tags-chart" style="height: 100%">
33
<% if tags.empty? %>
4-
<div class="flex flex-1 flex-col items-center justify-center">
4+
<div class="flex flex-1 flex-col items-center justify-center" style="height: 100%">
55
<div class="text-center">
66
<h3 class="text-2xl font-bold mb-0">
77
It's quiet here...

app/views/events/home/_team.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<% if @organizers.any? %>
22
<div class="card card--breakdown shadow-none flex flex-col p-0 pb-4 sm:h-[150px]" style="height:auto">
3-
<div class="p-2 pl-0 sm:p-4 flex items-center justify-between">
3+
<div class="p-2 pl-0 pt-4 sm:p-4 flex items-center justify-between">
44
<h3 class="m-0">Team members</h3>
55
<%= link_to event_team_path(@event), class: "flex items-center shrink-0 no-underline" do %>
66
See all
77
<%= inline_icon "view-forward" %>
88
<% end %>
99
</div>
10-
<div class="flex gap-3 w-full w-100 py-2 sm:pt-0 px-4 avatar-row avatar-row--no-transform" style="padding-left: 25px">
10+
<div class="flex gap-3 w-full w-100 py-2 sm:pt-0 -mt-1 px-4 avatar-row avatar-row--no-transform" style="padding-left: 25px">
1111
<% @organizers.first(@organizers.length == 12 ? 12 : 11).each do |position| %>
1212
<div style="transform:none" class="avatar-grow line-height-0 tooltipped tooltipped--e" aria-label="<%= position.user == current_user ? current_user_flavor_text.sample : position.user.name %>">
1313
<%= avatar_for position.user, size: 40, style: "margin-left: -10px" %>

app/views/events/home/_users_chart.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<%= turbo_frame_tag "users" do %>
2-
<div id="users-chart">
2+
<div id="users-chart" style="height: 100%">
33
<% if users.empty? %>
4-
<div class="flex flex-1 flex-col items-center justify-center">
4+
<div class="flex flex-1 flex-col items-center justify-center" style="height: 100%">
55
<div class="text-center">
66
<h3 class="text-2xl font-bold mb-0">
77
Not enough data

app/views/events/show.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@
109109
<% end %>
110110
</div>
111111

112-
<div class="flex justify-between items-center mb-2">
113-
<h2>Graphs</h2>
112+
<div class="flex justify-between items-center mb-2 mt-10">
113+
<h2 class="my-0">Insights</h2>
114114
<% if @event.created_at < 1.week.ago %>
115115
<div data-controller="menu" data-menu-append-to-value="#tags-chart">
116116
<button
117-
class="homepage-eyebrow mt0 mb0 border-0 bg-white dark:bg-dark flex items-center cursor-pointer"
117+
class="whitespace-nowrap homepage-eyebrow my-0 border-0 bg-transparent flex items-center cursor-pointer"
118118
data-action="menu#toggle click@document->menu#close keydown@document->menu#keydown"
119119
data-menu-target="toggle">
120120
<span data-event-home-target="button">All time</span>

0 commit comments

Comments
 (0)