From 7f474cde197794b1fe1c5ef150cc8111473055ae Mon Sep 17 00:00:00 2001 From: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com> Date: Wed, 5 Mar 2025 08:39:45 -0800 Subject: [PATCH] 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 dddde09be571a639ecd041569dd3a282aab3f9be. * 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](https://github.com/goauthentik/authentik/issues/13335) * web/admin: use card background color directly when not in dark mode --- web/src/admin/providers/proxy/ProxyProviderViewPage.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web/src/admin/providers/proxy/ProxyProviderViewPage.ts b/web/src/admin/providers/proxy/ProxyProviderViewPage.ts index 5af1050898..b9ccef5045 100644 --- a/web/src/admin/providers/proxy/ProxyProviderViewPage.ts +++ b/web/src/admin/providers/proxy/ProxyProviderViewPage.ts @@ -25,7 +25,7 @@ import "@goauthentik/elements/buttons/SpinnerButton"; import { getURLParam } from "@goauthentik/elements/router/RouteMatch"; import { msg } from "@lit/localize"; -import { CSSResult, PropertyValues, TemplateResult, html } from "lit"; +import { CSSResult, PropertyValues, TemplateResult, css, html } from "lit"; import { customElement, property, state } from "lit/decorators.js"; import PFBanner from "@patternfly/patternfly/components/Banner/banner.css"; @@ -94,6 +94,11 @@ export class ProxyProviderViewPage extends AKElement { PFCard, PFDescriptionList, PFBanner, + css` + :host(:not([theme="dark"])) .ak-markdown-section { + background-color: var(--pf-c-card--BackgroundColor); + } + `, ]; } @@ -188,7 +193,7 @@ export class ProxyProviderViewPage extends AKElement { return html`