activist icon indicating copy to clipboard operation
activist copied to clipboard

Events filter state not persisted in URL for "days ahead" filter after page refresh

Open aasimsyed opened this issue 1 month ago • 3 comments

Terms

  • [x] I have searched all open bug reports
  • [x] I agree to follow activist's Code of Conduct

Behavior

Description

When the "days ahead" filter is applied on the Events page along with other filters and the page is refreshed, the active_on URL parameter is lost while other filter parameters persist. This causes the days ahead filter to reset to its default state, while event type and location type filters are maintained.

Steps to Reproduce

  1. Navigate to /events?view=list
  2. Open the left sidebar filters
  3. Select multiple filters:
    • Days ahead: Select "7 days"
    • Event type: Select "Action"
    • Location type: Select "Offline/In-person"
  4. Verify URL updates to include: active_on=<date>&type=action&setting=offline
  5. Refresh the page (F5 or CMD+R)

Expected Behavior

After page refresh:

  • URL should contain: active_on=<date>&type=action&setting=offline
  • All selected filter radio buttons should remain checked
  • Event results should be filtered by all three criteria

Actual Behavior

After page refresh:

  • URL shows only: type=action&setting=offline (missing active_on parameter)
  • "7 days" radio button is unchecked
  • Event results are filtered only by type and location, not by date
  • "Action" and "Offline" radio buttons remain checked

URL Before Refresh: http://localhost:3000/events?active_on=2025-10-31T16:14:59.136Z&type=action&setting=offline

URL After Refresh: http://localhost:3000/events?type=action&setting=offline

aasimsyed avatar Oct 24 '25 16:10 aasimsyed

I'll pick this up

OmkarSathish avatar Oct 25 '25 04:10 OmkarSathish

question: @andrewtavis what is the expected filter behavior for the "active_on" filter? Should clicking "7" days ahead only show me events exactly 7 days ahead or all events between now and 7 days ahead? I'm a bit confused with this filter.

Also, I believe there should be a way to clear the filters. Should that go into this issue or would it be a separate issue for a new feature?

cc: @OmkarSathish

aasimsyed avatar Nov 09 '25 23:11 aasimsyed

Hey @aasimsyed 👋 Maybe this is something to discuss for the UI. We want this to be everything within the next 7 days :) Can you think of a way of making this more clear? And yes, we also need a way to clear the filter, which ideally would be clicking the selection option again 😊

andrewtavis avatar Nov 11 '25 18:11 andrewtavis