Skip to content

Commit 7f474cd

Browse files
web/admin: fix markdown being completely whited out in dark mode on proxy provider pages (#13387)
* web: Add InvalidationFlow to Radius Provider dialogues ## What - Bugfix: adds the InvalidationFlow to the Radius Provider dialogues - Repairs: `{"invalidation_flow":["This field is required."]}` message, which was *not* propagated to the Notification. - Nitpick: Pretties `?foo=${true}` expressions: `s/\?([^=]+)=\$\{true\}/\1/` ## Note Yes, I know I'm going to have to do more magic when we harmonize the forms, and no, I didn't add the Property Mappings to the wizard, and yes, I know I'm going to have pain with the *new* version of the wizard. But this is a serious bug; you can't make Radius servers with *either* of the current dialogues at the moment. * This (temporary) change is needed to prevent the unit tests from failing. \# What \# Why \# How \# Designs \# Test Steps \# Other Notes * Revert "This (temporary) change is needed to prevent the unit tests from failing." This reverts commit dddde09. * web/admin: fix markdown being completely whited out in dark mode on proxy provider pages ## What Removed the `pf-m-light` hard-code specification from the wrapper for Markdown. ## Why Color themes backed with CSS custom properties are vulnerable to overspecification, and that's what this class did; overspecified the background color to always be in "light mode," which the Markdown component then inherited. ## Testing Create a proxy provider page for Forward Auth Proxy (Domain-Level). Using the browser's inspector, choose the "Styles" tab and click on the paintbrush. Alternate between dark mode and light, and observe that the styled markdown is changing color along with the rest of the application. ## Related Issue: - [Proxy Provider setup section completely whited out. #13335](#13335) * web/admin: use card background color directly when not in dark mode
1 parent 0597a34 commit 7f474cd

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

web/src/admin/providers/proxy/ProxyProviderViewPage.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import "@goauthentik/elements/buttons/SpinnerButton";
2525
import { getURLParam } from "@goauthentik/elements/router/RouteMatch";
2626

2727
import { msg } from "@lit/localize";
28-
import { CSSResult, PropertyValues, TemplateResult, html } from "lit";
28+
import { CSSResult, PropertyValues, TemplateResult, css, html } from "lit";
2929
import { customElement, property, state } from "lit/decorators.js";
3030

3131
import PFBanner from "@patternfly/patternfly/components/Banner/banner.css";
@@ -94,6 +94,11 @@ export class ProxyProviderViewPage extends AKElement {
9494
PFCard,
9595
PFDescriptionList,
9696
PFBanner,
97+
css`
98+
:host(:not([theme="dark"])) .ak-markdown-section {
99+
background-color: var(--pf-c-card--BackgroundColor);
100+
}
101+
`,
97102
];
98103
}
99104

@@ -188,7 +193,7 @@ export class ProxyProviderViewPage extends AKElement {
188193
return html`<section
189194
slot="page-${convertToSlug(server.label)}"
190195
data-tab-title="${server.label}"
191-
class="pf-c-page__main-section pf-m-light pf-m-no-padding-mobile"
196+
class="pf-c-page__main-section pf-m-no-padding-mobile ak-markdown-section"
192197
>
193198
<ak-markdown
194199
.replacers=${replacers}

0 commit comments

Comments
 (0)