-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Add main configuration API reference pages #22539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| </div> | ||
|
|
||
| For example, you can conditionally add scripts or styles, depending on the environment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now, both previewBody and previewHead use the same example. I think this analytics example is more appropriate for previewHead. Can anyone think of a different example for previewBody?
| title: 'Main configuration', | ||
| pathSegment: '', | ||
| type: 'menu', | ||
| children: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These (along with every list of anything within the API references) are ordered like so:
- Overview
- Required properties
- Optional properties
- Experimental properties
- Deprecated properties
And each of those are then ordered alphabetically.
eb049c3 to
663e37e
Compare
|
For people googling for "main.js config" or "main.ts config", I don't think the keywords in the headings would come through as obvious. Perhaps calling that out in a separate section would help:
In the sidebar:
|
663e37e to
4c2e2bf
Compare
|
@domyen —
Here's some my thinking on the H1: "main.js|ts configuration" is the most correct/expected, but looks terrible because of the "main.js configuration" or "main.ts configuration" too heavily implies that only one of the file extensions is accepted and the one not-used is then not searchable. Thus, the helpfully ambiguous "Main configuration".
Y'know, I thought that heading might look a little strange. It does, imo, but not nearly as much as I feared. I'll commit that.
I tried that: The |
|
@domyen —
I still think "configuration" should be there. |
|
Thanks for sharing that, I think the wdyt @shilman? |
b74e103 to
2501f57
Compare
shilman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @kylegach & sorry for the slow review. Commented a bit, but it's a huge PR so probably more to discuss.
|
Related discussion: #22629 (comment) |
- Always sort required properties first
- Add relevant snippets
- # config.core -> # core - ## `config.core.builder` -> ## `builder` - Add "Parent: [main.js|ts configuration](./Overview.md)" - Update TOC menu title
- Use `main-config-<property>-description` format, if possible - Use "your-framework" wherever possible - Always include `framework` & `stories` properties - Remove unnecessary properties
- Add `babelDefault` and `managerHead` pages - Fix broken links - Clarify when some properties are primarily used by addon authors - Document simplified options for `babel`, `babelDefault`, `viteFinal`, and `webpackFinal` - Add description for `core.channelOptions` - Remove the `previewMainTemplate` page - Document possible shortcomings of some `stories` configurations - Document limitations of some `typescript` options
96a0163 to
1d3262e
Compare
jonniebigodes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small item to address, and this should be good to go. Let me know and we'll go from there.
jonniebigodes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small item to address, and this should be good to go. Let me know and we'll go from there.
Add main configuration API reference pages
Merge pull request #22539 from storybookjs/api-reference-main-config





Linked to #17243
Related discussion: #22480 (comment)
What I did
framework,stories,addons, etc.)How to test
api-reference-main-configa. Completeness
- Is every property documented fully?
b. Correctness
- Types
- Required or not
- Default values
- Descriptions
- Example snippets
c. Consistency in structure
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:mergedorci:dailyGH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]