Skip to content

chore(Docs): Add component docs#1517

Open
aweell wants to merge 26 commits into
masterfrom
aweell-component-docs
Open

chore(Docs): Add component docs#1517
aweell wants to merge 26 commits into
masterfrom
aweell-component-docs

Conversation

@aweell

@aweell aweell commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Add component docs under docs/component

@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown

Size stats

master this branch diff
Total JS 16.1 MB 16.1 MB 0 B
JS without icons 2.01 MB 2.01 MB 0 B
Lib overhead 92.5 kB 92.5 kB 0 B
Lib overhead (gzip) 19.9 kB 19.9 kB 0 B

@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown

Deploy preview for mistica-web ready!

✅ Preview
https://mistica-5493r1kdt-flows-projects-65bb050e.vercel.app

Built with commit 2b00564.
This pull request is being automatically deployed with vercel-action

@github-actions

github-actions Bot commented Mar 12, 2026

Copy link
Copy Markdown

Accessibility report
✔️ No issues found

ℹ️ You can run this locally by executing yarn audit-accessibility.

Comment thread doc/components/community.md
Comment thread doc/components/input-fields.md
@aweell aweell requested review from AnaMontes11 and Marcosld March 17, 2026 13:12
@aweell aweell marked this pull request as ready for review March 17, 2026 13:12

@Marcosld Marcosld left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we already define how do we intend to transition between this and a shared doc for devs and LLMs?

Comment thread scripts/generate-component-docs.js Outdated
Comment thread skills/mistica-react/references/API.md Outdated
Comment thread skills/mistica-react/references/CUSTOM_COMPONENTS.md Outdated
Comment thread doc/components/badge.md Outdated
Comment thread doc/components/badge.md Outdated
Comment thread doc/components/badge.md Outdated

### Don't use for

- Do not use it as a standalone content element; it should decorate another component

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't really like the word "decorate" because isnt a decoration (in terms of accessibility for example)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, actually badge is hidden to screen readers, so we could state that is decorative, but i would't use that wording either. I've removed this point since we use badges standalone.

Comment thread doc/components/badge.md Outdated
Comment thread doc/components/buttons.md
- Do not use secondary styling for the main conversion or progression action
- Do not present too many secondary actions in one group, which can dilute clarity
- Do not style destructive actions as secondary when risk needs explicit emphasis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see a lot of "style" verb in this rules... Looks like is talking about style css or something similar. I have doubts about let this kind of "doors" open (mainly to avoid confusion in a human or a machine that can think the buttons can be customize)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased

Comment thread doc/components/carousels.md Outdated
#### Use for

- Browsing related cards or modules when horizontal exploration is the intended interaction
- Revealing progressive content with clear page feedback (bullets) and optional directional controls

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would replace "bullet" by "page indicator" or similar maybe to make it more agnostic (also in description maybe)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may collision with new carousel definition? I was using page bullets / page counter

Comment thread doc/components/carousels.md Outdated

#### Use for

- Showing a small sequence of prominent slides (for example hero banners or featured stories) one page at a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mayb can we include Hero component to expose the possibility to combine with this component? (the same in hero component)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added

Comment thread doc/components/component-categories.js Outdated
Comment thread doc/components/component-categories.js Outdated
Comment thread doc/components/component-categories.js
Comment thread doc/components/buttons.md

## ButtonLinkDanger

ButtonLinkDanger is a low-emphasis destructive action used when risk exists but should not dominate the

@AnaMontes11 AnaMontes11 Mar 23, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would clarify the usage between ButtonDanger vs ButtonLinkDanger. Maybe something like: "Use ButtonDanger for primary destructive actions with maximum prominence; use ButtonLinkDanger for secondary destructive actions that need lighter emphasis."

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the first bullet point in Don't use for section to redirect users to buttonDanger in maximum prominence destructive actions

Comment thread doc/components/buttons.md
- Do not use ToggleIconButton for multi-step or multi-option choices beyond two states
- Do not use the same icon/label for checked and unchecked states when meaning changes
- Do not omit accessible naming for each state; state intent must be understandable to assistive tech
- Do not use toggle interactions when the action is not reversible or does not represent a true on/off state

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd simplify this to: "Do not use ToggleIconButton for actions that are not truly binary (on/off)." The "reversible" part is implied.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't say is implied and I would keep it, meaning the moment you use a toggle is not to go to a state you cannot come from again, since thats an action

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

