Skip to content
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

Addon-docs: Add docs index configuration via main.js #18573

Merged

Conversation

tmeasday
Copy link
Member

Added three options on the top-level field docs:

  • enabled - if unset, we don't generate any type: docs entries
  • defaultName - what name to use for docs entries?
  • docsPage - [NOT YET USED] -- will be used to drive the creation of docs entries per-CSF file.

How to test

  • See unit tests
  • Can also set the field in an example app and see if enabled disables docs entries, and defaultName changes the entry for "Examples/Button":

image

@tmeasday tmeasday added feature request maintenance User-facing maintenance tasks addon: docs labels Jun 26, 2022
@tmeasday tmeasday requested a review from shilman June 26, 2022 12:07
@nx-cloud
Copy link

nx-cloud bot commented Jun 26, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 45f141b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@tmeasday tmeasday force-pushed the tom/sb-450-index-docspage-processing-configuration branch from ae3be2b to 1642483 Compare June 29, 2022 11:13
@tmeasday tmeasday force-pushed the tom/sb-450-index-docspage-processing-configuration branch from 1642483 to 814885f Compare July 1, 2022 02:07
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

Mostly LGTM. A couple nits.

@@ -1,8 +1,14 @@
import express, { Router } from 'express';
import compression from 'compression';

import type { CoreConfig, Options, StorybookConfig } from '@storybook/core-common';
import { normalizeStories, logConfig } from '@storybook/core-common';
import {
Copy link
Member

Choose a reason for hiding this comment

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

This goes against the coding style established by @ndelangen where the types & concrete imports are always separate. We should update it OR update the project style guidelines

Copy link
Member Author

Choose a reason for hiding this comment

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

Can we maybe get linting setup for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess I see now that's why it does a yellow twiddle on it.

addons/docs/src/preset.ts Outdated Show resolved Hide resolved
@shilman shilman changed the title Allow configuring docs index processing via main.js Addon-docs: Add docs index configuration via main.js Jul 6, 2022
@tmeasday tmeasday requested a review from shilman July 6, 2022 09:02
@tmeasday tmeasday force-pushed the tom/sb-450-index-docspage-processing-configuration branch from ab17703 to c547333 Compare July 6, 2022 09:10
@shilman
Copy link
Member

shilman commented Jul 7, 2022

@tmeasday can you

  • resolve merge conflicts
  • get the build green

let me know if you need any help with the latter

@tmeasday tmeasday force-pushed the tom/sb-450-index-docspage-processing-configuration branch from c547333 to 45f141b Compare July 7, 2022 02:00
@tmeasday
Copy link
Member Author

tmeasday commented Jul 7, 2022

@shilman I think it is green now apart from one flaky chromatic test that I believe @ghengeveld introduced (and maybe fixed)?

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM. Merging!

@shilman shilman merged commit 7acce54 into future/base Jul 7, 2022
@shilman shilman deleted the tom/sb-450-index-docspage-processing-configuration branch July 7, 2022 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants