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.

[FEATURE] add broader themes

See original GitHub issue

Currently we can define a theme to set specific attributes of specific models like below from the examples in https://docs.bokeh.org/en/latest/docs/reference/themes.html

attrs:
    Figure:
        background_fill_color: '#2F2F2F'
        border_fill_color: '#2F2F2F'
        outline_line_color: '#444444'
    Grid:
        grid_line_dash: [6, 4]
        grid_line_alpha: .3
    Title:
        text_color: "white"

Would it be possible to add something a bit more powerfull like matplotlib’s rcParams to set attributes like text properties for all the text in the document. For example with matplotlib we can do rcParams.update({'font.size':15}) and the font size of all text, from titles, to axis labels, to legend labels, is updated.

Alternatively I loop over all the models I know in the document that have text, look at their .properties_with_values() dictionary, and build the theme dictionary by looking for all the attributes that include e.g. “text_font_size”.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Feb 19, 2020

Thinking about this also from the other issue wanting to target themes to named objects, I might suggest this instead:

# theme by mode type
attrs:
    Figure:
        background_fill_color: '#2F2F2F'

# theme by model name
names:
    # ignore values when they don't apply to a model with the name?
    major_label_orientation: 0.4

# theme by property kind
props:
    text_font: "arial"

I don’t support further subdividing attrs There is no point it having attrs in the file at all if it is the only valid top level construct. I’d rather split things at the top level, and also avoid weird syntax with * etc

0reactions
mattpapcommented, Apr 3, 2020

I consider this as completed based on PR #9755. If that’s not the case, please reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Themes: Organize Your Product Roadmap to Show Value
Organize your product roadmap by grouping initiatives together into themes. This way, you can better communicate value.
Read more >
Ability to group features into themes - Aha! Big Ideas
It would be useful to be able to categorise features into themes and be able to see a visual heirarchy of release >...
Read more >
How to Develop a Theme for Your Story - 2022 - MasterClass
A story theme is a broad conceptual philosophy that an author wishes to convey through their literary work. To extract a story's theme, ......
Read more >
How to develop story themes: 5 theme examples - Now Novel
The recurring ideas or broad themes of books give us insights into ideas such as 'love', 'honor', 'good vs evil' and much more....
Read more >
Feature-less Roadmap: The Balance Between Delivering ...
Themes speak to Themes speak to larger goals and objectives, which is what stakeholders ultimately care about.larger goals and objectives, which ...
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