rubyvideo icon indicating copy to clipboard operation
rubyvideo copied to clipboard

add event page

Open dedemenezes opened this issue 2 years ago β€’ 4 comments

This PR implements an events#show page as discussed.

Close #7

The page added has the same structure as the speakers#show. What I'm adding:

  1. System test for the events#show, ensuring you can see the event name and talks for the event.
  2. Event show page, displaying all talks to the specific event using pagination.
  3. Link to events#show on the talks/card partial.

What I'm missing:

  1. The back link on talks#show always take the user back to a speakers#show, at the moment it redirect to the first speaker for each talk. I see there is a PR trying to fix it (#26), so I was not sure if I should do it her.
  2. The about information for the event is actually coming from the organisation as mentioned in #37. This means that the events#edit is buggy and that's why I kept the edit button as a dead link. Should I remove the button while there is no edit action?
  3. The list of speakers is quite big. Should be fixed by #28

Here is a printscreen how it looks like atm πŸ‘‡ localhost_3000_events_rails-conf-2012

dedemenezes avatar Jun 29 '23 18:06 dedemenezes

Thanks this looks very cool and thanks for identifying the various blockers from the ongoing works. Will test it right away

adrienpoly avatar Jun 29 '23 19:06 adrienpoly

Are we missing something here? Is there anything we can help you with @dedemenezes?

marcoroth avatar Aug 07 '24 12:08 marcoroth

Hey @adrienpoly and @marcoroth ✌️ I would love to fix the conflicts and make any adjustments that you think are needed. Probably I won't be able to make it this week because I'm moving but I'm fully available next week to work on this too.

dedemenezes avatar Aug 07 '24 14:08 dedemenezes

yes that would be great also last I looked, it would be great to also have an index page in addition to the show page

adrienpoly avatar Aug 07 '24 14:08 adrienpoly

Hey @adrienpoly and @marcoroth, I'm working on this PR this week and I'm wondering how to display the list of events (events#index).

Considering there are no images or thumbnails associated with events, organizing them like in speakers#index might be more suitable. We can display the list with the number of talks for each event. What do you think?

dedemenezes avatar Aug 20 '24 15:08 dedemenezes

Hey @dedemenezes, I think it would be helpful to just have a list somewhere, we can always iterate on the design/features.

But as you say, a list of all the events with the number of talks sounds great to me!

marcoroth avatar Aug 20 '24 16:08 marcoroth

This look great, thank you @dedemenezes!

The only feedback I have is that it might be a bit hard to find the event you are looking for in that big list, maybe it might make sense to group them by organization? Something like this maybe?

CleanShot 2024-08-21 at 13 39 03

  <% @events.group_by(&:organisation).each do |organisation, events| %>
    <h2><%= organisation.name %></h2>

    <div id="<%= dom_id(organisation, "events") %>" class="grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-x-8 lg:gap-x-12 gap-y-2 min-w-full py-8">
      <%= render events %>
    </div>
  <% end %>
The Before (For reference)

CleanShot 2024-08-21 at 13 40 22

marcoroth avatar Aug 21 '24 11:08 marcoroth

Thank you, @marcoroth ✌️

I agree with youβ€”it makes a lot of sense since they are already associated. Thank you for the insight. I'll make the adjustments and push the new version.

Also, if you have any feedback on the code itself, please let me know, as this is my first contribution to an open-source project.

dedemenezes avatar Aug 21 '24 14:08 dedemenezes

Thank you for the commits you did removing duplicate links and fixing lint errors @adrienpoly. The only thing I changed addressing @marcoroth suggestion was the padding between elements: py-8 => py-4 pb-8.

dedemenezes avatar Aug 21 '24 14:08 dedemenezes

Awesome @dedemenezes, thank you, even better! πŸ™ŒπŸΌ

marcoroth avatar Aug 21 '24 16:08 marcoroth

@dedemenezes Thanks for this great addition. I have done some slight optimisations mostly to remove the n+1 :

  • eager load the organisation
  • add a counter_cache for the talks_count

This way the page loads much faster

adrienpoly avatar Aug 22 '24 04:08 adrienpoly

Thanks for the contribution @dedemenezes! πŸŽ‰

marcoroth avatar Aug 22 '24 16:08 marcoroth

Thank you both for the help on this <3 I'll take a look into the code and issues to see how can I contribute more this project!

dedemenezes avatar Aug 22 '24 19:08 dedemenezes