Skip to content

Conversation

@kensternberg-authentik
Copy link
Collaborator

A simple component for displaying the time accurately.

* main: (53 commits)
  Fixed typo in css.
  Added comments to the wcc file.
  This commit revises the WCCSS transpiler, using the regular expression and merge algorithms recommended by the Patternfly 5 React team.
  Added wccss pass to package.json.
  Type inference FTW.
  Needed to put tools build in-line
  This commit ports the Elements' build tools to Typescript
  Cleanup.
  New css build completing.
  Crawling back to the original starting point, but this time with better tooling.
  Save point.
  This commit introduces a dark-mode controller and code.
  A working dark mode, although with some dubious decisions
  Build system revised into a more unixy pattern: each script does one thing well.
  Bump validator from 13.15.15 to 13.15.20 (#10)
  Bump vite (#9)
  First stab at the dark-mode controller; it takes orders from the central context, if there is one, but if not, it tries to determine the mode itself by looking at the user's preferences.
  Revised brand to meet a... more modern standard.
  npm trusted publisher
  More hacking.
  ...
* main:
  Forgot to run , and now that I have a hook to do it for me, this is making it whiny.
@netlify
Copy link

netlify bot commented Nov 13, 2025

Deploy Preview for authentik-elements-storybook failed. Why did it fail? →

Name Link
🔨 Latest commit cd4f2ff
🔍 Latest deploy log https://app.netlify.com/projects/authentik-elements-storybook/deploys/692de230d4d1a000085b681e

This commit adds the `timeout` component to our library, with an “elapsed time” indicator.

It also includes an event-monitoring decorator that changes in response to changes to media-queries. While in this case we use it to track `prefers-reduced-motion` (which restricts the `elapsed` time interval to a minimum of 60
seconds, since anything less than that is highly animated), it can be used to track any number of CSS queries, such as `display-mode`, `min-width`, and even `device-posture`.

`ak-timeout` uses a highly simplified event state mananger for updating the elapsed time. This is a crude metric, with a minimal resolution of 1000 milliseconds, so I avoided advanced techniques like animation frame. Using
`setTimeout()` with a “set the next timeout event” instead of `setInterval()` is generally preferred; the precision is lower, but there’s a heck of a lot less machinery, and stopping it is trivially simpler.

\# What

\# Why

\# How

\# Designs

\# Test Steps

\# Other Notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants