Skip to content

Show tabs for upcoming and past events on the events page#465

Open
mu-tsu-mi wants to merge 12 commits into
rubyaustralia:mainfrom
mu-tsu-mi:upcoming-and-past-events
Open

Show tabs for upcoming and past events on the events page#465
mu-tsu-mi wants to merge 12 commits into
rubyaustralia:mainfrom
mu-tsu-mi:upcoming-and-past-events

Conversation

@mu-tsu-mi
Copy link
Copy Markdown

I added upcoming and past events tabs for the Melbourne site. Please refer below and review this request.

  • Scope: Melbourne site

  • Change: Added upcoming and past events tabs and new controllers for these listings and test for the controllers. I didn't modify the model.

  • Reason of the change: Easier navigation to upcoming/past events compared to all events listing

  • The related issue is here: Showing separate events list for future and past events #463 (comment)

  • UI Screenshots:
    Upcoming Events Listing
    Screenshot 2026-05-23 at 5 50 40 pm

    Past Events Listing
    Screenshot 2026-05-23 at 5 50 52 pm

@mu-tsu-mi mu-tsu-mi requested a review from a team as a code owner May 24, 2026 01:38
Copilot AI review requested due to automatic review settings May 24, 2026 01:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds dedicated “Upcoming Events” and “Past Events” index pages for the Melbourne site, and updates navigation to point users to these pages.

Changes:

  • Added UpcomingEvents and PastEvents controllers with corresponding index views
  • Updated Melbourne routes to expose upcoming/past event listing endpoints
  • Added request specs (and a placeholder view spec) for the new pages, and updated the home page “All events” link target

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
sites/melbourne/spec/views/upcoming_events/index.html.erb_spec.rb Adds a view spec file (currently only a pending placeholder)
sites/melbourne/spec/requests/upcoming_events_spec.rb Adds request coverage for upcoming events index
sites/melbourne/spec/requests/past_events_spec.rb Adds request coverage for past events index
sites/melbourne/config/routes/melbourne.rb Adds routes for upcoming/past events pages
sites/melbourne/app/views/melbourne/upcoming_events/index.html.erb Introduces upcoming events index UI and link to past events
sites/melbourne/app/views/melbourne/past_events/index.html.erb Introduces past events index UI and link to upcoming events
sites/melbourne/app/views/melbourne/home/show.html.erb Updates “All events” CTA to point to upcoming events
sites/melbourne/app/controllers/upcoming_events_controller.rb Adds upcoming events controller action
sites/melbourne/app/controllers/past_events_controller.rb Adds past events controller action

Comment on lines +1 to +5
module Melbourne
class UpcomingEventsController < ApplicationController
def index
@events = Event.upcoming
end
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I didn't change this.

Comment on lines +1 to +5
module Melbourne
class PastEventsController < ApplicationController
def index
@events = Event.past
end
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, I didn't change this too.

Comment on lines +9 to +13
let(:events) { Melbourne::Event.upcoming }

before do
allow(Melbourne::Event).to receive(:upcoming).and_return(events)
end
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this by creating a list of events.

Comment on lines +9 to +13
let(:events) { Melbourne::Event.past }

before do
allow(Melbourne::Event).to receive(:past).and_return(events)
end
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed this by creating a list of events.

Comment on lines +10 to +14
get "/events/upcoming", to: "upcoming_events#index"
resources :upcoming_events, only: %i[index]

get "/events/past", to: "past_events#index"
resources :past_events, only: %i[index]
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed get "/events/upcoming", to: "upcoming_events#index" and am keeping resources. I'm not sure if I fixed this properly. Please let me know if there is a better way of handling this.

require 'rails_helper'

RSpec.describe "upcoming_events/index.html.erb", type: :view do
pending "add some examples to (or delete) #{__FILE__}"
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this test file.

@@ -42,7 +42,7 @@
</div>
<div>
<%= link_to "All events",
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't change this.

Comment on lines +4 to +7
<div class="font-bold py-2 border-b-3 border-b-[#0025CA] text-gray-500">Upcoming Events</div>
<div class="flex cursor-pointer rounded-md text-gray-500 hover:bg-[var(--code-off-white)] hover:text-gray-400">
<%= link_to "Past Events", melbourne_past_events_path, class:"px-8 py-2" %>
</div>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed styling so link_to has hover setting and cursor pointer.

Comment on lines +4 to +7
<div class="flex cursor-pointer rounded-md text-gray-500 hover:bg-[var(--code-off-white)] hover:text-gray-400">
<%= link_to "Upcoming Events", melbourne_upcoming_events_path, class:"px-8 py-2" %>
</div>
<div class="font-bold py-2 border-b-3 border-b-[#0025CA] text-gray-500">Past Events</div>
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this in the same manner as the issue above (i.e. upcoming view).

@leesheppard leesheppard linked an issue May 25, 2026 that may be closed by this pull request
@mu-tsu-mi
Copy link
Copy Markdown
Author

I left a comment for each copilot suggestion. Please review the changes.

Copy link
Copy Markdown
Contributor

@HashNotAdam HashNotAdam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much, @mu-tsu-mi, this is going to be extremely helpful to me when planning the upcoming meetups

@github-project-automation github-project-automation Bot moved this from Todo to Done in RubyAU Community PM May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Showing separate events list for future and past events

3 participants