Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/helpers/facilitator_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ def facilitator_profile_button(facilitator, size: 10)
class: "group inline-flex items-center gap-2 px-4 py-2
border border-primary text-primary rounded-lg
hover:bg-primary hover:text-white transition-colors duration-200
font-medium shadow-sm leading-none whitespace-nowrap w-60" do
font-medium shadow-sm leading-none whitespace-nowrap" do

facilitator = facilitator.decorate

# --- Avatar ---
avatar = if facilitator.avatar_image.present?
image_tag url_for(facilitator.avatar_image.file),
class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm"
class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm flex-shrink-0"
elsif facilitator.user&.avatar.present?
image_tag url_for(facilitator.user.avatar),
class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm"
class: "w-10 h-10 rounded-full object-cover border border-gray-300 shadow-sm flex-shrink-0"
else
image_tag "missing.png",
class: "w-10 h-10 rounded-full object-cover border border-dashed border-gray-300"
class: "w-10 h-10 rounded-full object-cover border border-dashed border-gray-300 flex-shrink-0"
end

# --- Name: stays one line & turns white on hover ---
name = content_tag(
:span,
facilitator.name.to_s.truncate(21),
title: facilitator.name.to_s,
class: "font-semibold text-gray-900 whitespace-nowrap group-hover:text-white"
class: "font-semibold text-gray-900 group-hover:text-white"
)

# --- Pronouns ---
Expand All @@ -40,7 +40,7 @@ def facilitator_profile_button(facilitator, size: 10)
text_block = content_tag(
:div,
safe_join([name, pronouns].compact),
class: "flex flex-col leading-tight text-left"
class: "flex flex-col leading-tight text-left min-w-0 "
)

avatar + text_block
Expand Down