Page MenuHomePhabricator

Filter event by country on Special:AllEvents
Closed, ResolvedPublic

Description

User story

As an organizer, I want the event countries to be searchable, filterable, and displayed in the Collaboration List, so that anyone who is interested can easily learn about events happening in a specific country.

As a contributor, I want to know which events are happening in a country where I live or plan to travel to (or take interest in), so that I can decide if I want to join it or learn more about it.

Design

country_filtering_1 (1).png (444×864 px, 21 KB)

Figma file

Acceptance Criteria:
  • Given that a user is on the Collaboration List (Special:AllEvents),
    • And the event is In person or Hybrid
      • Then the user should be able to filter for event country
        • Country should be placed next to participation options
        • Country should only be selectable for in person or hybrid events
      • Label should be "Country"
      • Label for the Select should default to 'All countries'
    • Filter should be disabled if user selects 'Online' as the participation option

Note: for the field to be displayed, you need CampaignEventsCountrySchemaMigrationStage to have the WRITE_NEW bit set (so, an overall value of MIGRATION_WRITE_BOTH is sufficient). Filtering will only work for events that are stored with a country code.

Event Timeline

cmelo renamed this task from Filer event by country on collaboration list on Special:AllEvents to Filter event by country on collaboration list on Special:AllEvents.
ifried renamed this task from Filter event by country on collaboration list on Special:AllEvents to Filter event by country on Special:AllEvents.Jun 30 2025, 9:36 PM

Change #1172654 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Add country filter to Special:AllEvents

https://gerrit.wikimedia.org/r/1172654

Change #1172665 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Reorder special:allevents parameters and variables to match form

https://gerrit.wikimedia.org/r/1172665

Change #1172672 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Update unit test to include country field

https://gerrit.wikimedia.org/r/1172672

@ifried

Filter should be disabled if user selects 'Online' as the participation option

Can you explain how you envision this working? we can do something in javascript to disable the field when "online" is selected, is that what you mean? What about for transclusion and if the user has JS disabled, should we just ignore the country field if "online" is selected?

Thanks

Change #1172654 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Add country filter to Special:AllEvents

https://gerrit.wikimedia.org/r/1172654

Change #1172665 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Reorder special:allevents parameters and variables to match form

https://gerrit.wikimedia.org/r/1172665

Change #1172672 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Update unit test to include country field

https://gerrit.wikimedia.org/r/1172672

Change #1173937 had a related patch set uploaded (by Mhorsey; author: Mhorsey):

[mediawiki/extensions/CampaignEvents@master] Disable country field when participation type "online" is selected

https://gerrit.wikimedia.org/r/1173937

Change #1173937 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] Disable country field when participation type "online" is selected

https://gerrit.wikimedia.org/r/1173937

Acceptance Criteria:
  • Given that a user is on the Collaboration List (Special:AllEvents),
    • And the event is In person or Hybrid
      • ✅ Then the user should be able to filter for event country
        • ✅ Country should be placed next to participation options
          Screenshot 2025-08-04 at 2.39.22 PM.png (1×2 px, 133 KB)
        • ✅ Country should only be selectable for in person or hybrid events
in personhybridonline
Screenshot 2025-08-04 at 2.42.21 PM.png (196×2 px, 29 KB)
Screenshot 2025-08-04 at 2.42.37 PM.png (180×2 px, 31 KB)
Screenshot 2025-08-04 at 2.43.05 PM.png (164×2 px, 30 KB)
  • ✅ Label should be "Country"
    Screenshot 2025-08-04 at 2.40.35 PM.png (156×1 px, 15 KB)
  • ✅ Label for the Select should default to 'All countries'
    Screenshot 2025-08-04 at 2.43.33 PM.png (158×1 px, 14 KB)

Working as expected, AC met, sending to design sign off.

Release and working as expected, so marking as done.