Add aria label to the popups so it doesn't rely entirely on the content inside the popup, which may include things like the 'Refresh' button.
Also add a dash in between the user's name and 'Currently viewing' so that there's a pause in between.
- Extract separate EditingSessionsList component for the sessions list
only (so we can reload it separately without the full module which
includes the dialogs and controller configurations).
- Update the ping endpoint to render the list HTML and include it in the
JSON response at the key 'html'.
- Apply w-swap#submit on every w-session:ping, and use SwapController's
jsonPath value for pointing to the 'html' key.
- Defer the load of EditingSession objects until the first ping from the
client. This avoids a race condition with the release mechanism, i.e.
if you reload the page, the 'release' endpoint and the page request
are fired at around the same time, so the initial page response may
still include the previous session (not yet cleaned). This also allows
us to delegate all logic for displaying the sessions list to the ping
endpoint instead of having to do the same logic in the edit views. To
ensure the sessions are shown immediately, also fire the ping event
immediately when the SessionController is connected.
Use a separate component instead of including the markup directly in
slim_header.html, so that we can pass any necessary variables via Python
when instantiating the component, instead of polluting the
slim_header.html with a bunch of variables.
This allows us to easily replace just the text based on a server response using TeleportController
Ideally, the {{ id }} should be a prefix instead of a postfix, but there's an existing title-{{ id }} for the h2 element so we follow it for now
And change the description for one of the describe blocks, which may
have been a copy-paste leftover as there's an existing describe block
with the exact same sentence. Change this to accurately describe that
we are testing without the form's input values (as we're using
replace() directly instead of submit()).
Tailwind has a similarly-named 'pulse' animation that behaves differently:
it makes the element fade in and out.
Meanwhile, it has a 'ping' animation that behaves similarly to our 'pulse'
animation: https://tailwindcss.com/docs/animation
Follow the Tailwind names to avoid confusion. In the future, we might
want to implement a similar 'pulse' animation. Or, perhaps we can reuse
Tailwind's animations as-is.
In 5a8c33f34a the minimum version was set to 7.3 to allow use of the long-form `--fail-on-warning` option, but this is not compatible with Python 3.8. Revert this to the original `-W` option and set 7.0 as the minimum version.