histoire-dev / histoire-dev/histoire

Wrong prop name 'variant' in Variant vue component types

Open
#829 0 comments 0 reactions 0 assignees View on GitHub
to triage
Dominant language
TypeScript
Stars
3.6k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

The meta props is named variant instead of meta in the component types https://github.com/histoire-dev/histoire/blob/f04001937b86d330d1b8df3483adbad4bfbcc57c/packages/histoire-plugin-vue/components.d.ts
(the actual code, sorry there is a bug from github that prevent me to provide a direct link to the correct line)
```
/**
* Free form meta data.
*
* You can type it with:
*
* ```ts
* declare module 'histoire' {
* // For both Story and Variant
* interface CommonMeta {
* myMeta: string
* }
*
* // Only for Variant
* interface VariantMeta {
* myMeta: string
* }
* }
* ```
*/
variant?: VariantMeta
```

but is declared as meta in the props of the component and is not working if using variant : https://github.com/histoire-dev/histoire/blob/f04001937b86d330d1b8df3483adbad4bfbcc57c/packages/histoire-plugin-vue/src/client/app/Variant.ts#L40 and in the docs : https://histoire.dev/guide/vue3/wrapper.html
### Reproduction

I can provide a reproduction if you want but it seems pretty obvious to me ?

### System Info

```shell
System:
OS: macOS 26.3
CPU: (10) arm64 Apple M2 Pro
Memory: 76.92 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.0 -
npm: 10.9.2 -
pnpm: 10.27.0 -
bun: 1.2.5 -
Deno: 2.6.8 -
Browsers:
Chrome: 145.0.7632.75
Firefox: 147.0.2
Safari: 26.3
npmPackages:
@histoire/app: 1.0.0-beta.1 => 1.0.0-beta.1
@histoire/controls: 1.0.0-beta.1 => 1.0.0-beta.1
@histoire/plugin-vue: 1.0.0-beta.1 => 1.0.0-beta.1
@histoire/shared: 1.0.0-beta.1 => 1.0.0-beta.1
@histoire/vendors: 1.0.0-beta.1 => 1.0.0-beta.1
@vitejs/plugin-vue: ^6.0.4 => 6.0.4
histoire: 1.0.0-beta.1 => 1.0.0-beta.1
vite: ^7.3.1 => 7.3.1
```

### Used Package Manager

pnpm

### Validations

- [x] Follow our [Code of Conduct](https://github.com/histoire-dev/histoire/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [Contributing Guidelines](https://github.com/histoire-dev/histoire/blob/main/CONTRIBUTING.md).
- [x] Read the [docs](https://histoire.dev/guide/).
- [x] Check that there isn't [already an issue](https://github.com/histoire-dev/histoire/issues) that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/histoire-dev/histoire/discussions).
- [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

Contributor guide

Open the contributing guide

Research direction

Start in packages/histoire-plugin-vue/components.d.ts and compare the Variant declaration with the props in packages/histoire-plugin-vue/src/client/app/Variant.ts. Check the Vue wrapper documentation as a reference for the intended prop name. Done means the component types expose the same metadata prop used by the implementation and documented usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.