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 dddde09be5.

* 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
This commit is contained in:
Ken Sternberg
2025-03-05 08:39:45 -08:00
committed by GitHub
parent 0597a3450b
commit 7f474cde19

View File

@ -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`<section
slot="page-${convertToSlug(server.label)}"
data-tab-title="${server.label}"
class="pf-c-page__main-section pf-m-light pf-m-no-padding-mobile"
class="pf-c-page__main-section pf-m-no-padding-mobile ak-markdown-section"
>
<ak-markdown
.replacers=${replacers}