Skip to content

Filter pattern docs #4013

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

Merged
merged 67 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
97923bb
feat(filter): add form pills
PixeledCode Jul 26, 2024
456f71b
feat(filter): add different filter types
PixeledCode Jul 29, 2024
9aa1076
feat(filter): add selected state for filter pills
PixeledCode Jul 30, 2024
d8b6273
feat(filter): add clear all button
PixeledCode Jul 30, 2024
0e34345
feat(filter): add selected value label to pills
PixeledCode Jul 30, 2024
31ab2a4
feat(filter): add logic for room type filtering
PixeledCode Jul 30, 2024
369bdd9
feat(filter): add logic for participants and date-time filtering
PixeledCode Jul 30, 2024
967a889
feat(filter): fix popover opening on dismiss button
PixeledCode Jul 30, 2024
3fbe6c8
feat(filter): add ts-expect-error for borderRadius
PixeledCode Jul 30, 2024
be9d7a4
feat(intellisense): add intellisense to recommended extensions
PixeledCode Jul 30, 2024
ece0ab6
feat(filter): refactor codebase
PixeledCode Jul 30, 2024
d9fa76d
feat(filter): fix ts issue
PixeledCode Jul 30, 2024
29e83f2
feat(filter): remove test for 'all' room type
PixeledCode Jul 31, 2024
9944e62
feat(filter): add search filter example
PixeledCode Jul 31, 2024
155dad4
feat(filter): update search filter to include multiple columns
PixeledCode Jul 31, 2024
f4c334d
feat(filter): refactor to remove search filter file
PixeledCode Jul 31, 2024
d3b7432
feat(filter): update DefaultFilterGroup to accept filterList
PixeledCode Jul 31, 2024
82b8c46
feat(filter): add ConditionalFilterGroupExample story
PixeledCode Jul 31, 2024
972467e
feat(filter): refactor FilterPill component
PixeledCode Jul 31, 2024
0df5bef
feat(filter): add Addfilter component
PixeledCode Jul 31, 2024
5eea311
feat(filter): fix dismiss button not working
PixeledCode Jul 31, 2024
693d712
feat(filter): remove validation on non selection of filter items
PixeledCode Aug 1, 2024
71db659
feat(filter): add ability to choose only one date
PixeledCode Aug 1, 2024
210a078
feat(filter): refactor date/time to date-range
PixeledCode Aug 1, 2024
8fd98fc
feat(filter): satisfy typescript for multiselect
PixeledCode Aug 1, 2024
3c04de4
feat(filter): add functionality to add filters
PixeledCode Aug 1, 2024
1f67454
feat(filter): add logic for add filter pill
PixeledCode Aug 2, 2024
7eff647
feat(filter): replace add filter pill with button
PixeledCode Aug 2, 2024
edef567
feat(filter): add badge to add filter
PixeledCode Aug 2, 2024
2d5f489
feat(filter): add FilterAction
PixeledCode Aug 2, 2024
82587eb
feat(filter): add unique name filter
PixeledCode Aug 2, 2024
49bc9d5
feat(filter): add room sid filter
PixeledCode Aug 2, 2024
492ce6f
feat(filter): update example file
PixeledCode Aug 2, 2024
abd1868
fix(website): add missing { for sidepanel docs
PixeledCode Aug 5, 2024
762ecea
feat(filter): add host name filter
PixeledCode Aug 5, 2024
4049cc0
feat(filter): add status filter
PixeledCode Aug 5, 2024
51ebeda
feat(filter): add tags filter
PixeledCode Aug 5, 2024
8093073
feat(filter): add logic for more filters
PixeledCode Aug 6, 2024
76ccb12
feat(filter): improve state logic for sidepanel
PixeledCode Aug 6, 2024
286bce0
feat(filter): fix count badge issue
PixeledCode Aug 6, 2024
5cff6be
feat(filter): add badge count for more filter button
PixeledCode Aug 6, 2024
a2733eb
feat(filter): add department and platform filter
PixeledCode Aug 6, 2024
a0be423
feat(filter): fix padding issue on story
PixeledCode Aug 6, 2024
8e4e0d9
feat(filter): rename filter group to filter
PixeledCode Aug 6, 2024
fc0f607
feat(filter): add docs
PixeledCode Aug 6, 2024
f275fb0
feat(filter): add code demos in docs
PixeledCode Aug 6, 2024
7da033a
feat(filter): format files
PixeledCode Aug 6, 2024
ed1c550
feat(filter): rename FilterGroup to Filter
PixeledCode Aug 7, 2024
b8564c0
feat(filter): remove clearCondition prop
PixeledCode Aug 7, 2024
a133f90
feat(filter): bring back the Filter group files
PixeledCode Aug 7, 2024
7da84a2
feat(filter): website clean build
PixeledCode Aug 7, 2024
422eaf3
feat(filter): add filter to sitemap-vrt
PixeledCode Aug 7, 2024
117f3f8
feat(filter): add changeset
PixeledCode Aug 7, 2024
863fbe0
feat(filter): remove changeset
PixeledCode Aug 7, 2024
3575179
Apply suggestions from code review by @sara
PixeledCode Aug 14, 2024
ae95de5
feat(website): add link to filter pattern doc
PixeledCode Aug 14, 2024
a31472d
feat(filter): implement changes from review
PixeledCode Aug 14, 2024
3f70037
feat(website): add redirect for filter-group to filter
PixeledCode Aug 14, 2024
5f6f8c0
fix(filter): prevent filterbar overwriting sidebar filters
PixeledCode Aug 14, 2024
22efe92
fix(filter): improve state management
PixeledCode Aug 14, 2024
dbe5634
feat(tokens): remove old filter-group tests
PixeledCode Aug 14, 2024
5864a63
fix(filter): update date format
PixeledCode Aug 15, 2024
cfd6033
fix(filter): update images
PixeledCode Aug 15, 2024
dce9c5c
fix(filter): remove filter on click of "apply all" and "clear all"
PixeledCode Aug 15, 2024
f2856ae
fix(filter): update content
PixeledCode Aug 16, 2024
a77996e
fix(filter): add comparision validation for filters
PixeledCode Aug 16, 2024
73d01d7
fix(filter): remove filter-group from vrt
PixeledCode Aug 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dsznajder.es7-react-js-snippets",
"oouo-diogo-perdigao.docthis",
"yzhang.markdown-all-in-one",
"davidanson.vscode-markdownlint"
"davidanson.vscode-markdownlint",
"TwilioPaste.vs-code-intellisense"
]
}
160 changes: 0 additions & 160 deletions cypress/integration/filter-group-examples/index.spec.ts

