MattRudy / PowerBI-ThemeTemplates

JSON Templates for assembling Power BI Themes
The Unlicense
202 stars 72 forks source link

Slicers - Missing theme setting for search box background #8

Open MattRudy opened 2 years ago

MattRudy commented 2 years ago

Source: Cloned from Issue 18 created by @aaronsteers in the original repository.

Part 1 I'm not sure if this is a missing setting or missing configurability on the Power BI product side.

Currently, the background color for a slicer search box is always "white" (#ffffff) and the search box text color appears to be pulled from the top-level theme "foreground" setting - which for a dark mode is likely also "white". The result is a white-on-white search box that isn't readable - and worse, if typed in by the user creates an invisible filter against the slicer's context.

The only workaround I have found is to completely disable search boxes in slicers and then hope the user does not re-enable them. This is especially painful for "dark mode" themes (my use case) but it may be affecting others as well.

Any assist or workaround would be greatly appreciated. Thanks!

Part 2 Related: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/38574625-enable-setting-the-background-of-search-box-in-sli

Part 3 Temporary workaround is to use a non-white color (blue in the below example) for the "label" text class.

Example:

{
 "name": "sample theme snippet",
  "textClasses": {
    "label": {
      "fontSize": 12,
      "fontFace": "Segoe UI",
      "color": "#c2d8fe"
    }
  }
}

Part 4 Update: When setting the "label" text class, this also overrides the default text box color - which also appears to not be independently configurable. It would therefor be helpful to know if there's also a way to override the default font color for text boxes. (The repo here shows a sample to override the background color but not the default text color for text boxes.)

MattRudy commented 2 years ago

Ping @aaronsteers who created and researched the original issue - follow this for a resolution soon!

MattRudy commented 2 years ago

Investigating this as a solution - set the font/background defaults for everything on the base level '*' of a slicer, then overwrite them all for items, background, title, etc.

https://community.powerbi.com/t5/Desktop/How-to-change-slicer-search-box-text-font-and-color-in-Power-BI/m-p/815141

MattRudy commented 2 years ago

When resolved, update these: https://community.powerbi.com/t5/Issues/Innovate-Theme-Issue/idi-p/795061 https://community.powerbi.com/t5/Desktop/Slicer-not-showing-text-during-search-Only-on-Innovative-Theme/m-p/889363