Adaptivecards: At Dark theme buttons on adaptive cards become invisible.

Created on 4 Oct 2017  路  11Comments  路  Source: microsoft/AdaptiveCards

If the application uses RequestedTheme=DarkTheme, the button on adaptive cards become invisible. Element is still there, with white text on semitransparent white background (#33FFFFFF ). If application requesting light theme everything is fine:
image

AdaptiveCards.Renderer.Uwp 1.0.0-CI-20171003-101756 were used

AdaptiveCards v21.01 Area-Accessibility Area-Renderers Bug Platform-UWP Triage-Investigate

Most helpful comment

This problem does not affect my application directly, because I'm using my own hostConfig for each theme.
However, how others should know that your default config is a light theme? All your card backgropund and main color text was not changed (if compare Light/Dark theme usage), while both button background and button foreground were changed (is button colors are not part of config?).
It means that even while you are using your default config you are rewrite the buttons, and probably do not specify XAML brushes properly. Otherwise default windows themed button would have visible foreground, even if background of it is white.
For me looks like brushes problem inside your renderer.

All 11 comments

Please note that default HostConfig was used. I did NOT set my own hostConfig at this case.

Simple workaround is to assign the RequestedTheme on the containing FrameworkElement. You know you're using a host config that is meant for a light theme, so you can assign the RequestedTheme to light

What would be the ask here? There is only one default hostConfig, and the renderer is not Theme-Aware now. Should we provide two versions of HostConfig for light and dark theme? It feels to me like it's something the host app should manage.

Unless the properties in the host config are not enough to achieve the desired look depending on the theme.

This problem does not affect my application directly, because I'm using my own hostConfig for each theme.
However, how others should know that your default config is a light theme? All your card backgropund and main color text was not changed (if compare Light/Dark theme usage), while both button background and button foreground were changed (is button colors are not part of config?).
It means that even while you are using your default config you are rewrite the buttons, and probably do not specify XAML brushes properly. Otherwise default windows themed button would have visible foreground, even if background of it is white.
For me looks like brushes problem inside your renderer.

Adding this to the v1.0 milestone if it's still a valid bug

Yeah, I just hit this and was very confused. It'd be nice for the default render config to use theme aware brushes and resources in the generated XAML components.

@matthidinger is this still relevant? I wasnt able to repro this at least on the designer in prod today and the Microsoft Teams Dark theme card?

@rebeccaanne? This is specific to uwp renderer

From Ricardo's comment above it looks like the ask is for our default host config to be theme aware. Seems likely it would still be relevant, but if we wanted to tackle it we should do so as a post 1.2 feature.

Yup that's accurate. Definitely a post-1.2 feature.

Moving this into the current milestone for discussion as we're getting current reports of this being an issue.

Was this page helpful?
0 / 5 - 0 ratings