fix: re-implement filter components in /insights/routing#18655
fix: re-implement filter components in /insights/routing#18655eunjae-lee merged 8 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
7fb53c5 to
46c7c11
Compare
46c7c11 to
b698f40
Compare
b698f40 to
2dbcb73
Compare
2dbcb73 to
96e21a0
Compare
| table: Table<TData>; | ||
| externalFilters?: ExternalFilter[]; | ||
| } |
There was a problem hiding this comment.
externalFilters is no longer needed as I've migrated Routing Form and People filter properly.
| @@ -263,43 +261,56 @@ export function RoutingFormResponsesTableContent() { | |||
| const { t } = useLocale(); | |||
| const { filter } = useFilterContext(); | |||
There was a problem hiding this comment.
Now, we rely on useFilterContext() only for the date selectors. All the other parameters are managed below.
| columnHelper.accessor("formId", { | ||
| id: "formId", | ||
| header: t("routing_forms"), | ||
| enableColumnFilter: true, | ||
| enableSorting: false, | ||
| meta: { | ||
| filter: { type: "single_select" }, | ||
| }, | ||
| cell: () => null, | ||
| }), | ||
| columnHelper.accessor("bookingUserId", { | ||
| id: "bookingUserId", | ||
| header: t("people"), | ||
| enableColumnFilter: true, | ||
| enableSorting: false, | ||
| meta: { | ||
| filter: { type: "single_select" }, | ||
| }, | ||
| cell: () => null, | ||
| }), |
There was a problem hiding this comment.
these are hidden columns but they exist to feed the filterable columns to the tanstack table.
| </> | ||
| }> | ||
| <RoutingKPICards /> | ||
| <RoutingKPICards given={{ isAll, teamId, userId }} /> |
There was a problem hiding this comment.
We caxn provide isAll, teamId, userId to this component, so that it won't attempt to read them from useFilterContext().
| export type OrgTeamsType = "org" | "team" | "yours"; | ||
|
|
||
| // This is a cleaned-up version of TeamAndSelfList. | ||
| export const OrgTeamsFilter = ({ |
| ); | ||
| } | ||
| ); | ||
| export const RoutingFormFilterList = memo(() => { |
There was a problem hiding this comment.
removed showOnlyWhenSelectedInContext as it's no longer needed
| showOnlyWhenSelectedInContext?: boolean; | ||
| onClear?: () => void; | ||
| }) => { | ||
| export const UserListInTeam = ({ onClear }: { onClear?: () => void }) => { |
There was a problem hiding this comment.
Removed showOnlyWhenSelectedInContext as it's no longer needed
There was a problem hiding this comment.
This file has no logic change. Just a bit cleaned up for readability.
96e21a0 to
2cf0187
Compare
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (01/14/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add foundation team as reviewer" took an action on this PR • (01/17/25)1 reviewer was added to this PR based on Keith Williams's automation. |
2cf0187 to
26a4e15
Compare
E2E results are ready! |
30d0dee to
eee4a4c
Compare
eee4a4c to
b9adac9
Compare
b9adac9 to
85c61b3
Compare
6df47e1 to
b4aaea9
Compare
b4aaea9 to
0d4c38e
Compare
0d4c38e to
c6cbde5
Compare
hbjORbj
left a comment
There was a problem hiding this comment.
I appreciate the self-review!
* fix: re-implement team filter & people filter components * implement DateRangeFilter * show selected filter values --------- Co-authored-by: Benny Joo <sldisek783@gmail.com>

What does this PR do?
TeamAndSelfListintoOrgTeamsFilterand removed implementation regardinguseFilterContext()ClearFiltersintoDataTableFilters.ClearFiltersButtonand removed implementation regardinguseFilterContext()externalFilters-related code fromuseDataTable(). It was a temporary way to keep "Routing Form" and "People" filter as-is.Screenshot.2025-01-14.at.17.17.33.mp4
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
All the filters work the same on /insights/routing