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.

Styleguide does not work with `sections`

See original GitHub issue

Current behavior

To reproduce

I am using this configuration:

'components': './client/components/**/*.vue',

Change it to this configuration:

'sections': [{
    'name': 'Atoms',
    'sections': [
      { 'components': './client/components/atoms/TButton.vue' },
      { 'components': './client/components/atoms/TInput.vue' }
    ],
  }, {
    'name': 'Molecules',
    'components': [],
  }, {
    'name': 'Organisms',
    'components': [
      './client/components/atoms/TCollapsableMenu.vue',
    ],
  }],

And now all components do not show up. Only white screen is shown.

Expected behavior

I expect it to work the same way.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:22 (14 by maintainers)

github_iconTop GitHub Comments

4reactions
elevatebartcommented, May 14, 2019

There was definitely a big issue here. will be fixed in 3.13.3, VSG was only picking up the first section registered.

Sorry about that

2reactions
bummzackcommented, May 14, 2019

Steps to reproduce:

git clone https://github.com/vue-styleguidist/vue-styleguidist.git
cd vue-styleguidist/examples/sections
npm install
npm run styleguide

Open http://localhost:6060/ in your browser, open the console and observe error messages like:

[Vue warn]: Unknown custom element: <Placeholder> - did you register the component correctly? For recursive components, make sure to provide the “name” option.

Also navigate to the “Placeholder” in the styleguide and observe how the component isn’t being rendered in the styleguide.

Now stop the styleguide server, run:

npm install -D vue-styleguidist@3.12.0
npm run styleguide

Open http://localhost:6060/ in your browser again. Observe how the error messages are gone and the “Placeholder” component gets rendered correctly.

I hope that helps narrowing down the issue. It seems to only happen when sections are being used. Without sections, the error didn’t show even with the latest versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cleaner way to define sections · Issue #164 · styleguidist/react ...
I did some work on our work in progress styleguide and I have to say: the current way of defining folders works pretty...
Read more >
Locating your components and organizing your style guide
If it doesn't work for you, create a styleguide.config.js file in your project's root folder and configure the patterns to fit your project...
Read more >
Google Python Style Guide
This style guide is a list of dos and don'ts for Python programs. ... pylint is a tool for finding bugs and style...
Read more >
Designing a styleguide: elements that go into building ...
First figure out what works and what doesn't work. ... Every styleguide should have a few sections detailing typography specifications.
Read more >
7 Website Style Guide Sections (With Visual Examples) - UXPin
Every important work needs an introduction. Before diving into the facts and figures, the first section(s) of a web design style guide are...
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