From 437d4a8bfd169f1e7b90dcc3716297cb2cf63655 Mon Sep 17 00:00:00 2001 From: Manu Gurudath Date: Thu, 30 Oct 2025 06:28:07 +0000 Subject: [PATCH 01/11] Refactor invite links section in team overview to streamline UI and improve accessibility --- app/views/events/team.html.erb | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/app/views/events/team.html.erb b/app/views/events/team.html.erb index 3b579908b9..5432e3364d 100644 --- a/app/views/events/team.html.erb +++ b/app/views/events/team.html.erb @@ -25,20 +25,6 @@ <% end %> <% if policy(@event).can_invite_user? %> - - <%= link_to new_event_organizer_position_invite_path(event_id: @event.slug), class: "btn bg-success", data: { behavior: "modal_trigger", modal: "invite_member" }, disabled: !organizer_signed_in?(as: :manager) do %> <%= inline_icon "member-add" %> Invite @@ -186,20 +172,12 @@ <% if policy(@event).can_invite_user? %> -<% end %> - -<% if policy(@event).can_invite_user? %> - - <% end %> From 3ea5e98a2d6c6c21dbb3557777e2017f4c63ac2c Mon Sep 17 00:00:00 2001 From: Manu Gurudath Date: Thu, 30 Oct 2025 15:53:28 +0000 Subject: [PATCH 02/11] Improve invite link list appearance --- .../links/_link_list.html.erb | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/app/views/organizer_position_invite/links/_link_list.html.erb b/app/views/organizer_position_invite/links/_link_list.html.erb index d78809f178..0eee35b196 100644 --- a/app/views/organizer_position_invite/links/_link_list.html.erb +++ b/app/views/organizer_position_invite/links/_link_list.html.erb @@ -5,16 +5,29 @@ <% else %> From 4389882e50bb191e6751f273ab8361bc5a3e98c3 Mon Sep 17 00:00:00 2001 From: Manu Gurudath Date: Thu, 30 Oct 2025 17:45:10 +0000 Subject: [PATCH 03/11] fix invite links list style --- .../links/_link_list.html.erb | 76 +++++++++---------- 1 file changed, 37 insertions(+), 39 deletions(-) diff --git a/app/views/organizer_position_invite/links/_link_list.html.erb b/app/views/organizer_position_invite/links/_link_list.html.erb index 0eee35b196..21def857df 100644 --- a/app/views/organizer_position_invite/links/_link_list.html.erb +++ b/app/views/organizer_position_invite/links/_link_list.html.erb @@ -3,43 +3,41 @@ <% if invite_links.empty? %>

<%= event.name %> does not currently have any active invite links

<% else %> -
    - <% invite_links.each do |link| %> -
  • - -
    - <%= link_to link_url(link), class: "gap-1 my-0 font-bold flex items-center" do %> - <%= inline_icon "link", size: 24 %> - <%= link.hashid %> - <% end %> -

    - <%= link.created_at.strftime("%B %e, %Y") %> • - <%= user_mention link.creator %>• - Expires <%= distance_of_time_in_words(Time.now, link.expires_in.seconds.from_now) %> -

    -

    Used <%= pluralize(link.requests.size, "times") %>

    -
    -
    - <%= pop_icon_to "copy", - link_url(link), - class: "tooltipped", - data: { - clipboard_text: link_url(link), - }, - "aria-label": "Copy link to clipboard" %> - <%= pop_icon_to "delete", - deactivate_link_path(link), - class: "error tooltipped", - data: { - turbo_frame: "_top", - turbo_method: :post, - turbo_confirm: "Are you sure you want to deactivate this invite link?", - }, - "aria-label": "Deactivate invite link", - disabled: !policy(link).deactivate? %> -
    -
    -
  • - <% end %> -
+ <% invite_links.each do |link| %> +
+ +
+ <%= link_to link_url(link), class: "gap-1 my-0 font-bold flex items-center" do %> + <%= inline_icon "link", size: 24 %> + <%= link.hashid %> + <% end %> +

+ <%= link.created_at.strftime("%B %e, %Y") %> • + <%= user_mention link.creator %>• + Expires <%= distance_of_time_in_words(Time.now, link.expires_in.seconds.from_now) %> +

+

Used <%= pluralize(link.requests.size, "times") %>

+
+
+ <%= pop_icon_to "copy", + link_url(link), + class: "tooltipped", + data: { + clipboard_text: link_url(link), + }, + "aria-label": "Copy link to clipboard" %> + <%= pop_icon_to "delete", + deactivate_link_path(link), + class: "error tooltipped", + data: { + turbo_frame: "_top", + turbo_method: :post, + turbo_confirm: "Are you sure you want to deactivate this invite link?", + }, + "aria-label": "Deactivate invite link", + disabled: !policy(link).deactivate? %> +
+ +
+ <% end %> <% end %> From 6611e9fb37fa30f1b5ae0f0bbb0f5a9b0c4b2ebd Mon Sep 17 00:00:00 2001 From: Manu Gurudath Date: Thu, 30 Oct 2025 17:57:03 +0000 Subject: [PATCH 04/11] Rearrange items --- app/views/events/team.html.erb | 4 ++-- .../organizer_position_invite/links/_form.html.erb | 12 +++++++----- app/views/organizer_position_invites/_form.html.erb | 4 +--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/events/team.html.erb b/app/views/events/team.html.erb index 5432e3364d..54552926d0 100644 --- a/app/views/events/team.html.erb +++ b/app/views/events/team.html.erb @@ -173,11 +173,11 @@ <% end %> diff --git a/app/views/organizer_position_invite/links/_form.html.erb b/app/views/organizer_position_invite/links/_form.html.erb index 6bdfda053e..6dfcead257 100644 --- a/app/views/organizer_position_invite/links/_form.html.erb +++ b/app/views/organizer_position_invite/links/_form.html.erb @@ -1,10 +1,12 @@ <%# locals: (event:) %> <%= form_with(url: event_invite_links_path(event_id: event.id)) do |form| %> -
- <%= form.label :expires_at, "Expires on" %> - <%= form.date_field :expires_on, value: OrganizerPositionInvite::Link::DEFAULT_EXPIRATION.from_now.strftime("%Y-%m-%d") %> -
+
+
+ <%= form.label :expires_at, "Expires on" %> + <%= form.date_field :expires_on, class: "!max-w-full w-full", value: OrganizerPositionInvite::Link::DEFAULT_EXPIRATION.from_now.strftime("%Y-%m-%d") %> +
- <%= form.submit "Create", class: "btn" %> + <%= form.submit "Create", class: "btn" %> +
<% end %> diff --git a/app/views/organizer_position_invites/_form.html.erb b/app/views/organizer_position_invites/_form.html.erb index ee1e2d6148..643f0b1d19 100644 --- a/app/views/organizer_position_invites/_form.html.erb +++ b/app/views/organizer_position_invites/_form.html.erb @@ -2,10 +2,8 @@ <%= form_errors invite, "user" %>
- <%= form.label :email, class: "mb1" %> -
- <%= form.email_field :email, class: "mr1", "x-model": "email", placeholder: "fiona@hackclub.com" %> + <%= form.email_field :email, class: "!max-w-full w-full", "x-model": "email", placeholder: "Email address" %>