React-styleguidist: 6.0.0 release

Created on 27 Jun 2017  ·  27Comments  ·  Source: styleguidist/react-styleguidist

It’s all about Markdown examples improvements:

  • [x] Modifiers for fenced code examples (#257, #511)
  • [x] Default modifiers: static and noeditor
  • [x] Ability to add custom modifiers via style guide config (#269)
  • [x] Make modifiers case-insensitive
  • [x] Update docs

Optional:

  • [x] Remove webpack 1 support (#512)

Not sure about the last one because it turned out to be a lot of work. If anyone wants to help with that — we can do it, otherwise I’d postpone it to the 7.0.0.

All work will be in the six branch.

help wanted request for comments

Most helpful comment

🍕 6.0.0 is out!!!! 🥓

All 27 comments

Why the major bump?

Because we’re changing the default behavior for fenced code blocks with js/jsx/javascript language.

How much time do you think it'll take this branch to be fully done, and would it be possible to coincide it with initial offering of plugin API?

Depends on (1) how many people will want to help, (2) will we include webpack removal (I guess not ;-) and (3) what we want to include in initial plugins API.

I guess it’s possible to have some undocumented plugin API ;-)

@sapegin , what reason to "Make modifiers case-insensitive"?

"Ability to add custom modifiers via style guide config"
Just merge modifiers from styleguide.config with passed to example in .md?
what we should implement?
jsx { "file": "../components/button/index.jsx" }

````

````

I would ask for a reason to make it case-sensitive ;-) It improves the UI — users don’t have to remember the correct casing. But I think it’d be enough to make space-separated modifiers case-insensitive.

Just merge modifiers from styleguide.config with passed to example in .md?
what we should implement?

I mean some kind of filters or transformers that could be defined in the config (and later in plugins) that would allow users to implement thing like this file loader. Something like this could work:

function({ contents, lang, modifiers }) {
  if (typeof modifiers.file === 'string') {
    const filepath = modifiers.file;
    delete modifiers.file;
    return {
       contents: fs.readFileSync(filepath),
       modifiers,
       lang,
  }
}

@sapegin, I dont like idea with case-insensitive. Because if implement something like loop on example settings object keys and override all keys with lowercase in example plugins(read as preprocessors) developers will should work with case insensitive parameters.

    ```jsx {"static": true, "supernoreactexamplepreprocessorwithlongname": true }
    ```

We use showCode, if we want to use 'showcode' - we should also support caseinsensitive props for styleguide.config https://react-styleguidist.js.org/docs/configuration.html#showcode

I think case-insensitive is not an opportunity that many people need.
let's think about it if the proposal goes

You’re thinking only about your own use case with JSON ;-) For most users it would be space-separated list and there’s no point in memorizing if it’s showcode or showCode — both should work the same.

@sapegin case-insensitive pushed to https://github.com/styleguidist/react-styleguidist/pull/525
check this PR, please

@sapegin could you please update docs and, i think, we can release 6.0.0?

Yeah, I’ll do that! Thanks for the work on that release!! 🍕

@sapegin , do you need any help?

How about a beta release?

@stepancar I need more time ;-)

@n1313 Yup, will try to do it in the next few days.

@sapegin, when we can publish six version of RSG?

As soon as I can — you can use the branch already.

🍕 6.0.0 beta is out!! 🍕

I have a question after reading https://github.com/styleguidist/react-styleguidist/releases/tag/v6.0.0-beta.1: is there a difference between "live editable preview" and "interactive preview"? If these are the same things then I think they should be described using the same terms to avoid confusion.

I migrated our project to six styleguidist.
Works fine.
Also i added linter for .md files using https://github.com/eslint/eslint-plugin-markdown
It's very helpful linter plugin for styleguidist users

@n1313 Nope, but you’re right we should choose one. Which one do you like more? The second looks simpler ;-)

@sapegin I agree

Is there anything we should do before the stable release?

This is great! Congrats 😁

I think No

🍕 6.0.0 is out!!!! 🥓

@stepancar Thanks for making this release possible!! 🍕🍦🦄

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ZwaarContrast picture ZwaarContrast  ·  4Comments

eduardoinnorway picture eduardoinnorway  ·  3Comments

magicmark picture magicmark  ·  3Comments

mheathcote1977 picture mheathcote1977  ·  3Comments

davidjb picture davidjb  ·  3Comments