Repository navigation
Vue: Expose docgen provider, inject in manifest and gate behind vue-component-meta only - #35670
Conversation
2990f44 to
4a99e43
Compare
5213816 to
f1108d9
Compare
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughChangesVue docgen service integration
Sequence Diagram(s)sequenceDiagram
participant Vue3VitePreset
participant resolveDocgenSetup
participant DocgenWorker
participant ManifestAccumulator
Vue3VitePreset->>resolveDocgenSetup: resolve docgen and service usage
resolveDocgenSetup-->>Vue3VitePreset: return service usage flag
Vue3VitePreset->>DocgenWorker: register worker descriptor
Vue3VitePreset->>ManifestAccumulator: add component metadata
Possibly related PRs
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
code/frameworks/vue3-vite/src/preset.test.ts (1)
9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse spy mocks configured in
beforeEach.Replace the module factories with
vi.mock(path, { spy: true }), import the exported plugins, and implement the async return values throughvi.mocked(...)inbeforeEach. This follows the Vitest test mocking rule and keeps mock behavior per-case instead of encoded at module scope.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@code/frameworks/vue3-vite/src/preset.test.ts` around lines 9 - 17, Update the module mocks in preset.test.ts to use Vitest spy mocks via vi.mock with { spy: true } for the three plugin modules, then import templateCompilation, vueComponentMeta, and vueDocgen and configure their async return values with vi.mocked(...) inside beforeEach. Remove the module-scope factory implementations so each test can control mock behavior independently.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@code/frameworks/vue3-vite/src/preset.test.ts`:
- Around line 9-17: Update the module mocks in preset.test.ts to use Vitest spy
mocks via vi.mock with { spy: true } for the three plugin modules, then import
templateCompilation, vueComponentMeta, and vueDocgen and configure their async
return values with vi.mocked(...) inside beforeEach. Remove the module-scope
factory implementations so each test can control mock behavior independently.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8d077e92-fc74-4745-b050-e8f590cd9753
📒 Files selected for processing (6)
code/core/src/types/modules/core-common.tscode/frameworks/vue3-vite/src/docgen/options.tscode/frameworks/vue3-vite/src/docgen/preset.test.tscode/frameworks/vue3-vite/src/docgen/preset.tscode/frameworks/vue3-vite/src/preset.test.tscode/frameworks/vue3-vite/src/preset.ts
valentinpalkovic
left a comment
There was a problem hiding this comment.
Second review pass. For transparency: I paired this with an AI code-quality review (the Cursor "thermo-nuclear code quality review" skill), then filtered it down to only the findings that are genuinely new on top of my earlier comments. A couple are deliberately low-confidence questions rather than blockers - flagged inline. 🙂
4a99e43 to
5521aa1
Compare
f1108d9 to
0056678
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@code/frameworks/vue3-vite/src/preset.test.ts`:
- Around line 9-17: Update the Vitest mocks for templateCompilation,
vueComponentMeta, and vueDocgen to use vi.mock(modulePath, { spy: true })
instead of factory implementations. Import each factory, access it through
vi.mocked(), and configure its mockResolvedValue plugin object inside beforeEach
so the spies remain type-safe and resettable between tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 56388200-f7c0-4ba8-abcf-d90925300100
📒 Files selected for processing (6)
code/core/src/types/modules/core-common.tscode/frameworks/vue3-vite/src/docgen/options.tscode/frameworks/vue3-vite/src/docgen/preset.test.tscode/frameworks/vue3-vite/src/docgen/preset.tscode/frameworks/vue3-vite/src/preset.test.tscode/frameworks/vue3-vite/src/preset.ts
5521aa1 to
01ccf9a
Compare
1604c2e to
6ff1624
Compare
1c94c86 to
8d33d89
Compare
09d0d85 to
5e0e9ec
Compare
7d92b8e to
388f139
Compare
5e0e9ec to
2c2eea5
Compare
388f139 to
e2269f5
Compare
2c2eea5 to
519ce07
Compare
4a29d7e to
2c2eea5
Compare
77c16ed to
7b02459
Compare
e48866e to
bb9b741
Compare
bd9a59b to
df12640
Compare
a0187b6 to
a752a56
Compare
Core: Add lazy-docgen-middleware
Closes #
What I did
This pR makes vue renderer exposes dogenProvider and manifest in preset to:
vue-omponent-metaandexperimentalDogenServeris enabledvuecomponentMetafieldChecklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsDeclare whether manual QA will be needed for this PR during the next release, through
qa:neededorqa:skipMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>