Skip to content

Commit

Permalink
Merge branch 'main' into docs/table-docs-basic-example
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuurcio committed Oct 21, 2024
2 parents f6aba2c + a18d67e commit 4b53908
Show file tree
Hide file tree
Showing 17 changed files with 233 additions and 185 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## [1.33.2](https://github.com/mParticle/aquarium/compare/v1.33.1...v1.33.2) (2024-10-18)

### Bug Fixes

- Design tokens update + icons alignment fix ([#460](https://github.com/mParticle/aquarium/issues/460)) ([9c93165](https://github.com/mParticle/aquarium/commit/9c931656b7ef4133f3225bdf1924741d9058df93))
- ensure PostCSS handles CSS unnesting in Vite config ([#457](https://github.com/mParticle/aquarium/issues/457)) ([1978e65](https://github.com/mParticle/aquarium/commit/1978e657bec3a360be45ea4f8a4a52653cd79640))

## [1.33.2-fix-design-tokens-fix.2](https://github.com/mParticle/aquarium/compare/v1.33.2-fix-design-tokens-fix.1...v1.33.2-fix-design-tokens-fix.2) (2024-10-17)

### Bug Fixes

- (styles) override lineheight on icons ([015268f](https://github.com/mParticle/aquarium/commit/015268ffb2d631825561ec7f31af5524a2db7a36))

## [1.33.2-fix-design-tokens-fix.1](https://github.com/mParticle/aquarium/compare/v1.33.1...v1.33.2-fix-design-tokens-fix.1) (2024-10-17)

### Bug Fixes

- (styles) remove shadow of the buttons and update suite selector hover color ([7502b54](https://github.com/mParticle/aquarium/commit/7502b54a03128be280cd5942cc54e6a795c88442))
- ensure PostCSS handles CSS unnesting in Vite config ([#457](https://github.com/mParticle/aquarium/issues/457)) ([1978e65](https://github.com/mParticle/aquarium/commit/1978e657bec3a360be45ea4f8a4a52653cd79640))

## [1.33.2-fix-unnested-css.1](https://github.com/mParticle/aquarium/compare/v1.33.1...v1.33.2-fix-unnested-css.1) (2024-10-15)

### Bug Fixes
Expand Down
3 changes: 0 additions & 3 deletions design/LightTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ export const LightTheme: IMpThemeConfig = {
},
Button: {
borderColorDisabled: '#dcdcd8',
primaryShadow: '0 2px 0 rgba(44, 0, 170, 0.4)',
defaultShadow: '0 2px 0 rgba(44, 0, 170, 0.2)',
dangerShadow: '0 2px 0 rgba(44, 0, 170, 0.3)',
},
Input: {
activeShadow: '0 0 0 2px rgba(54, 0, 209, 0.1)',
Expand Down
3 changes: 0 additions & 3 deletions design/MpThemeConfig.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ export type IMpThemeConfig = ThemeConfig & {
}
Button: {
borderColorDisabled: string
primaryShadow: string
defaultShadow: string
dangerShadow: string
}
Input: {
activeShadow: string
Expand Down
File renamed without changes.
File renamed without changes.
92 changes: 0 additions & 92 deletions docs/Foundations/Icons.mdx

This file was deleted.

63 changes: 63 additions & 0 deletions docs/Foundations/Icons/How to use.mdx
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.
13 changes: 13 additions & 0 deletions docs/Foundations/Icons/Icon Library.mdx
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} />
3 changes: 3 additions & 0 deletions docs/UX Patterns/Directory.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Directory

TBD
53 changes: 53 additions & 0 deletions docs/UX Patterns/Table/Documentation.mdx
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" />
Loading

0 comments on commit 4b53908

Please sign in to comment.