Everywhere else, the label "Attributes" refers to the dictionary field that our
core models have and use as a JSON repository for key/value pairs that don't need
the full model's awareness or management. Using the same label here, where the
term refers to the context data of the invitation itself, may confuse people,
so we've changed the label to signal its difference.
* main:
web: patternfly hints as ak-web-component (#7120)
web: fix form default submit handler (#7122)
web/admin: add additional Flow info (#7155)
tests: fix potential infinite wait in tests spinning up a container (#7153)
ci: disable ghcr retention schedule while it's broken (#7154)
translate: Updates for file locale/en/LC_MESSAGES/django.po in de (#7151)
core: bump golang.org/x/net from 0.16.0 to 0.17.0 (#7148)
web: bump the babel group in /web with 5 updates (#7149)
core: bump sentry-sdk from 1.31.0 to 1.32.0 (#7150)
website: make get started on pricing page go to customer portal (#7147)
* 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>
* web/elements: rename renderInlineForm to renderForm set submit handler to empty function
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* fix all kinds of forms not using the form inheritance correctly
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* main:
web: bump pyright from 1.1.330 to 1.1.331 in /web (#7143)
core: bump golang from 1.21.2-bookworm to 1.21.3-bookworm (#7142)
core: bump gitpython from 3.1.35 to 3.1.37 (#7140)
core: bump goauthentik.io/api/v3 from 3.2023083.5 to 3.2023083.6 (#7124)
website/docs: fix PowerDNS Docker Hub repo name (#7134)
website/blog: Fix typo in SCIM post (#7136)
providers/proxy: fix redis cookies missing strict path (#7135)
web: bump @lit-labs/task from 3.0.2 to 3.1.0 in /web (#7132)
web: bump @lit/localize-tools from 0.6.10 to 0.7.0 in /web (#7133)
web: bump the eslint group in /tests/wdio with 2 updates (#7128)
core: bump structlog from 23.1.0 to 23.2.0 (#7125)
core: bump selenium from 4.13.0 to 4.14.0 (#7126)
web: bump the eslint group in /web with 2 updates (#7127)
web: bump the wdio group in /tests/wdio with 4 updates (#7129)
1. Forward Domain Proxy. I wasn't sure if this method was appropriate for the wizard,
but Jens says it is. I've added it.
2. In the process of doing so, I decided that the Provider.converter field was overly
complexified; I tried too hard to reduce the number of functions I needed to define,
but in the process outsourced some of the logic of converting the Wizard's dataset
into a property typed request to the `commit` phase, which was inappropriate. All
of the logic about a provider, aside from its display, should be here with the code
that distinguishes between providers. This commit makes it so.
3. Small CSS fix: the fields inherited from the Proxy provider forms had some unexpected
CSS which was causing a bit of a weird indent. That has been rectified.
* main: (41 commits)
lifecycle: fix install_id migration not running (#7116)
core: bump Go from 1.20 to 1.21 (#7117)
providers/ldap: add windows adsi support (#7098)
web: bump API Client version (#7113)
translate: Updates for file web/xliff/en.xlf in zh-Hans on branch main (#7112)
translate: Updates for file web/xliff/en.xlf in zh_CN on branch main (#7111)
web: bump the wdio group in /tests/wdio with 4 updates (#7108)
core/api: add uuid field to core api user http response (#7110)
core: bump goauthentik.io/api/v3 from 3.2023083.4 to 3.2023083.5 (#7105)
core: bump golang.org/x/oauth2 from 0.12.0 to 0.13.0 (#7106)
web: bump the eslint group in /tests/wdio with 1 update (#7107)
providers/proxy: improve SLO by backchannel logging out sessions (#7099)
web: bump @rollup/plugin-node-resolve from 15.2.2 to 15.2.3 in /web (#7104)
web: bump the eslint group in /web with 1 update (#7103)
web: bump the storybook group in /web with 1 update (#7102)
web: bump API Client version (#7101)
providers/saml: add default RelayState value for IDP-initiated requests (#7100)
lifecycle: improve reliability of system migrations (#7089)
sources/ldap: fix attribute path resolution (#7090)
root: Ignore the vendor folder (#7094)
...
* main:
web: package up horizontal elements into their own components (#7053)
core: bump django from 4.2.5 to 4.2.6 (#7066)
translate: Updates for file locale/en/LC_MESSAGES/django.po in fr on branch main (#7065)
web: bump postcss from 8.4.29 to 8.4.31 in /web (#7064)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans on branch main (#7057)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN on branch main (#7056)
web: bump pyright from 1.1.329 to 1.1.330 in /web (#7060)
web: bump the storybook group in /web with 5 updates (#7059)
web: bump the wdio group in /tests/wdio with 2 updates (#7063)
core: bump duo-client from 5.0.1 to 5.1.0 (#7062)
core: bump goauthentik.io/api/v3 from 3.2023083.3 to 3.2023083.4 (#7061)
Add meta description to black box blog post (#7049)
web/flows: fix plex login not opening new tab on mobile safari (#7050)
web: bump API Client version (#7052)
web/flows: bottom-align about text on flows page (#7051)
core: bump codespell from 2.2.5 to 2.2.6 (#7046)
core: bump coverage from 7.3.1 to 7.3.2 (#7047)
web: laying the groundwork for future expansion (#7045)
* web: laying the groundwork for future expansion
This commit is a hodge-podge of updates and changes to the web. Functional changes:
- Makefile: Fixed a bug in the `help` section that prevented the WIDTH from being accurately
calculated if `help` was included rather than in-lined.
- ESLint: Modified the "unused vars" rule so that variables starting with an underline are not
considered by the rule. This allows for elided variables in event handlers. It's not a perfect
solution-- a better one would be to use Typescript's function-specialization typing, but there are
too many places where we elide or ignore some variables in a function's usage that switching over
to specialization would be a huge lift.
- locale: It turns out, lit-locale does its own context management. We don't need to have a context
at all in this space, and that's one less listener we need to attach t othe DOM.
- ModalButton: A small thing, but using `nothing` instead of "html``" allows lit better control over
rendering and reduces the number of actual renders of the page.
- FormGroup: Provided a means to modify the aria-label, rather than stick with the just the word
"Details." Specializing this field will both help users of screen readers in the future, and will
allow test suites to find specific form groups now.
- RadioButton: provide a more consistent interface to the RadioButton. First, we dispatch the
events to the outside world, and we set the value locally so that the current `Form.ts` continues
to behave as expected. We also prevent the "button lost value" event from propagating; this
presents a unified select-like interface to users of the RadioButtonGroup. The current value
semantics are preserved; other clients of the RadioButton do not see a change in behavior.
- EventEmitter: If the custom event detail is *not* an object, do not use the object-like semantics
for forwarding it; just send it as-is.
- Comments: In the course of laying the groundwork for the application wizard, I throw a LOT of
comments into the code, describing APIs, interfaces, class and function signatures, to better
document the behavior inside and as signposts for future work.
* web: permit arrays to be sent in custom events without interpolation.
* actually use assignValue or rather serializeFieldRecursive
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
* web: package up horizontal elements into their own components.
This commit introduces a number of "components." Jens has this idiom:
```
<ak-form-element-horizontal label=${msg("Name")} name="name" ?required=${true}>
<input
type="text"
value="${ifDefined(this.instance?.name)}"
class="pf-c-form-control"
required
/>
</ak-form-element-horizontal>
```
It's a very web-oriented idiom in that it's built out of two building blocks, the "element-horizontal" descriptor,
and the input object itself. This idiom is repeated a lot throughout the code. As an alternative, let's wrap
everything into an inheritable interface:
```
<ak-text-input
name="name"
label=${msg("Name")}
value="${ifDefined(this.instance?.name)}
required
>
</ak-text-input>
```
This preserves all the information of the above, makes it much clearer what kind of interaction we're having
(sometimes the `type=` information in an input is lost or easily missed), and while it does require you know
that there are provided components rather than the pair of layout-behavior as in the original it also gives
the developer more precision over the look and feel of the components.
*Right now* these components are placed into the LightDOM, as they are in the existing source code, because
the Form handler has a need to be able to "peer into" the "element-horizontal" component to find the values
of the input objects. In a future revision I hope to place the burden of type/value processing onto the
input objects themselves such that the form handler will need only look for the `.value` of the associated
input control.
Other fixes:
- update the FlowSearch() such that it actually emits an input event when its value changes.
- Disable the storybook shortcuts; on Chrome, at least, they get confused with simple inputs
- Fix an issue with precommit to not scan any Python with ESLint! :-)
* web: provide storybook stories for the components
This commit provides storybook stories for the ak-horizontal-element wrappers. A few
bugs were found along the way, including one rather nasty one from Radio where we
were still getting the "set/unset" pair in the wrong order, so I had to knuckle down
and fix the event handler properly.
* web: test oauth2 provider "guinea pig" for new components
I used the Oauth2 provider page as my experiment in seeing if the
horizontal-element wrappers could be used instead of the raw wrappers
themselves, and I wanted to make sure a test existed that asserts
that filling out THAT form in the ProvidersList and ProvidersForm
didn't break anything.
This commit updates the WDIO tests to do just that; the test is
simple, but it does exercise the `name` field of the Provider,
something not needed in the Wizard because it's set automatically
based on the Application name, and it even asserts that the new
Provider exists in the list of available Providers when it's done.
* web: making sure ESlint and Prettier are happy
* "fix" lint
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
* web: laying the groundwork for future expansion
This commit is a hodge-podge of updates and changes to the web. Functional changes:
- Makefile: Fixed a bug in the `help` section that prevented the WIDTH from being accurately
calculated if `help` was included rather than in-lined.
- ESLint: Modified the "unused vars" rule so that variables starting with an underline are not
considered by the rule. This allows for elided variables in event handlers. It's not a perfect
solution-- a better one would be to use Typescript's function-specialization typing, but there are
too many places where we elide or ignore some variables in a function's usage that switching over
to specialization would be a huge lift.
- locale: It turns out, lit-locale does its own context management. We don't need to have a context
at all in this space, and that's one less listener we need to attach t othe DOM.
- ModalButton: A small thing, but using `nothing` instead of "html``" allows lit better control over
rendering and reduces the number of actual renders of the page.
- FormGroup: Provided a means to modify the aria-label, rather than stick with the just the word
"Details." Specializing this field will both help users of screen readers in the future, and will
allow test suites to find specific form groups now.
- RadioButton: provide a more consistent interface to the RadioButton. First, we dispatch the
events to the outside world, and we set the value locally so that the current `Form.ts` continues
to behave as expected. We also prevent the "button lost value" event from propagating; this
presents a unified select-like interface to users of the RadioButtonGroup. The current value
semantics are preserved; other clients of the RadioButton do not see a change in behavior.
- EventEmitter: If the custom event detail is *not* an object, do not use the object-like semantics
for forwarding it; just send it as-is.
- Comments: In the course of laying the groundwork for the application wizard, I throw a LOT of
comments into the code, describing APIs, interfaces, class and function signatures, to better
document the behavior inside and as signposts for future work.
* web: permit arrays to be sent in custom events without interpolation.
* actually use assignValue or rather serializeFieldRecursive
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
---------
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
* web/appwizard-1-revisions-and-comments:
actually use assignValue or rather serializeFieldRecursive
web: permit arrays to be sent in custom events without interpolation.
web: laying the groundwork for future expansion
* main:
core: bump urllib3 from 2.0.5 to 2.0.6 (#7042)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN on branch main (#7043)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans on branch main (#7044)
web: bump the eslint group in /web with 1 update (#7039)
web: bump the eslint group in /tests/wdio with 1 update (#7037)
web: bump @typescript-eslint/parser from 6.7.3 to 6.7.4 in /web (#7041)
core: bump ruff from 0.0.291 to 0.0.292 (#7040)
web: bump @typescript-eslint/parser from 6.7.3 to 6.7.4 in /tests/wdio (#7038)
web: bump @wdio/mocha-framework from 8.16.12 to 8.16.17 in /tests/wdio (#7032)
web: bump @wdio/cli from 8.16.12 to 8.16.18 in /tests/wdio (#7033)
web: bump @wdio/spec-reporter from 8.16.12 to 8.16.17 in /tests/wdio (#7034)
web: bump @wdio/local-runner from 8.16.12 to 8.16.18 in /tests/wdio (#7036)
web: bump the sentry group in /web with 2 updates (#7035)
* main:
core: bump urllib3 from 2.0.5 to 2.0.6 (#7042)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN on branch main (#7043)
translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans on branch main (#7044)
web: bump the eslint group in /web with 1 update (#7039)
web: bump the eslint group in /tests/wdio with 1 update (#7037)
web: bump @typescript-eslint/parser from 6.7.3 to 6.7.4 in /web (#7041)
core: bump ruff from 0.0.291 to 0.0.292 (#7040)
web: bump @typescript-eslint/parser from 6.7.3 to 6.7.4 in /tests/wdio (#7038)
web: bump @wdio/mocha-framework from 8.16.12 to 8.16.17 in /tests/wdio (#7032)
web: bump @wdio/cli from 8.16.12 to 8.16.18 in /tests/wdio (#7033)
web: bump @wdio/spec-reporter from 8.16.12 to 8.16.17 in /tests/wdio (#7034)
web: bump @wdio/local-runner from 8.16.12 to 8.16.18 in /tests/wdio (#7036)
web: bump the sentry group in /web with 2 updates (#7035)