Move open/close logic into the ak-admin-sidebar itself.
This commit removes the responsibility for opening/closing the sidebar from the interface parent
code and places it inside the sidebar entirely. Since the Django invocation passes none of the
properties ak-interface-admin is capable of receiving, this seems like a safe operation.
The sidebar now assumes the responsibility for hooking up the window event listeners for open/close
and resize.
On connection to the DOM, and on resize, the sidebar checks to see if the viewport width meets the
criteria for a behavioral change (slide-overlay vs slide-push), and on slide-push automatically
opens the sidebar on the assumption that there's plenty of room. In order to support more dynamic
styling going forward, I've substituted the 1280px with 80rem, which is the same, but allows for
some better styling if someone with older eyes needs to "zoom in" on the whole thing with a larger
font size.
The hide/show code involves "reaching up" to touch the host's classList. There's a comment
indicating that this is a slightly fragile thing to do, but in a well-known way.
* main: (23 commits)
web: bump API Client version (#7513)
web: bump the sentry group in /web with 2 updates (#7500)
core: bump pytest-django from 4.6.0 to 4.7.0 (#7497)
core: bump black from 23.10.1 to 23.11.0 (#7498)
core: bump ruff from 0.1.4 to 0.1.5 (#7499)
core: bump golang.org/x/oauth2 from 0.13.0 to 0.14.0 (#7501)
web: bump the wdio group in /tests/wdio with 3 updates (#7502)
release: 2023.10.3
ci: fix permissions for release pipeline to publish binaries (#7512)
website/docs: update release notes for 2023.10.3
core: fix worker beat toggle inverted (#7508)
website/docs: update release notes for 2023.10.3
website/docs: fix anchor link (#7492)
consistent variable name
add more tooltips and add device authn/authz
fix wrong color
events: fix gdpr compliance always running
website/docs: Fix a small grammar issue (#7490)
core: bump golang from 1.21.3-bookworm to 1.21.4-bookworm
web: bump pyright from 1.1.334 to 1.1.335 in /web
...
The project "Change Admin UI lists to have sublists per type" requires some initial changes to the
UI to facilitate this request. The AdminSidebar is the principle target of this project, and it is
embedded in the AdminInterface. To facilitate editing the AdminSidebar as an independent entity,
AdminInterface has been moved into its own folder and the AdminSidebar extracted as a standalone Web
Component. This removes, oh, about half the code from AdminInterface. A little cleanup with
`classMap` was also committed.
The rollup config was adjusted to find the new AdminInterface location.
The Sidebar uses the global `config: Config` object to check for Enterprise capabilities. Rather
than plumb all the way down through the Interface => AdminInterface -> AdminSidebar, I chose to make
provide an alternative way of reaching the `config` object, as a *context*. Other configuration
objects (Me, UiConfig, Tenant) interfaces will be contextualized as demand warrants.
Demand will warrant. Just not yet. <sup>1</sup>
The Sidebar has been refactored only slightly; the renderers are entirely the same as they were
prior to extraction. What has been changed is the source of information: when we retrieve the
current version we story *only* the information, and use type information to ensure that the version
we store is the version we care about. The same is true of `impersonation`; we care only about the
name of the person being impersonated being present, so we don't store anything else.
Fetches have been moved from `firstUpdated` to the constructor. No reason to have the sidebar
render twice if the network returns before the render is scheduled.
Because the path used to identify the user being impersonated has changed, the `str()` references in
the XLIFF files had to be adjusted. **This change is to a variable only and does not require
translation.**
---
<sup>1</sup> The code is littered with checks to `me()?`, `uiConfig?`, `config?`, etc. In the
*context* of being logged in as an administrator those should never be in doubt. I intend to make
our interfaces not have any doubt.
* web: break circular dependency between AKElement & Interface.
This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.
I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.
* web: fix broken typescript references
This built... and then it didn't? Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.
* web: rollback dependabot's upgrade of context
The most frustrating part of this is that I RAN THIS, dammit, with the updated
context and the current Wizard, and it finished the End-to-End tests without
complaint.
* web: bugfix: broken backchannel selector
There were two bugs here, both of them introduced by me because I didn't understand the
system well enough the first time through, and because I didn't test thoroughly enough.
The first is that I was calling the wrong confirmation code; the resulting syntax survived
because `confirm()` is actually a legitimate function call in the context of the DOM Window,
a legacy survivor similar to `alert()` but with a yes/no return value. Bleah.
The second is that the confirm code doesn't appear to pass back a dictionary with the
`{ items: Array<Provider> }` list, it passes back just the `items` as an Array.
* web: break circular dependency between AKElement & Interface.
This commit changes the way the root node of the web application shell is
discovered by child components, such that the base class shared by both
no longer results in a circular dependency between the two models.
I've run this in isolation and have seen no failures of discovery; the identity
token exists as soon as the Interface is constructed and is found by every item
on the page.
* web: fix broken typescript references
This built... and then it didn't? Anyway, the current fix is to
provide type information the AkInterface for the data that consumers
require.
* web: rollback dependabot's upgrade of context
The most frustrating part of this is that I RAN THIS, dammit, with the updated
context and the current Wizard, and it finished the End-to-End tests without
complaint.
The most frustrating part of this is that I RAN THIS, dammit, with the updated
context and the current Wizard, and it finished the End-to-End tests without
complaint.
* main:
web: bump @types/chart.js from 2.9.39 to 2.9.40 in /web
website/integrations: add FreshRSS (#7301)
web: bump the eslint group in /web with 2 updates
core: bump uvicorn from 0.24.0 to 0.24.0.post1
web: bump the storybook group in /web with 5 updates
web: bump the eslint group in /tests/wdio with 2 updates
web: bump @types/codemirror from 5.60.12 to 5.60.13 in /web
web: bump mermaid from 10.6.0 to 10.6.1 in /web
translate: Updates for file web/xliff/en.xlf in fr (#7461)
translate: Updates for file web/xliff/en.xlf in zh-Hans (#7459)
translate: Updates for file web/xliff/en.xlf in zh_CN (#7458)
web: bump @lit/localize-tools from 0.7.0 to 0.7.1 in /web (#7369)
web: bump @lit-labs/context from 0.4.1 to 0.5.1 in /web (#7368)
* main:
web/flows: attempt to fix bitwareden android compatibility (#7455)
sources/oauth: fix patreon (#7454)
website: bump the docusaurus group in /website with 3 updates (#7400)
web/admin: fix chart label on dashboard user page (#7434)
core: bump github.com/gorilla/sessions from 1.2.1 to 1.2.2 (#7446)
core: bump github.com/gorilla/mux from 1.8.0 to 1.8.1 (#7443)
core: bump github.com/spf13/cobra from 1.7.0 to 1.8.0 (#7442)
core: bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (#7445)
core: bump golang.org/x/sync from 0.4.0 to 0.5.0 (#7441)
core: bump github.com/gorilla/securecookie from 1.1.1 to 1.1.2 (#7440)
core: bump github.com/gorilla/handlers from 1.5.1 to 1.5.2 (#7444)
web: bump rollup from 4.2.0 to 4.3.0 in /web (#7448)
web: bump the eslint group in /web with 2 updates (#7447)
core: bump uvicorn from 0.23.2 to 0.24.0 (#7450)
core: bump selenium from 4.15.1 to 4.15.2 (#7449)
core: bump ruff from 0.1.3 to 0.1.4 (#7451)
web: bump the eslint group in /tests/wdio with 2 updates (#7452)