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: Snapshot testing and bug reporting for props tables #9838

Merged
merged 39 commits into from
Feb 15, 2020

Conversation

shilman
Copy link
Member

@shilman shilman commented Feb 13, 2020

Issue: #9836

What I did

  • React tests / stories
  • Document process
  • Vue tests / stories
  • Angular tests / stories
  • Ember tests / stories
  • Web-components tests / stories
  • Sweep of existing issues to add them or de-dupe them

How to test

See attached tests

Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

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

Yeah, this seems good.

Comment on lines +10 to +15
fixtures.forEach(fixture => {
// eslint-disable-next-line import/no-dynamic-require, global-require
const { component } = require(`./__testfixtures__/${fixture}/input`);
const props = extractProps(component);
stories.add(fixture, () => <PropsTable {...props} />);
});
Copy link
Member

Choose a reason for hiding this comment

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

We could also just manually do the exports so this file can be CSF

@shilman shilman mentioned this pull request Feb 13, 2020
Copy link
Member

@kroeder kroeder left a comment

Choose a reason for hiding this comment

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

Without knowing much about snapshot testing => LGTM

selector: 'doc-button',
})
export class InputComponent<T> {
@ViewChild('buttonRef', { static: false }) buttonRef: ElementRef;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ViewChild('buttonRef', { static: false }) buttonRef: ElementRef;
@ViewChild('buttonRef') buttonRef: ElementRef;

this defaults to false in Angular 9 (I think the angular 9 update PR should be merged already? 🤔 )
Not super important but makes it easier to read

addons/docs/src/frameworks/angular/compodoc.ts Outdated Show resolved Hide resolved
@EdenTurgeman
Copy link

EdenTurgeman commented Feb 25, 2020

@shilman So, are typescript prop tables supported natively on the latest beta without storybook-addon-react-docgen?

edit: I'm asking because I can't find any explicit reference to that in the pr :)

@shilman
Copy link
Member Author

shilman commented Feb 25, 2020

Yes. Still working out the dependencies tho

@ecarrera
Copy link

Hi @shilman, I would like to know any news about props table for Vue, I'm currently testing on 6.0.0-rc.14 and the props table is really fine, but I'm wondering if there is support for @binding in @slot and @property in @event.

https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#events

https://github.com/vue-styleguidist/vue-styleguidist/tree/dev/packages/vue-docgen-api#slots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs block: props maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants