-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(filters): update file structure for filters, rename 'FiltersList…
…' to be 'Filters', make 'FilterMenu' and 'Badge' sub-components in 'Filters', update all tests/generated files, add file structure for 'QuickFilters', update build steps in root package.json to not treat 'components/filters' as a build directory (#2932)
- Loading branch information
1 parent
58fe325
commit 13e4f0a
Showing
60 changed files
with
198 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The `Filters` component displays all active filters. It also allows for adding and removing filters. | ||
|
||
This description is a stub and shold be expanded as development continues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Filters from '@commercetools-uikit/filters'; | ||
|
||
/**TODO: EXPAND THIS */ | ||
const Example = () => <Filters />; | ||
|
||
export default Example; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/components/filters/filter-menu/docs/usage-example.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
packages/components/filters/filter-menu/src/filter-menu.stories.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
packages/components/filters/filters-list/docs/usage-example.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
packages/components/filters/filters-list/src/filters-list.stories.tsx
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
packages/components/filters/filters-list/src/filters-list.tsx
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ters/filter-menu/src/badge/badge.spec.tsx → ...mponents/filters/src/badge/badge.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { TFiltersProps } from './filters'; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './filter-menu'; |
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...enu/src/trigger-button/trigger-button.tsx → ...er-menu/trigger-button/trigger-button.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rs/filter-menu/src/filter-menu.readme.mdx → ...components/filters/src/filters.readme.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { Meta, Markdown } from '@storybook/blocks'; | ||
import ReadMe from './../README.md?raw' | ||
|
||
<Meta tags={['local-dev']} title="components/Filters/FilterMenu/Readme" /> | ||
<Meta tags={['local-dev']} title="components/Filters/Readme" /> | ||
|
||
<Markdown>{ReadMe}</Markdown> |
6 changes: 3 additions & 3 deletions
6
...rs/filters-list/src/filters-list.spec.tsx → ...s/components/filters/src/filters.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { screen, render } from '../../../../../test/test-utils'; | ||
import FiltersList from './filters-list'; | ||
import { screen, render } from '../../../../test/test-utils'; | ||
import Filters from './filters'; | ||
|
||
/** | ||
* THIS IS A PLACEHOLDER, PLEASE UPDATE IT | ||
*/ | ||
describe('FilterMenu FiltersList', () => { | ||
it('should render the filters-list', async () => { | ||
await render(<FiltersList label="filters list" />); | ||
await render(<Filters label="filters list" />); | ||
await screen.findByText('filters list'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import Filters from './filters'; | ||
|
||
const meta: Meta<typeof Filters> = { | ||
title: 'components/Filters', | ||
component: Filters, | ||
tags: ['local-dev'], | ||
argTypes: { | ||
label: { | ||
control: 'text', | ||
}, | ||
}, | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof Filters>; | ||
|
||
export const BasicExample: Story = { | ||
args: { | ||
label: 'A component for applying multiple filter controls', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type TFiltersProps = { | ||
/** | ||
* This is a stub prop | ||
*/ | ||
label?: string; | ||
}; | ||
|
||
function Filters(props: TFiltersProps) { | ||
return <div>{props.label}</div>; | ||
} | ||
export default Filters; |
4 changes: 2 additions & 2 deletions
4
...lter-menu/src/filter-menu.visualroute.jsx → ...nents/filters/src/filters.visualroute.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mponents/filters/filter-menu/src/index.ts → packages/components/filters/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { default } from './filter-menu'; | ||
export { default } from './filters'; | ||
export { default as version } from './version'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. --> | ||
<!-- This file is created by the `yarn generate-readme` script. --> | ||
|
||
# QuickFilters | ||
|
||
## Description | ||
|
||
The `QuickFilters` component displays a selection of `Tag` components that represent the available filter actions. | ||
|
||
This description is a stub and shold be expanded as development continues. | ||
|
||
## Installation | ||
|
||
``` | ||
yarn add @commercetools-uikit/quick-filters | ||
``` | ||
|
||
``` | ||
npm --save install @commercetools-uikit/quick-filters | ||
``` | ||
|
||
Additionally install the peer dependencies (if not present) | ||
|
||
``` | ||
yarn add react | ||
``` | ||
|
||
``` | ||
npm --save install react | ||
``` | ||
|
||
## Usage | ||
|
||
```jsx | ||
import QuickFilters from '@commercetools-uikit/quick-filters'; | ||
|
||
/**TODO: EXPAND THIS */ | ||
const Example = () => <QuickFilters />; | ||
|
||
export default Example; | ||
``` | ||
|
||
## Properties | ||
|
||
| Props | Type | Required | Default | Description | | ||
| ------- | -------- | :------: | ------- | -------------------- | | ||
| `label` | `string` | ✅ | | This is a stub prop! | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The `QuickFilters` component displays a selection of `Tag` components that represent the available filter actions. | ||
|
||
This description is a stub and shold be expanded as development continues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import QuickFilters from '@commercetools-uikit/quick-filters'; | ||
|
||
/**TODO: EXPAND THIS */ | ||
const Example = () => <QuickFilters />; | ||
|
||
export default Example; |
File renamed without changes.
Oops, something went wrong.