question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Notes are displaying from center of box.

See original GitHub issue

Describe the bug Notes are displaying from center of box.

To Reproduce Steps to reproduce the behavior:

  1. Create note

Expected behavior Aligned to left.

Screenshots image image

Code snippets Content of test.stories.js

import Vue from 'vue';
import { storiesOf } from '@storybook/vue';
import Link from '@/components/Link';
import LinkMarkdown from '@/stories/LinkMarkdown.md';

storiesOf('test', module).add(
  'Link',
  () => ({
    components: { Link },
    template: `<link :url="'test-url'" />`,
  }),
  {
    notes: { markdown: LinkMarkdown },
  }
);

Content of LinkMarkdown.md

#Also you can use markdown notes

System:

Environment Info:

  System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
  Binaries:
    Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.17.3 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 44.17763.1.0
  npmPackages:
    @storybook/addon-actions: ^5.1.11 => 5.1.11
    @storybook/addon-notes: ^5.1.11 => 5.1.11
    @storybook/vue: ^5.1.11 => 5.1.11

Additional context Using Chrome.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:30 (30 by maintainers)

github_iconTop GitHub Comments

1reaction
Aaron-Poolcommented, Sep 5, 2019

@patrickteivas k. FIxed it. You were using a deprecated story loading format. Also, the vue docs preset already contained the new Parameters you were adding.

Basically, change your config to:

import Vue from 'vue';
import { configure } from '@storybook/vue';
import { DocsPage, DocsContainer } from '@storybook/addon-docs/blocks';
import { action } from '@storybook/addon-actions';

Vue.component('nuxt-link', {
  props: ['to'],
  methods: {
    log() {
      action('link target')(this.to);
    }
  },
  template: '<a href="#" @click.prevent="log()"><slot>NuxtLink</slot></a>'
});

// Remove this completely
/*
addParameters({
  docs: {
    container: DocsContainer,
    page: DocsPage
  }
});
*/

// And change this
/*
function loadStories() {
  const req = require.context('../stories', true, /\.stories\.(js|mdx)$/);
  req.keys().forEach((filename) => req(filename));
}
// configure(loadStories, module);
*/

// To this
configure(require.context('../stories', true, /\.stories\.(ts|mdx)$/), module);

You’ll theeeeennnn get the <Logo/> component is not recognized. So change Logo.stories.mdx to:

import { Story, Preview, Meta } from '@storybook/addon-docs/blocks';
import Logo from '../components/Logo';

<Meta title="Addon|Docs" />

<Story name="Logo">
  {{
    components: { Logo },
    template: '<Logo />'
  }}
</Story>

Aaaaaaaannnnnddd theeeennn you’re good 👍

0reactions
patrickteivascommented, Sep 5, 2019

Big thanks to both of you, who helped me to set up addon-docs in my project. Created the feature request. Closing issue. #8004

Read more comments on GitHub >

github_iconTop Results From Across the Web

Box notes visible in Box Drive - Box Support
Box Notes are synced to your computer, just as with other documents, and they display in your Box Drive, however they can only...
Read more >
Write and format notes on Mac - Apple Support
In the Notes app on your Mac, in the sidebar, click the folder where you want to put the note. If you don't...
Read more >
Work with note containers - Microsoft Support
Note containers are flexible bounding boxes that contain the notes that you type or paste on a page. The note containers appear on...
Read more >
How to Center Notes in a SOLIDWORKS Drawing Title Block
To align it to the center of the box right-click on the note and select Snap to Rectangle Center from the shortcut menu....
Read more >
Box - Comments, Tasks and Notes - DotCIO
NOTE : Tasks can only be assigned to existing collaborators in a document. Tasks2.jpg [Task Activity area showing task communication]. Example of ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found