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.

Ability to rename Knobs / Actions Tab-Titles

See original GitHub issue

Would be cool to have the ability to use own title for Knobs and Actions tabs to make it more consistent with other frameworks like Vue: Props and Events.

If I look at the code it’s hopefully not to difficult.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
aviraminycommented, Nov 25, 2019

This is not such a good workaround and relies on runtime, i wish there was a proper config for this.

2reactions
diamond-darrellcommented, Nov 25, 2019

Hi psi-4ward, you can rename the Tab title by acessing the addons object in your config.

import addons from '@storybook/addons';

addons.elements.panel['storybookjs/knobs/panel'].title = 'Props';
addons.elements.panel['storybook/actions/panel'].title = 'Event';

actually this doesn’t work for me at all i get an empty addons.elements object. It seems to me that the addon register is delayed and that is why it isn’t adding the element yet during the configure phase. PS - i am using storybook v5.2.1

wrapping assignment in setTimeout worked out for me

This didn’t work for me from the config.js file but did work from the addons.js file

import addons from "@storybook/addons";

setTimeout(function() {
  addons.elements.panel["storybookjs/knobs/panel"].title = "Props";
  addons.elements.panel["storybook/actions/panel"].title = "Events";
}, 0);

yes, I’m sorry, I should’ve mentioned it, I did this in the addons.js file as well as you are

Read more comments on GitHub >

github_iconTop Results From Across the Web

chrome/browser/flag_descriptions.cc - chromium/src - Google Git
"Enable the ability to customize captions.";. const char kContextMenuSearchWithGoogleLensName[] = "Google Lens powered image search in the context menu.";.
Read more >
Dashboards and Stories User Guide - IBM
You can undo and redo your last actions in succession. The ability to undo and redo previous actions is available until you close...
Read more >
Revision History for ARCHIBUS V20.1
Handles corner conditions in document import. ... Now supports event listeners for onCheckInDocument and onDeleteDocument actions so that application views ...
Read more >
Restoring 600 tabs at once can make browser completely ...
this is a fundamental problem (not being able to restore a browser session). ... First I renamed "Current Session" and "Current Tabs" (Bad...
Read more >
IBM Cognos Analytics Version 11.1: New Features Guide
In addition, the Information Distribution license role is renamed to Analytics. Viewer. • The Manage Visualizations capability allows users to control access ...
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