mattermost/webapp/AGENTS.md
Harrison Healey e898ccdf3d
MM-68397 Add shared package to STYLE_GUIDE.md (#36425)
* MM-68397 Add shared package to STYLE_GUIDE.md and CLAUDE.OPTIONAL.md

* Add webapp/AGENTS.md
2026-05-06 13:15:40 -04:00

22 lines
802 B
Markdown

# AGENTS.md
Guidance for coding agents working inside `webapp/`.
## Coding Standards
Follow `webapp/STYLE_GUIDE.md` for canonical style, accessibility, and testing standards.
## Shared Components
Prefer the shared components from `@mattermost/shared` over hand-rolled equivalents:
- **`Button`** — use for text-based button UI instead of building bespoke `<button>` elements or styling.
```typescript
import {Button} from '@mattermost/shared/components/button';
```
- **`WithTooltip`** — use for tooltips instead of wiring up Floating UI or other tooltip primitives directly.
```typescript
import {WithTooltip} from '@mattermost/shared/components/tooltip';
```
Always import via the full package name (`@mattermost/shared/...`), never via relative paths into `platform/shared/`.