Comment thread doc/components/cards.md
- Do not use large primary actions in this pattern when compact action treatment is expected
- Do not present decorative visuals without clear supporting message and intent

## CardActionIconButton

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component have no description or usage guidelines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Comment thread doc/components/cards.md

## CardActionIconButton

## CardActionSpinner

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component have no description or usage guidelines.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

Comment thread doc/components/cards.md
- Do not rely on deprecated small-card patterns when `NakedCard size="snap"` is the intended approach
- Do not overload transparent cards with excessive actions that reduce scanability on busy backgrounds

## HighlightedCard

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if they're still in the library we should document them. We could either:
-Keep individual files but add status: deprecated in the frontmatter with a note pointing to the replacement
-Group all deprecated cards into a single DeprecatedCards.md file with each as a subsection
Wdyt?

@@ -0,0 +1,369 @@
// @ts-check
// Component categories based on Storybook structure (src/__stories__)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The categories file looks good. After looking into this, adding a synonyms field could help improve search and LLM understanding for categories that might be searched by different names (eg "collapse" for accordions, "toggle" for switch, "tag" for chip). We can keep it as a future idea if we see it's needed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file was intended to help autogeneration, I should remove this with the removal of the script

- Do not rely on decorative circles alone to communicate critical information
- Do not use low-contrast background and border combinations that reduce legibility

## Touchable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference between Touchable and TouchableElement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed Touchable element, was the typescript type definition not the exported component

Comment thread doc/components/stacking-group.md Outdated

# StackingGroup

Use stacking group to display a compact set of similarly sized items, optionally overlapped, with a `+N` overflow indicator.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add information about the +N element?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, added!

Comment thread doc/components/switch.md Outdated
- Binary preferences or settings that can be turned on and off independently
- Cases where the state change is immediate and does not require a separate confirmation action
- Interfaces with short, explicit labels (or accessible labels) so users understand the effect of each toggle
- Optional custom switch row compositions where the control remains semantically exposed as a switch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we clarify what "switch row composition" means?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead I've added a new line in don't use for recommending using a row with built in switch support

Comment thread doc/components/tag.md
@@ -0,0 +1,22 @@

# Tag

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make this distinction explicit between Tag and Chip? We could reinforce in each component's documentation that they serve different purposes. Tag is for status/category (non-interactive), while Chip is for actions or selection (interactive).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated usage section redirecting users to the right component based on purpose

- Do not rely on overlay dismissal for destructive or irreversible flows without explicit confirmation
- Do not stack multiple independent overlays when a single coordinated layer can manage focus and dismissal

## FocusTrap

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FocusTrap, Portal, and applyAlpha have ambiguous descriptions. Could we follow how Overlay is documented to improve them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new set of component documentation pages under doc/components/, intended to describe Mística components/utilities and provide usage + accessibility guidance, plus a category map aligning docs with Storybook structure.

Changes:

  • Added many new Markdown docs for components (usage guidelines + accessibility sections).
  • Added doc/components/component-categories.js mapping Storybook-like categories to documented components.
  • Included documentation for utilities/hooks alongside UI components.

Reviewed changes

