storybookjs/storybook

[Bug]: [v7.0.0-beta.16] migration scripts formatting prevents clicking or copy-pasting links

Open

#20,444 创建于 2022年12月30日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)TypeScript (89,909 star) (10,058 fork)batch import
bughelp wantedsev:S4

描述

Describe the bug

The "box" formatting that’s used to output results from migration scripts is making it hard to use long links. Here is what the output looks like visually:

storybook-formatting

My terminal (iTerm2) normally auto-detects links so I can "cmd-click" to open in the browser. That’s not working because of the ASCII formatting used here cutting the link text in half. This formatting also gets in the way of manually selecting the text to copy-paste it into the browser URL bar:

https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#start-st   ││   orybook--build-storybook-binaries-removed

To Reproduce

This can be reproduced on more or less any v6 project I believe so I won’t create a separate repro. Here is one I provided for #18662 if it helps: https://github.com/thibaudcolas/storybook-react-16.

Steps:

  1. Get a Storybook v6 project with at least one build-storybook or start-storybook run-script.
  2. Run npx sb@next upgrade --prerelease
  3. Attempt to click the "In case this migration did not cover all of your scripts" link.

System

Environment Info:

  System:
    OS: macOS 13.1

[…]

iTerm2 Build 3.4.18
zsh 5.9

Additional context

As an aside I’m surprised by the use of the term "binary" in this migration script:

Starting in Storybook 7, the start-storybook and build-storybook binaries have changed to storybook dev and storybook build respectively. In order to work with Storybook 7.0.0-beta.16, your storybook scripts have to be adjusted to use the binary. We can adjust them for you:

Those things do live in the .bin folder but they don’t contain binary code compiled for my machine, so I’d have expected either "executable" or even the more abstract term "command".

贡献者指南