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.

[ENH] Add ability to specify not only class names, but also ids to newly created widgets

See original GitHub issue

If on needs to manipulate the style or behavior of the widget from the js side, one has to use a class selector, which is suboptimal when having more than one widget of the same kind in the page.

Add e.g. add_id() method just below https://github.com/jupyter-widgets/ipywidgets/blob/master/ipywidgets/widgets/domwidget.py#L20

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
rheilandcommented, Feb 1, 2019

Is there a (easy) way to make a Label boldfont or in color? I know we can make it italicized, e.g.: Label(value=r'\(This\ is\ a\ description\)'), but that seems a bit cumbersome. And how would one allow for “<” and “>” symbols? E.g., how can one display Label(‘A < B and C > D’), preferably in a color, say, red?

0reactions
b3m2a1commented, Mar 22, 2022

Following up on https://github.com/jupyterlab/jupyterlab/issues/12252, the (lack of) ability to add names/ids to my HTML elements is becoming a huge hassle since I need to litter my interface with <a name="..."></a> tags so I can select against them in what is quickly becoming a shadow DOM…as JupyterLab decided to nerf any JS communication it would be nice to at least provide a way to add this little bit of help to the HTML the widgets create

Read more comments on GitHub >

github_iconTop Results From Across the Web

Widgets Basic Overview (EX)
About Widgets. Widgets are where your Dashboard's pages come to life. Qualtrics has many different widgets that can help you view your data...
Read more >
Create a simple widget
App widgets are miniature application views that can be embedded in other applications (such as the home screen) and receive periodic updates.
Read more >
Advanced customization of Web Widget (Classic)
This command sets the language for only the widget and doesn't override your ... You can also set user information to be read-only...
Read more >
Widget CSS Classes – WordPress plugin
Add custom classes and ids plus first, last, even, odd, and numbered classes to your widgets.
Read more >
Customize an InstantSearch.js widget
The different class names used by each widget are described on their respective documentation pages. You can also inspect the underlying DOM and...
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