This file was deleted.

2 changes: 1 addition & 1 deletion cypress/integration/sitemap-vrt/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ export const SITEMAP = [
"/patterns/confirmation/",
"/patterns/delete/",
"/patterns/data-export/",
"/patterns/filter-group/",
"/patterns/filter/",
"/patterns/",
"/patterns/empty-state/",
"/patterns/error-state/",
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-icons/build.icon-list.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/paste-icons/json/icons.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/paste-website/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const nextConfig = {
},
{ source: "/articles", destination: "/blog", permanent: true },
{ source: "/patterns/navigation", destination: "/experiences/navigation", permanent: true },
{ source: "/patterns/filter-group", destination: "/patterns/filter", permanent: true },
];
},
// https://nextjs.org/docs/pages/api-reference/next-config-js/headers
Expand Down
1 change: 1 addition & 0 deletions packages/paste-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"@twilio-paste/separator": "^8.1.1",
"@twilio-paste/sibling-box": "^9.1.1",
"@twilio-paste/side-modal": "^4.1.3",
"@twilio-paste/side-panel": "^1.0.0",
"@twilio-paste/sidebar": "^1.1.1",
"@twilio-paste/skeleton-loader": "^6.1.1",
"@twilio-paste/slider": "^3.0.1",
Expand Down
7 changes: 1 addition & 6 deletions packages/paste-website/src/__tests__/filterGroup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
filterByRoomType,
filterBySearchString,
isEndDateBeforeStartDate,
} from "../component-examples/filter-group/helpers";
} from "../component-examples/filter/helpers";

describe("filterBySearchString", () => {
it("should filter by unique name", () => {
Expand Down Expand Up @@ -36,11 +36,6 @@ describe("filterByRoomType", () => {
const result = filterByRoomType("Peer to Peer", "Group");
expect(result).toBeFalsy();
});

it("should always include if the filter is All", () => {
const result = filterByRoomType("Peer to Peer", "All");
expect(result).toBeTruthy();
});
});

describe("filterByDateRange", () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions packages/paste-website/src/component-examples/filter/Examples.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* DISCLAIMER: this is an example, not meant to be used in production */
import { Anchor } from "@twilio-paste/anchor";
import { Box } from "@twilio-paste/box";

import { DefaultFilter } from "./components/DefaultFilter";
import { TABLE_DATA } from "./constants";
import type { FilterListType } from "./types";

const filterList: FilterListType = ["roomType", "participants", "dateCompleted"];

export const DefaultFilterGroupExample = (): JSX.Element => (
<Box marginBottom="space70" data-cy="filter-default-example">
<DefaultFilter data={TABLE_DATA} filterList={filterList} />
<Anchor showExternal href="https://codesandbox.io/s/default-filter-group-rloskb?file=/src/App.tsx">
<strong>View example in CodeSandbox</strong>
</Anchor>
</Box>
);
Loading
Loading