Storybook: Actions: Truncate string arguments

Created on 16 Jan 2020  路  4Comments  路  Source: storybookjs/storybook

Describe the bug
When launching an action and it contains a string argument, the spaces are truncated.

To Reproduce

I have the next action definition:

typingEvent: action(`(ngModelChange) event`)

An input component of angular with the next event:

(ngModelChange)="typingEvent($event)"

Event (ngModelChange) launches the following example string: "ddddddddddddx       "
but Storybook show "ddddddddddddx ", that is, truncate all spaces to just one.

Expected behavior
That the output be shown as it was received.

Screenshots

truncated string

System:

  System:
    OS: Windows 10 10.0.17134
    CPU: (8) x64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
  Binaries:
    Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.16.0 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.13.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: 42.17134.1098.0

Additional context

    "@storybook/addon-a11y": "^5.3.2",
    "@storybook/addon-actions": "^5.3.2",
    "@storybook/addon-links": "^5.3.2",
    "@storybook/addon-notes": "^5.3.2",
    "@storybook/addon-viewport": "^5.3.2",
    "@storybook/addons": "^5.3.2",
    "@storybook/angular": "^5.3.2",
actions bug

Most helpful comment

@shilman I'm working on this issue and will submit a PR as soon as possible

All 4 comments

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!

@shilman I'm working on this issue and will submit a PR as soon as possible

Crikey!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.21 containing PR #10046 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

Yee-haw!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.15 containing PR #10046 that references this issue. Upgrade today to try it out!

Was this page helpful?
0 / 5 - 0 ratings