question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding addon-options makes input from addon-knobs sluggish and unpredictable

See original GitHub issue

Describe the bug When adding the withOptions decorator, input from knobs became sluggish.

To Reproduce Steps to reproduce the behavior:

  1. Add addon-options to existing project which uses addon-knobs already, according to instructions.
  2. Setup withOptions with an empty object addDecorator(withOptions({})).
  3. View a story with knobs and edit text.

Expected behavior Input behaviour should not feel sluggish, and the typed string should be correct.

Screenshots Entering the string “Spain, a country with lots of fun and beaches” with the withOptions decorator added. Result is a garbled string of nonsense.

with_withoptions

The same string “Spain, a country with lots of fun and beaches” without the withOptions decorator.

without_withoptions

Code snippets If applicable, add code samples to help explain your problem.

System:

  • OS: Windows 8
  • Device: Desktop computer
  • Browser: Chrome 70.0.3538.77
  • Framework: React
  • Addons: knobs, a11y, notes, options
  • Version: 4.0.4

Additional context Having 13-14 components in my current project, and lots more to be done, I added the addon-options decorator to group components with the hierarchyRootSeparator option, but adding this made everything really sluggish. Commenting out the withOptions decorator makes every component work as expected again.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
ndelangencommented, Jan 19, 2019

In V5 the options addon is deprecated, as it’s now using the addParameters api.

This should resolve this issue completely.

1reaction
tmeasdaycommented, Jan 11, 2019

Hi @CodeByAlex! Sorry I wrote the above on my phone and I see it has autocorrected “debounce” to “denounce”!! 😅

Don’t worry, no-one is offended 😄 . I just figured you had more context than me and might be able to suggest a solution, which it seems you can!

I think it would definitely make sense to look at this in the ui-overhaul (now release/5.0 branch) as I believe knobs has changed there and in fact @shilman is currently working to get it (knobs) operational again before we merge release/5.0 to next. I’m sure he would appreciate any assistance and it may be a good time to fix this issue if it is still occurring there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding addon-options makes input from addon-knobs ...
Describe the bug. When adding the withOptions decorator, input from knobs became sluggish. To Reproduce Steps to reproduce the behavior:.
Read more >
Knobs Addon | Storybook: Frontend workshop for UI ...
Storybook Addon Knobs allow you to edit props dynamically using the Storybook UI. ... Add the `withKnobs` decorator to add knobs support to...
Read more >
Dependencies | father | npm - Open Source Insights
arrow_right @babel/plugin‑proposal‑decorators. 7.4.4 Notes Relation Version 7.4.4 Published April 26, 2019 Descri... arrow_right @storybook/addon‑a11y. 5.3.22 Notes Relation Version 5.3.22 Published January 10, 2022 Descri...
Read more >
storybookjs/storybook (Raised $170.00) - Issuehunt
The UI component explorer. Develop, document, & test for React, Vue, Angular, Ember, Web Components, & more! Owners:.
Read more >
Thorium-UI is Designed to be an Intuitive React.js Framework
React Lazy Load is an easy-to-use React component which helps you defer loading content in predictable way. It's fast, works in IE8+, 6KB...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found