Storybook: Update docs for 5.2 CSF: @writing-stories/#decorators. Please add angular solution - (in this ticket)

Created on 5 Mar 2020  路  4Comments  路  Source: storybookjs/storybook

Is your feature request related to a problem? Please describe.
Lack of 5.2 documentation for CSF at https://storybook.js.org/docs/basics/writing-stories/#decorators for angular users. Use of the latest spec across all frameworks would be more encourage with code snippets.

Describe the solution you'd like
Would be nice to see some demo code of how to implement this for an angular project

Are you able to assist bring the feature to reality?
Yes

Additional context
I found that the below worked for me. HOWEVER this is only on a individual level, would be great to declare the wrapper on the default story level.

import { TestComponent } from './test.component';
import { moduleMetadata, } from '@storybook/angular';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

export default {
  title: 'Elements|Test',
  decorators: [
      moduleMetadata({
        schemas: [CUSTOM_ELEMENTS_SCHEMA],
        declarations: [TestComponent]
      })
  ]
};

export const Test = () => ({
  component: TestComponent,
  template: `<div class="testClass">test text<app-test></app-test></div>`
});
angular documentation inactive

All 4 comments

I think we're going to do a documentation overhaul once 6.0 is released where we document all of the features for each framework. In the short term, if the Discord solution that you got is working well, maybe you can add it here as a placeholder, and then we can clean it up during the overhaul?

https://storybook.js.org/docs/guides/guide-angular/

Sure - I'll add that in tomorrow 馃憤 ASAP

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gongreg picture Gongreg  路  58Comments

p3k picture p3k  路  61Comments

dependencies[bot] picture dependencies[bot]  路  142Comments

ilyaulyanov picture ilyaulyanov  路  100Comments

maraisr picture maraisr  路  119Comments