Storybook: enableShortcuts not working in v5

Created on 20 Apr 2019  Â·  21Comments  Â·  Source: storybookjs/storybook

Describe the bug
The enableShortcuts and isFullscreen options are not working as expected.

To Reproduce
Add this to config.js (skipping boilerplate)

addParameters({
  options: {
    enableShortcuts: false,
    isFullScreen: true,
  },
})

Expected behavior
Shortcuts should be disabled.
Story should be fullscreen.

System:
Version: 5.x

PN options bug todo ui

Most helpful comment

Adding a comment to beat back the inactivity bot. I find the keyboard shortcuts pretty disruptive, so having a working config option to disable them would be great.

All 21 comments

isFullscreen working for me. What are you seeing?

enableShortcuts isn't working -- seems like a bug.

@shilman I see, you are using isFullscreen not isFullScreen...

In the docs, the parameter is written as isFullScreen but the implementation expects isFullscreen.

I'm not sure which is the "correct", but I suppose updating the docs would be easier.

Edit: isFullScreen is also misspelled here (line 80)

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!

Adding a comment to beat back the inactivity bot. I find the keyboard shortcuts pretty disruptive, so having a working config option to disable them would be great.

+1 from me as well. Also, how's it going @shilman 😄 -- saying hi from a distant past from Zippy.

+1

Bumping. Storybook's keyboard shortcuts are gobbling all of my components' keypresses. This decoy config option is a day ruiner, big time :(

Anybody want to take this?

cc @Jessica-Koch @tmeasday @ndelangen

I can look into it

Sent from my iPhone

On Sep 4, 2019, at 2:37 AM, Michael Shilman notifications@github.com wrote:

Anybody want to take this?

cc @Jessica-Koch @tmeasday @ndelangen

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@Jessica-Koch I took a stab at it - maybe you can help review the PR?

@atanasster i may be missing something, i don't see your PR, but i'd be more than happy to look into it

Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.0-rc.6 containing PR #7990 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.

I've just installed 5.2.8 and have run into this problem.

Did you try clearing localStorage?

@shilman that did the trick. Thank you!

still have this issue, the version I use is ^5.3.17

+1 from me. I am on 5.3.18 and am facing the same issue. I can see in the localStorage that the @storybook/store/ui object contains a enableShortcuts: false property, but the shortcuts are still displayed.

EDIT

Here is my addParameters in my preview.js:

addParameters({
  docs: {
    inlineStories: false
  },
  options: {
    theme: create({
      base: 'light',
      brandImage: './img/pra-react-components-lettermark200x38.png',
      brandTitle: 'PRA React Components',
      brandUrl: 'TBD'
    }),
    enableShortcuts: false,
    docsMode: true
  }
});

I must say that I'm a bit confused as to where to put this. Like I said it's currently in .storybook/preview.js but the documentation mentions putting global configs in the manager.js. When I do that, I see no change, and the localStorage entries I mentioned above don't appear.

// preview.js
addParameters({
  docs: {
    inlineStories: false
  },
  options: {
    enableShortcuts: false,
    docsMode: true
  }
});
// manager.js
addons.setConfig({
  theme: create({
      base: 'light',
      brandImage: './img/pra-react-components-lettermark200x38.png',
      brandTitle: 'PRA React Components',
      brandUrl: 'TBD'
    }),
})

I hope that helps?

Sorry for my late reply on this, but I just tried @ndelangen suggestion and I still see the shortcuts dropdown being displayed. Do I need addons added to the front of the setConfig? Docs show that as part of the manager.js.

I've the same problem. Any news about this?

Same issue with V6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sakulstra picture sakulstra  Â·  3Comments

purplecones picture purplecones  Â·  3Comments

rpersaud picture rpersaud  Â·  3Comments

levithomason picture levithomason  Â·  3Comments

MrOrz picture MrOrz  Â·  3Comments