-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: moved some components to unused folder (#458)
- Loading branch information
Showing
26 changed files
with
284 additions
and
52 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
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 @@ | ||
# Directory | ||
|
||
TBD |
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 @@ | ||
|
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 @@ | ||
![](../../assets/test.png) |
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,18 @@ | ||
### More Actions Menu | ||
|
||
#### Overview | ||
The Actions Menu provides a consolidated interface for row-specific operations, such as delete, duplicate, download, and archive, all grouped within a single menu. | ||
|
||
<iframe width="1143" height="8208" src="https://www.figma.com/embed?embed_host=your-site.com&url=https://www.figma.com/design/yCPszaTtkCFxRHaSkkJFR9/Eames-Templates-%5BInternal%5D?node-id=2146-40220" allowfullscreen></iframe> | ||
|
||
|
||
|
||
|
||
#### Usage Guidelines | ||
- Highlight destructive actions in red to ensure emphasis and user caution. | ||
- Omit icons from menu items to maintain a clean, easy-to-read menu. | ||
- Display the "More Actions" menu even when only one option is available. | ||
|
||
Examples: | ||
- Disabled menu item (Coming Soon) | ||
|
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 @@ | ||
|
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,53 @@ | ||
import { Meta, Story } from '@storybook/blocks'; | ||
|
||
{/* // import * as TableStories from './Table.stories'; */} | ||
|
||
{/* <Meta of={TableStories.default} /> */} | ||
|
||
{/* <Story of={TableStories.default} /> */} | ||
|
||
# Table | ||
|
||
#### Overview | ||
Tables present and organize data in a structured, readable format, ranging from basic displays to complex interfaces that support queries and data manipulation. | ||
|
||
#### Basic Table | ||
|
||
##### Header | ||
A typical table header contains column titles that describe the data in each column. It includes functionality for sorting columns and may feature help icons with tooltips to provide additional information on each column’s purpose. | ||
|
||
##### Pagination | ||
Use pagination in tables to improve performance and reduce load times by fetching only the data needed for the current page. | ||
|
||
##### Cell Types | ||
Table cells support various formats and are designed to display data in clear, readable ways. | ||
- Numbers (Coming Soon) | ||
- Date / Time (Coming Soon) | ||
- CTA Buttons (Coming Soon) | ||
- Status Badges (Coming Soon) | ||
- Links (Coming Soon) | ||
- Tags (Coming Soon) | ||
- More Actions (Coming Soon) | ||
|
||
[View Example](#link) | ||
|
||
#### Tables with Filters | ||
Filters help users refine large datasets within tables. The mParticle table supports a range of filter types, including: | ||
|
||
- [Search](#link-to-search) | ||
- [Date Range filters](#link-to-daterange) | ||
- [Basic Filters](#link-to-basic-filters) | ||
- [Filters with an Apply button](#link-to-apply-button-filters) | ||
|
||
|
||
|
||
#### Related Links | ||
| Type | Resource | | ||
| ------ | -------- | | ||
| Eames | [Figma Templates](https://www.figma.com/design/yCPszaTtkCFxRHaSkkJFR9/Eames-Templates-%5BInternal%5D?node-id=2114-9632&node-type=frame&t=Aa9XxcKyme3ud4cb-0) | | ||
|
||
|
||
|
||
#### Example basic table image (To be changed) | ||
|
||
<img src="images/basic-table.png" /> |
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,20 @@ | ||
# Filters | ||
|
||
*Note: This section covers filters specifically for tables. For query-related filters, please refer to the [Analytics Filters - Coming Soon](#coming).* | ||
|
||
#### **Simple Filters** | ||
Simple filters are ideal when there are only a few filter options. These are straightforward and quick to use, often appearing as dropdowns above the table. For implementation, refer to the [Select Component](https://mparticle.github.io/aquarium/?path=/docs/components-data-entry-select--documentation). | ||
|
||
Examples: | ||
- Coming Soon | ||
- Coming Soon | ||
|
||
#### **Filters with Apply Button** | ||
Complex filters provide more advanced filtering options, allowing users to apply multiple criteria at once. These filters often include dropdowns, checkboxes, and text fields. Complex filters are particularly useful when multiple filters need to be applied simultaneously or when load times might be a concern. | ||
|
||
#### **Date Range Filters** | ||
Date range filters allow users to specify a range of dates to narrow down the data displayed in the table. Typically, these filters include a start date and an end date, with options for common ranges like “Last 7 days” or “Last 30 days.” User presets are also available for frequently used date ranges. | ||
|
||
Examples: | ||
- [Basic Date Picker](https://mparticle.github.io/aquarium/?path=/docs/components-data-entry-date-picker--documentation) | ||
- [Date Range Filter with Presets](https://mparticle.github.io/aquarium/?path=/docs/candidate-components-directory-date-range-filter--documentation) |
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,94 @@ | ||
import type { Meta } from '@storybook/react' | ||
import { Table } from 'src/components/data-display/Table/Table' | ||
import { Space, Tag } from 'antd' | ||
import type { TableProps } from 'antd' | ||
|
||
interface DataType { | ||
key: string | ||
name: string | ||
age: number | ||
address: string | ||
tags: string[] | ||
} | ||
|
||
const columns: TableProps<DataType>['columns'] = [ | ||
{ | ||
title: 'Name', | ||
dataIndex: 'name', | ||
key: 'name', | ||
render: text => <a>{text}</a>, | ||
}, | ||
{ | ||
title: 'Age', | ||
dataIndex: 'age', | ||
key: 'age', | ||
}, | ||
{ | ||
title: 'Address', | ||
dataIndex: 'address', | ||
key: 'address', | ||
}, | ||
{ | ||
title: 'Tags', | ||
key: 'tags', | ||
dataIndex: 'tags', | ||
render: (_, { tags }) => ( | ||
<> | ||
{tags.map(tag => { | ||
let color = tag.length > 5 ? 'geekblue' : 'green' | ||
if (tag === 'loser') { | ||
color = 'volcano' | ||
} | ||
return ( | ||
<Tag color={color} key={tag}> | ||
{tag.toUpperCase()} | ||
</Tag> | ||
) | ||
})} | ||
</> | ||
), | ||
}, | ||
{ | ||
title: 'Action', | ||
key: 'action', | ||
render: (_, record) => ( | ||
<Space size="middle"> | ||
<a>Invite {record.name}</a> | ||
<a>Delete</a> | ||
</Space> | ||
), | ||
}, | ||
] | ||
|
||
const data: DataType[] = [ | ||
{ | ||
key: '1', | ||
name: 'John Brown', | ||
age: 32, | ||
address: 'New York No. 1 Lake Park', | ||
tags: ['nice', 'developer'], | ||
}, | ||
{ | ||
key: '2', | ||
name: 'Jim Green', | ||
age: 42, | ||
address: 'London No. 1 Lake Park', | ||
tags: ['loser'], | ||
}, | ||
{ | ||
key: '3', | ||
name: 'Joe Black', | ||
age: 32, | ||
address: 'Sydney No. 1 Lake Park', | ||
tags: ['cool', 'teacher'], | ||
}, | ||
] | ||
|
||
const meta: Meta<typeof Table> = { | ||
title: 'UX Patterns/Table', | ||
component: () => <Table<DataType> columns={columns} dataSource={data} />, | ||
|
||
args: {}, | ||
} | ||
|
||
export default meta |
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,17 @@ | ||
### Tags in Tables | ||
|
||
#### Overview | ||
Tags are used within tables to visually categorize or label data, providing users with quick context about specific rows or items. Tags can indicate statuses, categories, priorities, or any other metadata that helps users understand and interpret the data at a glance. | ||
|
||
#### Managing Tags | ||
- **Creating Tags - COMING SOON** | ||
- **Editing Tags - COMING SOON** | ||
- **Deleting Tags - COMING SOON** | ||
|
||
#### Displaying Tags within Tables | ||
|
||
COMING SOON | ||
|
||
#### Filtering by Tags | ||
|
||
COMING SOON |
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 @@ | ||
# Unused components | ||
|
||
The following components are not used in mParticle but can still be browsed if needed. |
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
src/components/data-entry/ColorPicker/ColorPicker.stories.tsx
This file was deleted.
Oops, something went wrong.
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
4 changes: 2 additions & 2 deletions
4
...ata-display/Calendar/Calendar.stories.tsx → ...ents/unused/Calendar/Calendar.stories.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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { ColorPicker } from 'src/components/unused/ColorPicker/ColorPicker' | ||
|
||
const meta: Meta<typeof ColorPicker> = { | ||
title: 'Components/Unused/ColorPicker', | ||
component: ColorPicker, | ||
|
||
args: {}, | ||
} | ||
export default meta | ||
|
||
type Story = StoryObj<typeof ColorPicker> | ||
|
||
export const Primary: Story = {} |
2 changes: 1 addition & 1 deletion
2
...ts/data-entry/ColorPicker/ColorPicker.tsx → ...onents/unused/ColorPicker/ColorPicker.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
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,14 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { QRCode } from 'src/components/unused/QRCode/QRCode' | ||
|
||
const meta: Meta<typeof QRCode> = { | ||
title: 'Components/Unused/QRCode', | ||
component: QRCode, | ||
|
||
args: {}, | ||
} | ||
export default meta | ||
|
||
type Story = StoryObj<typeof QRCode> | ||
|
||
export const Primary: Story = {} |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...mponents/data-entry/Rate/Rate.stories.tsx → src/components/unused/Rate/Rate.stories.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
Oops, something went wrong.