This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
authentik/web
Ken Sternberg 21e5441f92
web: patternfly hints as ak-web-component (#7120)
* web: patternfly hints as ak-web-component

Patternfly 5's "Hints" React Component, but ported to web components.
The discovery that CSS Custom Properties are still available in
child components, even if they're within independent ShadowDOMs,
made this fairly easy to port from Handlebars to Lit-HTML.  Moving
the definitions into `:host` and the applications into the root DIV
of the component made duplicating the Patternfly 5 structure
straightforward.

Despite the [Patternfly
Elements]documentation](https://patternflyelements.org/docs/develop/create/),
there's a lot to Patternfly Elements that isn't well documented,
such as their slot controller, which near as I can tell just makes
it easy to determine if a slot with the given name is actually being
used by the client code, but it's hard to tell why, other than that it
provides an easy way to determine if some CSS should be included.

* Pre-commit fixes.

* web: fix some issues with styling found while testing.

* web: separated the "with Title" and "without Title" stories.

* Added footer story, fixed some CSS.

* web: hint controller

Add the `ShowHintController`.  This ReactiveController takes a token
in its constructor, and looks in LocalStorage for that token and
an associated value.  If that value is not `undefined`, it sets the
field `this.host.showHint` to the value found.

It also provides a `render()` method that provides an `ak-hint-footer`
with a checkbox and the "Don't show this message again," and responds
to clicks on the checkbox by setting the `this.hint.showHint` and
LocalStorage values to "false".

An example web component using it has been supplied.

* web: support dark mode for hints.

This was nifty.  Still not entirely sure about the `theme="dark"`
rippling through the product, but in this case it works quite well.
All it took was defining the alternative dark mode values in a CSS
entry, `:host([theme="dark"]) { ... }` and exploiting Patternfly's
already intensely atomized CSS Custom Properties properly.

* web: revise colors to use more of the Authentik dark-mode style.

* Update web/src/components/ak-hint/ak-hint.ts

Signed-off-by: Jens L. <jens@beryju.org>

* remove any

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens L. <jens@beryju.org>
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens L <jens@goauthentik.io>
2023-10-12 10:44:15 -07:00
..
.storybook web: package up horizontal elements into their own components (#7053) 2023-10-04 13:07:52 -07:00
authentik/sources sources/oauth: fix reddit (#5557) 2023-05-09 23:41:24 +02:00
icons web, website: compress images (#6121) 2023-08-02 12:06:03 +00:00
src web: patternfly hints as ak-web-component (#7120) 2023-10-12 10:44:15 -07:00
xliff web: fix form default submit handler (#7122) 2023-10-12 15:12:46 +02:00
.babelrc web/admin: simplify sidebar renderer (#6797) 2023-09-11 12:58:55 -07:00
.dockerignore root: fix references to helm chart 2021-06-13 14:30:44 +02:00
.eslintignore web: bump @typescript-eslint/eslint-plugin from 5.61.0 to 6.0.0 in /web (#6210) 2023-07-11 14:32:50 +02:00
.eslintrc.json web: laying the groundwork for future expansion (#7045) 2023-10-02 13:33:27 -07:00
.eslintrc.precommit.json web: Detangling some circular dependencies in Admin and User (#6852) 2023-09-13 10:16:24 -07:00
.gitignore web: Add storybook (#5865) 2023-06-07 13:05:33 +02:00
.prettierignore enterprise: initial enterprise (#5721) 2023-07-17 17:57:08 +02:00
.prettierrc.json web: bump prettier from 2.8.8 to 3.0.0 in /web (#6329) 2023-07-21 18:19:19 +02:00
README.md web: Add storybook (#5865) 2023-06-07 13:05:33 +02:00
lit-localize.json web: locales: rename fr_FR to fr to match transifex 2023-10-02 13:31:21 +02:00
package-lock.json web: bump the babel group in /web with 5 updates (#7149) 2023-10-12 11:07:25 +02:00
package.json web: bump the babel group in /web with 5 updates (#7149) 2023-10-12 11:07:25 +02:00
robots.txt root: move webapp to /web (#347) 2020-11-28 19:43:42 +01:00
rollup.config.mjs web: bump rollup from 2.79.1 to 3.28.1 in /web (#6616) 2023-08-24 17:13:03 +02:00
rollup.proxy.mjs web: bump rollup from 2.79.1 to 3.28.1 in /web (#6616) 2023-08-24 17:13:03 +02:00
security.txt root: update supported versions 2023-01-20 14:23:21 +01:00
static.go outposts: release binary outposts (#1954) 2021-12-17 19:49:32 +00:00
static_outpost.go outposts: release binary outposts (#1954) 2021-12-17 19:49:32 +00:00
tsconfig.json web: Replace ad-hoc toggle control with ak-toggle-group (#6470) 2023-08-28 20:00:25 +02:00
web-test-runner.config.mjs web: basic cleanup of buttons (#6107) 2023-07-18 08:29:42 -07:00

README.md

authentik WebUI

This is the default UI for the authentik server. The documentation is going to be a little sparse for awhile, but at least let's get started.

Comments

NOTE: The comments in this section are for specific changes to this repository that cannot be reliably documented any other way. For the most part, they contain comments related to custom settings in JSON files, which do not support comments.

  • tsconfig.json:
    • compilerOptions.useDefineForClassFields: false is required to make TSC use the "classic" form of field definition when compiling class definitions. Storybook does not handle the ESNext proposed definition mechanism (yet).
    • compilerOptions.plugins.ts-lit-plugin.rules.no-unknown-tag-name: "off": required to support rapidoc, which exports its tag late.
    • compilerOptions.plugins.ts-lit-plugin.rules.no-missing-import: "off": lit-analyzer currently does not support path aliases very well, and cannot find the definition files associated with imports using them.
    • compilerOptions.plugins.ts-lit-plugin.rules.no-incompatible-type-binding: "warn": lit-analyzer does not support generics well when parsing a subtype of HTMLElement. As a result, this threw too many errors to be supportable.