Skip to content

Commit

Permalink
Merge pull request #2066 from chanzuckerberg/release-v15.4.1
Browse files Browse the repository at this point in the history
### [15.4.1](v15.4.0...v15.4.1) (2024-10-04)

[Storybook](https://61313967cde49b003ae2a860-ffjofyjbkx.chromatic.com/)

### Bug Fixes

* **Button:** specify size for enabled/disabled buttons ([#2063](#2063)) ([39f3af6](39f3af6))
  • Loading branch information
booc0mtaco authored Oct 5, 2024
2 parents eadbcd0 + 679ce57 commit aeffbe0
Show file tree
Hide file tree
Showing 34 changed files with 591 additions and 642 deletions.
19 changes: 19 additions & 0 deletions .storybook/components/Docs/Guidelines/CodeGuidelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Canvas, Meta } from '@storybook/blocks';

EDS component code follows these principles and conventions for HTML, CSS, and JavaScript/TypeScript/React:

- [Reading Figma APIs](#figma)
- [HTML](#html)
- [CSS](#css)
- [CSS design principles](#css-design-principles)
Expand All @@ -22,6 +23,24 @@ EDS component code follows these principles and conventions for HTML, CSS, and J
- [Accessibility](#accessibility)
- [Tools](#accessibility-tools)

# Reading Figma APIs <a name="figma"></a>

Both code and figma component documentation have different needs. Tackling the API is not an exact science, so we include some guidelines on how to read and implement the APIs.

## Exact matching APIs

Cases where the API names match **exactly** between code and figma:

- **boolean fields** (e.g., `isFullWidth`, `hasLeadingIcon`) - match the names of boolean fields between code and figma, to avoid ambiguity and confusion

## Figma APIs not in Code

- By convention, some APIs shown in Figma are for designers and should not be implemented in code. These should include a marker both in the API table and figma component UI (e.g., the gear emoji)

## Code APIs not in Figma

- In code, there will be APIs for handling events, controlling other UI behaviors, and some props needed for React implementations. We annotate these by grouping the APIs in the props in the types either under `// Component API` or `// Design API`.

# HTML principles and conventions <a name="html"></a>

- **Use semantic markup.** That means using the `<button>` tag rather than `<div onClick={toggle}>` when a button is required, an `<a>` tag when a link is required, and so on.
Expand Down
3 changes: 0 additions & 3 deletions .storybook/static/along-footer-paper.svg

This file was deleted.

17 changes: 0 additions & 17 deletions .storybook/static/along-logo-bulb.svg

This file was deleted.

Binary file removed .storybook/static/along-user-illustration-1.png
Binary file not shown.
Binary file removed .storybook/static/along-user-illustration-2.png
Binary file not shown.
Loading

0 comments on commit aeffbe0

Please sign in to comment.