Task summary
Display an active filter counter badge with singular/plural formatting and add a 1-tap "Clear all" action in the Section Directory.
Estimated scope / difficulty
Starter (1 to 2 hours)
Motivation and context
When searching for section members by batch, role, or profile tags, students currently have no visual indicator showing how many filters are active, and have to manually toggle each filter off one by one.
Relevant files and code pointers
src/pages/app/SectionDirectoryPage.tsx
tests/unit/components.test.tsx
Acceptance criteria
Implementation guide and hints
Look at the filter state declarations in src/pages/app/SectionDirectoryPage.tsx. Derive activeFilterCount as a computed constant from existing state variables.
Task summary
Display an active filter counter badge with singular/plural formatting and add a 1-tap "Clear all" action in the Section Directory.
Estimated scope / difficulty
Starter (1 to 2 hours)
Motivation and context
When searching for section members by batch, role, or profile tags, students currently have no visual indicator showing how many filters are active, and have to manually toggle each filter off one by one.
Relevant files and code pointers
src/pages/app/SectionDirectoryPage.tsxtests/unit/components.test.tsxAcceptance criteria
selectedBatch !== 'all'-> +1selectedRole !== 'all'-> +1selectedTags.length-> +NBatch 1+CR+Hosteller= 3 active filters)selectedBatch = 'all',selectedRole = 'all',selectedTags = []).npm testandnpm run lintpass with 0 errors.Implementation guide and hints
Look at the filter state declarations in
src/pages/app/SectionDirectoryPage.tsx. DeriveactiveFilterCountas a computed constant from existing state variables.