From c7db874129abbb6b6165070234c64c6f4b257059 Mon Sep 17 00:00:00 2001 From: Alan Soto Date: Thu, 5 Sep 2024 12:38:11 -0600 Subject: [PATCH 1/4] Update twitter logo --- app/assets/images/twitter.svg | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/app/assets/images/twitter.svg b/app/assets/images/twitter.svg index 85f85c3f..62689191 100644 --- a/app/assets/images/twitter.svg +++ b/app/assets/images/twitter.svg @@ -1,12 +1,8 @@ - - - - - - - + + + + + + From 64d052327ea9809bb6ea99e061986774a10d3777 Mon Sep 17 00:00:00 2001 From: Alan Soto Date: Thu, 5 Sep 2024 17:04:08 -0600 Subject: [PATCH 2/4] Make the last session card sticky --- app/views/schedules/show.html.erb | 8 ++++++-- app/views/sessions/_card.html.erb | 15 +++++++++++---- app/views/sessions/index.html.erb | 10 +++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/views/schedules/show.html.erb b/app/views/schedules/show.html.erb index dd21985e..629645dd 100644 --- a/app/views/schedules/show.html.erb +++ b/app/views/schedules/show.html.erb @@ -10,10 +10,12 @@ <%= render partial: 'sessions/filters', locals: { resource: :schedule } %> -
+
<% if @sessions.present? %> <% previous_date = nil %> - <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> + <% grouped_sessions = @sessions.group_by(&:starts_at) %> + + <% grouped_sessions.each do |starts_at, sessions| %> <%= content_tag( :div, class: [ @@ -41,11 +43,13 @@ session: session, user_is_an_attendee: true, id_prefix: "schedule", + last_session: grouped_sessions.keys.last == starts_at && sessions.last == session } ) %> <% end %> <% previous_date = starts_at.to_date %> <% end %> +
<% elsif params[:starts_at].present? || session_filter_params.present? %>

No sessions match your current filters

diff --git a/app/views/sessions/_card.html.erb b/app/views/sessions/_card.html.erb index 7b9240a2..2d871181 100644 --- a/app/views/sessions/_card.html.erb +++ b/app/views/sessions/_card.html.erb @@ -1,7 +1,14 @@ -<%# locals: (session:, user_is_an_attendee:, id_prefix: nil) %> +<%# locals: (session:, user_is_an_attendee:, id_prefix: nil, last_session: false) %> -
- +<%= content_tag( + :div, + id: dom_id(session, id_prefix), + class: [ + "relative flex flex-col w-full p-5 mb-4 bg-white rounded-[20px]", + "sticky top-[329px]": last_session && session_filter_params.present?, + "sticky top-[296px]": last_session && session_filter_params.blank? + ] +) do %> <%= render partial: "sessions/status", locals: { session: session } %> @@ -73,4 +80,4 @@ <%= session.location&.name %>
-
+<% end %> diff --git a/app/views/sessions/index.html.erb b/app/views/sessions/index.html.erb index 32769a42..0da8bdb6 100644 --- a/app/views/sessions/index.html.erb +++ b/app/views/sessions/index.html.erb @@ -10,10 +10,12 @@ <%= render partial: 'sessions/filters', locals: { resource: :sessions } %>
-
+
<% if @sessions.present? %> <% previous_date = nil %> - <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> + <% grouped_sessions = @sessions.group_by(&:starts_at) %> + + <% grouped_sessions.each do |starts_at, sessions| %> <%= content_tag( :div, class: [ @@ -39,12 +41,14 @@ partial: 'sessions/card', locals: { session: session, - user_is_an_attendee: @user_session_ids&.include?(session.id) + user_is_an_attendee: @user_session_ids&.include?(session.id), + last_session: grouped_sessions.keys.last == starts_at && sessions.last == session } ) %> <% end %> <% previous_date = starts_at.to_date %> <% end %> +
<% elsif params[:starts_at].present? || session_filter_params.present? %>

No sessions match your current filters

From 5d2e9542977b73d813d7aec51b03e8be357344b9 Mon Sep 17 00:00:00 2001 From: Alan Soto Date: Tue, 10 Sep 2024 14:41:12 -0600 Subject: [PATCH 3/4] Revert make the last session card sticky --- app/views/schedules/show.html.erb | 9 +++------ app/views/sessions/_card.html.erb | 14 ++++---------- app/views/sessions/index.html.erb | 9 +++------ 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/app/views/schedules/show.html.erb b/app/views/schedules/show.html.erb index 629645dd..3d6acff3 100644 --- a/app/views/schedules/show.html.erb +++ b/app/views/schedules/show.html.erb @@ -10,12 +10,11 @@ <%= render partial: 'sessions/filters', locals: { resource: :schedule } %>
-
+
<% if @sessions.present? %> <% previous_date = nil %> - <% grouped_sessions = @sessions.group_by(&:starts_at) %> - <% grouped_sessions.each do |starts_at, sessions| %> + <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> <%= content_tag( :div, class: [ @@ -42,14 +41,12 @@ locals: { session: session, user_is_an_attendee: true, - id_prefix: "schedule", - last_session: grouped_sessions.keys.last == starts_at && sessions.last == session + id_prefix: "schedule" } ) %> <% end %> <% previous_date = starts_at.to_date %> <% end %> -
<% elsif params[:starts_at].present? || session_filter_params.present? %>

No sessions match your current filters

diff --git a/app/views/sessions/_card.html.erb b/app/views/sessions/_card.html.erb index 2d871181..168fbb78 100644 --- a/app/views/sessions/_card.html.erb +++ b/app/views/sessions/_card.html.erb @@ -1,14 +1,7 @@ <%# locals: (session:, user_is_an_attendee:, id_prefix: nil, last_session: false) %> -<%= content_tag( - :div, - id: dom_id(session, id_prefix), - class: [ - "relative flex flex-col w-full p-5 mb-4 bg-white rounded-[20px]", - "sticky top-[329px]": last_session && session_filter_params.present?, - "sticky top-[296px]": last_session && session_filter_params.blank? - ] -) do %> +
+ <%= render partial: "sessions/status", locals: { session: session } %> @@ -80,4 +73,5 @@ <%= session.location&.name %>
-<% end %> +
+ diff --git a/app/views/sessions/index.html.erb b/app/views/sessions/index.html.erb index 0da8bdb6..0b8e3b92 100644 --- a/app/views/sessions/index.html.erb +++ b/app/views/sessions/index.html.erb @@ -10,12 +10,11 @@ <%= render partial: 'sessions/filters', locals: { resource: :sessions } %>
-
+
<% if @sessions.present? %> <% previous_date = nil %> - <% grouped_sessions = @sessions.group_by(&:starts_at) %> - <% grouped_sessions.each do |starts_at, sessions| %> + <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> <%= content_tag( :div, class: [ @@ -41,14 +40,12 @@ partial: 'sessions/card', locals: { session: session, - user_is_an_attendee: @user_session_ids&.include?(session.id), - last_session: grouped_sessions.keys.last == starts_at && sessions.last == session + user_is_an_attendee: @user_session_ids&.include?(session.id) } ) %> <% end %> <% previous_date = starts_at.to_date %> <% end %> -
<% elsif params[:starts_at].present? || session_filter_params.present? %>

No sessions match your current filters

From db89e6b81803f6efa17382627208ac7ab94d24d3 Mon Sep 17 00:00:00 2001 From: Alan Soto Date: Tue, 10 Sep 2024 15:28:59 -0600 Subject: [PATCH 4/4] Add mb based on viewport height --- app/views/schedules/show.html.erb | 3 +-- app/views/sessions/_card.html.erb | 3 +-- app/views/sessions/index.html.erb | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/views/schedules/show.html.erb b/app/views/schedules/show.html.erb index 3d6acff3..ee1f0c3f 100644 --- a/app/views/schedules/show.html.erb +++ b/app/views/schedules/show.html.erb @@ -10,10 +10,9 @@ <%= render partial: 'sessions/filters', locals: { resource: :schedule } %>
-
+
<% if @sessions.present? %> <% previous_date = nil %> - <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> <%= content_tag( :div, diff --git a/app/views/sessions/_card.html.erb b/app/views/sessions/_card.html.erb index 168fbb78..7b9240a2 100644 --- a/app/views/sessions/_card.html.erb +++ b/app/views/sessions/_card.html.erb @@ -1,4 +1,4 @@ -<%# locals: (session:, user_is_an_attendee:, id_prefix: nil, last_session: false) %> +<%# locals: (session:, user_is_an_attendee:, id_prefix: nil) %>
@@ -74,4 +74,3 @@
- diff --git a/app/views/sessions/index.html.erb b/app/views/sessions/index.html.erb index 0b8e3b92..cb1ee975 100644 --- a/app/views/sessions/index.html.erb +++ b/app/views/sessions/index.html.erb @@ -10,10 +10,9 @@ <%= render partial: 'sessions/filters', locals: { resource: :sessions } %>
-
+
<% if @sessions.present? %> <% previous_date = nil %> - <% @sessions.group_by(&:starts_at).each do |starts_at, sessions| %> <%= content_tag( :div,