Organizations Activity - Filtering
What does this MR do and why?
Follow up from !150020 (merged)
Work towards #415041 (closed)
Important: This change is behind a feature flag ui_for_organizations
This change adds filtering to the Activity page for Organizations. Currently we are bit limited to what we can filter on as this convention in the past used tabs. So for now we are using a single token Contribution Type which only supports 1 IN
selection at a time. Once the API is enhanced #442117 we will be able to further expand the filtering here.
Screenshots or screen recordings
Empty | Dropdown | Selected | History |
---|---|---|---|
How to set up and validate locally
Setup Organizations
important: You only need to do this in your GDK if you haven't yet!
- Access
rails c
- Enable Feature Flag
Feature.enable(:ui_for_organizations)
- Create the default organization and add root to it
you = User.find_by_username('root')
default_organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization_id: default_organization.id, user_id: you.id)
Testing
- Navigate to the GDK home page
ex: 127.0.0.1:3000/
- Click Organizations in the sidebar
- Click the Default Organization
- Click the Manage -> Activity in the sidebar
- Ensure results appear
- Try adding a contribution type filter
- Ensure it renders items and pagination works (Team filter usually has some data)
- Clear filters and ensure pagination still works
- Click a history entry and ensure that it works as it did in step 6
Edited by Zack Cuddy