Copilot reviewed 52 out of 52 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
doc/components/accordions.md New docs for Accordion components + accessibility notes
doc/components/avatar.md New docs for Avatar usage guidance
doc/components/badge.md New docs for Badge usage + accessibility behavior
doc/components/breadcrumbs.md New docs for Breadcrumbs usage + accessibility behavior
doc/components/buttons.md New docs for button components + accessibility guidance
doc/components/callout.md New docs for Callout usage + accessibility roles/labels
doc/components/cards.md New docs for card components + accessibility guidance
doc/components/carousels.md New docs for carousel components + accessibility guidance
doc/components/checkbox.md New docs for Checkbox usage + accessibility guidance
doc/components/chip.md New docs for Chip usage + accessibility guidance
doc/components/community.md New docs for community components (blocks)
doc/components/component-categories.js Category-to-components mapping for docs alignment
doc/components/counter.md New docs for Counter usage + accessibility labels
doc/components/data-visualizations.md New docs for Meter usage + accessibility guidance
doc/components/empty-states.md New docs for EmptyState usage guidance
doc/components/feedback.md New docs for feedback screens/components
doc/components/forms.md New docs for Form-related APIs + accessibility guidance
doc/components/headers.md New docs for header components + heading accessibility
doc/components/hero.md New docs for Hero/CoverHero + accessibility guidance
doc/components/hooks.md New docs for hooks list (descriptions + usage guidance)
doc/components/input-fields.md New docs for input field components/utilities + accessibility
doc/components/layout.md New docs for layout primitives + accessibility guidance
doc/components/lists.md New docs for list components + accessibility guidance
doc/components/loading.md New docs for loading components + accessibility guidance
doc/components/logo.md New docs for Logo components
doc/components/menu.md New docs for Menu components + accessibility guidance
doc/components/modals.md New docs for modal/sheet/drawer patterns + accessibility guidance
doc/components/mosaic.md New docs for Mosaic components + accessibility guidance
doc/components/navigation-bars.md New docs for navigation bar components + accessibility guidance
doc/components/popover.md New docs for Popover usage + accessibility guidance
doc/components/primitives.md New docs for primitives (Image/Video/etc.) + accessibility guidance
doc/components/progress-indicators.md New docs for ProgressBar components + accessibility guidance
doc/components/radio-button.md New docs for RadioButton/RadioGroup + accessibility guidance
doc/components/rating.md New docs for Rating components + accessibility guidance
doc/components/select.md New docs for Select usage + accessibility guidance
doc/components/skeletons.md New docs for skeleton components usage guidance
doc/components/skip-link.md New docs for SkipLink/SkipLinkNav + accessibility guidance
doc/components/slider.md New docs for Slider usage + accessibility guidance
doc/components/snackbar.md New docs for Snackbar + useSnackbar + accessibility guidance
doc/components/stacking-group.md New docs for StackingGroup usage + accessibility guidance
doc/components/stepper.md New docs for Stepper usage + accessibility guidance
doc/components/switch.md New docs for Switch usage + accessibility guidance
doc/components/table.md New docs for Table usage + accessibility guidance
doc/components/tabs.md New docs for Tabs usage + accessibility guidance
doc/components/tag.md New docs for Tag usage + accessibility guidance
doc/components/text-link.md New docs for TextLink usage + accessibility guidance
doc/components/text.md New docs for Text + presets (Text1–Text10)
doc/components/timeline.md New docs for Timeline components + accessibility guidance
doc/components/timer.md New docs for Timer/TextTimer + accessibility guidance
doc/components/titles.md New docs for Title1–Title4 + heading accessibility
doc/components/tooltip.md New docs for Tooltip usage + accessibility guidance
doc/components/utilities.md New docs for theming/util utilities (contexts, overlays, helpers)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


#### Don't use for

- Don't use a timeline to guide a user through a step flow use the stepper or
Comment thread doc/components/loading.md

## Spinner

spinner. You can see how to apply spinner in buttons here.
Comment thread doc/components/loading.md
Comment on lines +72 to +80
#### Use for

- Collecting user input with clear labels and contextual help text
- Supporting validation and accessible feedback in form flows

#### Don't use for

- Don't use a spinner when:
- If you don’t want the spinner to be read by a screen reader, it can be deactivated.

## TimeField

information that the user needs to enter in the field.
Comment on lines +301 to +303
- For a better understanding of input usage in forms read our forms documentation.
- Collecting user input with clear labels and contextual help text
- Supporting validation and accessible feedback in form flows

## ThemeConfig

ThemeConfig provides reusable behavior to keep component logic consistent across the product.

## ThemeContext

ThemeContext provides reusable behavior to keep component logic consistent across the product.

## ThemeContextProvider

ThemeContextProvider provides reusable behavior to keep component logic consistent across the product.
Comment on lines +5 to +6
The Timeline component is used to represent events in a chronological timeline. It can be used to visually and
organizedly display processes,.
Comment on lines +438 to +444
- Collecting user input with clear labels and contextual help text
- Supporting validation and accessible feedback in form flows

#### Don't use for

- Do not use this component to display read-only information
- Do not hide validation context that users need to complete the task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants