Redesign event show page layout and form with autoshow fields#1138
Redesign event show page layout and form with autoshow fields#1138
Conversation
Restructure event show page with centered header image, title (Lato font, green), date/time (Lato, dark navy, uppercase), and registration section. Add autoshow boolean fields for conditional display of event details. Add timezone-aware datetime display with user timezone support (PST default). Style register/deregister buttons with custom color (rgb(170,46,0)) and Telefon Bold font. Extract videoconference link into turbo-replaceable partial. Support up to 5 registration section instances for embedding in rich text. Add calendar link location/videoconference URL fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pre_title string column to events with its own migration. Update form with title card, pre-title field, and admin Display settings card. Show pre_title on event show page in Telefon Bold. Comment out header_image blob check in display_image pending rhino embed investigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| def set_time_zone_from_user | ||
| zone = ActiveSupport::TimeZone[current_user&.time_zone || "UTC"] | ||
| zone = ActiveSupport::TimeZone[current_user&.time_zone || "Pacific Time (US & Canada)"] |
There was a problem hiding this comment.
changing this so a public user sees events in PST by default.
| :autoshow_location, | ||
| :autoshow_videoconference_url, | ||
| :autoshow_cost, | ||
| :autoshow_title, |
There was a problem hiding this comment.
adding a bunch of booleans so admin can control which parts they do/don't want dynamically displaying on event show.
added rhino_header for "top" part of page
| end | ||
|
|
||
| desc_encoded = ERB::Util.url_encode(description) | ||
| location_encoded = ERB::Util.url_encode(cal_location.to_s) |
There was a problem hiding this comment.
add more data into the calendar links so they include the videoconf url and/or location
|
|
||
| # embeds returns ActiveStorage::Attached::Many; find first image blob | ||
| object.rhino_header.embeds.blobs.find { |blob| blob.image? } | ||
| end |
There was a problem hiding this comment.
this doesn't seem to be working yet.
| .rhino-centered table, | ||
| .rhino-centered pre { | ||
| text-align: left; | ||
| } |
There was a problem hiding this comment.
not sure where else to put this. rhino_header needs to be centered.
There was a problem hiding this comment.
What is this trying to do? The user should be able to handle alignment within the editor.
| background-color: rgb(170, 46, 0) !important; | ||
| color: white !important; | ||
| } | ||
|
|
There was a problem hiding this comment.
add custom register styling for show page
| file | ||
| elsif !icon_display && (file.is_a?(ActiveStorage::Blob) || file.is_a?(ActiveStorage::Attachment)) | ||
| file | ||
| end |
There was a problem hiding this comment.
trying to show a blob, which doesn't respond to same checks as AS attachment.
| <% (1..5).each do |i| %> | ||
| <%= turbo_stream.replace dom_id(@event, "registration_section_#{i}"), partial: "events/registration_section", locals: { event: @event.decorate, instance: i } %> | ||
| <% end %> | ||
| <%= turbo_stream.replace dom_id(@event, :videoconference_link), partial: "events/videoconference_link", locals: { event: @event.decorate } %> |
There was a problem hiding this comment.
update Join on Zoom to be linked to the videoconf url, if registered.
| placeholder: "e.g. Facilitator Training Series" | ||
| } %> | ||
| </div> | ||
| <div> |
There was a problem hiding this comment.
adding pre_title bc they add tagline-esque titles to their event titles
| <link rel="shortcut icon" type="image/png" href="<%= asset_path(favicon_file) %>"> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com"> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
| <link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap" rel="stylesheet"> |
There was a problem hiding this comment.
add lato google font.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Styled times format: full day/month names instead of abbreviated
- "Registration closes" instead of "Registration Close Date"
- "Join on {domain}" instead of "Join online"
- Remove "All times displayed in" assertions (text removed from show)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Redesign event show page layout and form with autoshow fields
Restructure event show page with centered header image, title (Lato font,
green), date/time (Lato, dark navy, uppercase), and registration section.
Add autoshow boolean fields for conditional display of event details.
Add timezone-aware datetime display with user timezone support (PST default).
Style register/deregister buttons with custom color (rgb(170,46,0)) and
Telefon Bold font. Extract videoconference link into turbo-replaceable partial.
Support up to 5 registration section instances for embedding in rich text.
Add calendar link location/videoconference URL fields.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add pre_title field and refine event form layout
Add pre_title string column to events with its own migration. Update form
with title card, pre-title field, and admin Display settings card. Show
pre_title on event show page in Telefon Bold. Comment out header_image
blob check in display_image pending rhino embed investigation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix Rubocop Omakase array bracket spacing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Update tests to match redesigned event show page
- Styled times format: full day/month names instead of abbreviated
- "Registration closes" instead of "Registration Close Date"
- "Join on {domain}" instead of "Join online"
- Remove "All times displayed in" assertions (text removed from show)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
What is the goal of this PR and why is this important?
Restructure event show page with centered header image, title (Lato font, green), date/time (Lato, dark navy, uppercase), and registration section. Add autoshow boolean fields for conditional display of event details. Add timezone-aware datetime display with user timezone support (PST default). Style register/deregister buttons with custom color (rgb(170,46,0)) and Telefon Bold font. Extract videoconference link into turbo-replaceable partial. Support up to 5 registration section instances for embedding in rich text. Add calendar link location/videoconference URL fields.
How did you approach the change?
Anything else to add?