Skip to content

79 feat projects order and filter buttons#92

Open
Rafetikus wants to merge 4 commits intomainfrom
79-feat-projects-order-and-filter-buttons
Open

79 feat projects order and filter buttons#92
Rafetikus wants to merge 4 commits intomainfrom
79-feat-projects-order-and-filter-buttons

Conversation

@Rafetikus
Copy link
Copy Markdown
Member

@Rafetikus Rafetikus commented Apr 20, 2026

This pull request significantly enhances the filtering, sorting, and user experience of the ProjectsListPage component. The changes introduce support for multiple URL-based filters (such as access, lead, member, date, and favorites), add sorting options, and improve the empty state messaging to better reflect the user's filter selections.

Filtering and Sorting Improvements:

  • Added parsing of URL search parameters to support filtering projects by access type (private/public), project lead, members, creation date, favorites, and "my projects only". These filters are now applied in sequence to the project list. [1] [2]
  • Implemented robust sorting logic for projects, allowing sorting by name, creation date, member count, and manual order, with both ascending and descending directions.

User Experience Enhancements:

  • Improved the empty state message: now displays "No projects match the selected filters." if any filters are active and no projects are found, otherwise shows "No projects yet."
  • Simplified the logic for closing the "create project" modal by directly manipulating the search parameters, improving code clarity.

Authentication Context Usage:

Copilot AI review requested due to automatic review settings April 20, 2026 09:14
@Rafetikus Rafetikus linked an issue Apr 20, 2026 that may be closed by this pull request
@Rafetikus Rafetikus self-assigned this Apr 20, 2026
@Rafetikus Rafetikus added this to the Deadline milestone Apr 20, 2026
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

Adds sorting and richer filtering controls for the workspace Projects list, wiring UI query params in the header to client-side filtering/sorting on the list page (Issue #79).

Changes:

  • Add query-param driven filtering (access, lead, members, created-date, “my projects”, favorites) and sorting logic to the projects list.
  • Replace placeholder header buttons with functional Sort and Filters dropdowns (including workspace member lookups for lead/member filters).
  • Improve empty-state messaging when filters are active.

Reviewed changes

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

File Description
ui/src/pages/ProjectsListPage.tsx Parses filter/sort params from the URL and applies filtering + sorting to the projects collection.
ui/src/components/layout/PageHeader.tsx Implements “Sort projects” and “Filter projects” dropdowns that write filter/sort state into URL search params.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/src/pages/ProjectsListPage.tsx
Comment thread ui/src/pages/ProjectsListPage.tsx Outdated
Comment thread ui/src/pages/ProjectsListPage.tsx Outdated
Comment thread ui/src/components/layout/PageHeader.tsx Outdated
@Rafetikus Rafetikus added enhancement New feature or request UI UX labels Apr 20, 2026
@nazarli-shabnam
Copy link
Copy Markdown
Member

consider copilot comments, and re-request review from me

Copy link
Copy Markdown
Member

@nazarli-shabnam nazarli-shabnam left a comment

Choose a reason for hiding this comment

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

improve search query.

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +833 to +867
const sortFieldParam = searchParams.get('sortField');
const sortDirParam = searchParams.get('sortDir');
const legacySortParam = searchParams.get('sort');
const sortField =
sortFieldParam === 'manual' ||
sortFieldParam === 'name' ||
sortFieldParam === 'created_date' ||
sortFieldParam === 'member_count'
? sortFieldParam
: legacySortParam === 'name_asc' || legacySortParam === 'name_desc'
? 'name'
: 'created_date';
const sortDir =
sortDirParam === 'asc' || sortDirParam === 'desc'
? sortDirParam
: legacySortParam === 'created_asc' || legacySortParam === 'name_asc'
? 'asc'
: 'asc';
const parseCsvParam = (key: string) =>
(searchParams.get(key) ?? '')
.split(',')
.map((v) => v.trim())
.filter(Boolean);
const selectedAccess = parseCsvParam('access').filter(
(value): value is 'private' | 'public' => value === 'private' || value === 'public',
);
const selectedLeadIds = parseCsvParam('lead');
const selectedMemberIds = parseCsvParam('members');
const myProjectsOnly = searchParams.get('myProjects') === '1';
const createdDateFilter =
searchParams.get('createdDate') === 'today' ||
searchParams.get('createdDate') === 'last7' ||
searchParams.get('createdDate') === 'last30'
? (searchParams.get('createdDate') as 'today' | 'last7' | 'last30')
: '';
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

There is duplicated URL-param parsing logic here (CSV parsing, access/lead/members, createdDate, sortField/sortDir incl. legacy sort) that must stay perfectly in sync with ProjectsListPage. The current duplication already caused drift (e.g., the legacy sortsortDir mapping bug). Consider extracting a shared helper/hook (e.g., useProjectsListSearchParams) used by both the header controls and the list filtering/sorting to prevent future mismatches.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request UI UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: projects order and filter buttons

3 participants