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

Separators deprecation message when using ${obj.attr} in Meta title #12718

Open
Finrod927 opened this issue Oct 9, 2020 · 2 comments
Open

Separators deprecation message when using ${obj.attr} in Meta title #12718

Finrod927 opened this issue Oct 9, 2020 · 2 comments

Comments

@Finrod927
Copy link

Describe the bug
I just started to migrate to SB 6 and I get the deprecation message about hierarchy separators even if I already used '/' as separator. It seems to be caused by using ${obj.attr} in the Meta title: I import the package.json file to insert the version number in the sidebar:

import pkg from '../package.json'
import { Meta } from '@storybook/addon-docs/blocks'

<Meta title={`Docs v${pkg.version}/Changelog`} />

Probably a too generic regex.

To Reproduce
Steps to reproduce the behavior:

  1. Create a .mdx file with the example above
  2. Check the browser console

Expected behavior
No deprecation message

System

  System:
    OS: Windows 10 10.0.19041
    CPU: (12) x64 Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
  Binaries:
    Node: 12.18.2 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 86.0.4240.75
    Edge: Spartan (44.19041.423.0), Chromium (85.0.564.68)
  npmPackages:
    @storybook/addon-actions: ^6.0.26 => 6.0.26
    @storybook/addon-docs: ^6.0.26 => 6.0.26
    @storybook/addon-knobs: ^6.0.26 => 6.0.26
    @storybook/addon-links: ^6.0.26 => 6.0.26
    @storybook/addon-storyshots: ^6.0.26 => 6.0.26
    @storybook/vue: ^6.0.26 => 6.0.26
@stale
Copy link

stale bot commented Dec 25, 2020

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!

@stale stale bot added the inactive label Dec 25, 2020
@pouretrebelle
Copy link

I'm having the same problem, caused by having .s in a story title. I've chosen to do as suggested in #9761 (comment) and use a homoglyph (alternative unicode character) instead of the periods. In your case you could do ${pkg.version.replace(/\./g, '․')}

@stale stale bot removed the inactive label Jun 25, 2021
@shilman shilman removed the PN label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants