-
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.
Merge branch 'main' into docs/table-docs-basic-example
- Loading branch information
Showing
17 changed files
with
233 additions
and
185 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
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# How to use Icons | ||
|
||
<br /> | ||
|
||
## Adding and Updating Icons | ||
|
||
The Design team provides SVG files with the final icon names. These SVG files must be minified and follow the project's styling guidelines. You can prettify them using the SVGPrettifier tool, which ensures the correct size and properties are applied to the SVG. | ||
|
||
|
||
### Steps to Add a New Icon: | ||
|
||
1. **Ensure name of icon follows the desired principles**: | ||
<details> | ||
<summary>Here's the naming principles all icons should follow</summary> | ||
|
||
Names should be semantic, describing the pattern rather than the shape. For instance, "mp_act_lt_delete" describes an action icon in light style for deletion. Even though it may look like a "trash" icon, the name reflects the specific action (delete) rather than the object (trash). Multiple icons may have the same shape but different names based on semantic meaning. | ||
|
||
- Prefix: "mp" | ||
- Category (abbreviated): | ||
- act (UI Actions) | ||
- info (Informational) | ||
- pm (Product Model) | ||
- [Other categories as needed] | ||
- Style (abbreviated): | ||
- lt (Light) | ||
- dt (Duotone) | ||
- Other styles as needed | ||
- Semantic description | ||
</details> | ||
|
||
2. **Ensure the icon svg structure is correct by using the Prettify tool**: | ||
Use the [SVGPrettifier Story](?path=/docs/components-other-svgprettifier--documentation) to clean up the SVG file and ensure it meets the necessary formatting standards (size, properties, etc). | ||
The [SVGPrettifier](https://mparticle.github.io/aquarium/?path=/docs/components-other-svgprettifier--documentation) component is used to upload and prettify SVG files. Each SVG must follow the project's styling guidelines and have a unique name to avoid overwriting existing icons. | ||
|
||
3. **Update the Icon Type**: | ||
Add the new icon name to the TypeScript type definition in the [src/types/icons](https://github.com/mParticle/aquarium/blob/3abc3b71916ab5a7db3c4f93e06ad2bd5845e1bf/src/types/icons.ts) file. | ||
|
||
4. **Update Icon Components**: | ||
Add the icon components in the [src/components/icons](https://github.com/mParticle/aquarium/blob/3abc3b71916ab5a7db3c4f93e06ad2bd5845e1bf/src/components/icons/index.ts) directory, where all icon components are stored. | ||
|
||
5. **Update the Icons Object**: | ||
Ensure the new icons are included in the Icons object located in [src/constants/Icons](https://github.com/mParticle/aquarium/blob/3abc3b71916ab5a7db3c4f93e06ad2bd5845e1bf/src/constants/Icons.ts). This object is used across the project to reference all available icons. | ||
|
||
|
||
### Related Links | ||
|
||
| Type | Resource| | ||
| -------- | ------- | | ||
| Eames | [Figma Icon library](https://www.figma.com/design/3j5Nb0oOSkF3DW3URS8yex/mParticle-Icons-1.0.0?node-id=2055-9952&t=K7xlZo0hE2tn2y54-0) | | ||
|Eames| [Icon Guidelines for designers](https://mparticle.atlassian.net/wiki/spaces/DMP/pages/3988914258/Icons) | | ||
| Eames | [Fontawesome Library](https://fontawesome.com/search?o=r&s=ligh) | | ||
|
||
|
||
### FAQ | ||
|
||
**Q:** What if an icon in Figma has a FontAwesome name or doesn't follow the standard naming format? Should I name it myself? | ||
**A:** Please contact the design team. They'll provide the correct name and make sure the icon is properly reflected in the design library. | ||
|
||
**Q:** When do we use mParticle custom icons instead of default Ant Design (AntD) icons? | ||
**A:** In our design system Eames, Ant Design (AntD) icons are the primary choice across components. However, custom mParticle icons are used in the following scenarios: | ||
- When the design team explicitly requests a customized icon. | ||
- When the AntD library does not offer a suitable icon for a specific use case. | ||
- When an existing AntD icon does not align with mParticle’s design or functional requirements. |
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,13 @@ | ||
import { Story } from '@storybook/blocks'; | ||
|
||
import * as IconStories from '../../../src/components/general/Icon/Icon.stories'; | ||
|
||
# Icons | ||
|
||
### Overview | ||
|
||
mParticle icon library is mP icons, a carefully curated collection based on [FontAwesome](https://fontawesome.com/search?o=r&s=light). Our design team has selected icons specifically for mParticle use cases, defined the semantic layer, and applied customizations as needed. | ||
|
||
### Available Icons | ||
|
||
<Story of={IconStories.IconTable} /> |
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,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" /> |
Oops, something went wrong.