-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filters component #33
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
7f72147
to
8832ca5
Compare
73e3d9e
to
72307c0
Compare
} else { | ||
const updatedFilters = filtersToUpdate?.includes(e.currentTarget.id) | ||
? filtersToUpdate.length && | ||
Array.isArray(filtersToUpdate) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be more readable if we put it in an if condition than in ternaries
@@ -0,0 +1,12 @@ | |||
export type FiltersType = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move all types to general types folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should reorganize them definitely
@@ -46,6 +46,7 @@ module.exports = { | |||
foreground: 'hsl(var(--accent-foreground))', | |||
}, | |||
gray: { | |||
100: '#F3F4F6', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filters design has a gray-700 #374151
for filter labels
|
||
<DialogContent> | ||
<DialogHeader className="text-xl font-semibold leading-7"> | ||
<DialogTitle>Filters</DialogTitle> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filters label is a green-900 #041310
Close dialog icon is a little bit misaligned |
77c72b1
to
3c6d81a
Compare
Projects filtering
Overview
Implementaton of filtering functionality, with the following key features and behaviors:
Accumulative Filters: Users can apply multiple filters across various categories to refine their search results. These filters are accumulative.
Handling of Fully Selected Categories: When all available filters within a specific category are selected, the system does not display these selections as individual badges (which are used to visually represent active filters). This design choice is made under the assumption that selecting all filters within a category essentially results in no filtering action, as it would include all possible options.
Display of Active Filters as Badges: The interface uses badges to visually indicate which filters are currently active. To maintain a clean and user-friendly display, a maximum of three badges are shown at any given time. If more than three filters are selected, the interface indicates the presence of additional active filters with a notation such as "+X more".
Placeholder for Project Count Button: The interface includes a button designed to display the number of projects (or items) that match the currently selected filters. However, this functionality is not yet implemented due to the backend API, which is responsible for calculating the count based on selected filters, not being ready.
When filters are deselected, the URL should update to include only the active filters.
Designs
Link to the related design prototypes (if applicable)
Testing instructions
Go to /projects and play with filters to make sure all conditions above are ccompllished.
Feature relevant tickets
Link to the related task manager tickets
Checklist before submitting
develop
.deploying to staging/production, please add brief testing instructions
to the deploy checklist