Wykres commitów

1740 Commity (f7fa20e600421763fd85ef1ce9c5367a05c17fa4)

Autor SHA1 Wiadomość Data
Sage Abdullah f8564055b1 Add WAGTAIL_EDITING_SESSION_PING_INTERVAL setting 2024-07-19 13:14:30 +01:00
Sage Abdullah 3f4566dfa3 Destroy tippy on DropdownController disconnect 2024-07-19 13:14:30 +01:00
Sage Abdullah 8845a8091e Improve display of editing sessions on smaller screens 2024-07-19 13:14:30 +01:00
Sage Abdullah 52cf4de58c Use lighter shade of red for unsaved changes indicator in dark mode 2024-07-19 13:14:30 +01:00
Sage Abdullah 6689c2abdd Fix warning icon filler for custom font sizes 2024-07-19 13:14:30 +01:00
Sage Abdullah 28006a13c3 Use has-edits-value to test w-action#forceReload with w-unsaved 2024-07-19 13:14:30 +01:00
Sage Abdullah 2a47ad1da2 Rename w-editing-sessions__session--latest to w-editing-sessions__session--saved 2024-07-19 13:14:30 +01:00
Sage Abdullah 756913c44d Restore ping effect for session with latest revision
Was lost when refactoring the styles to a separate component because @apply doesn't work with custom classes
2024-07-19 13:14:30 +01:00
Sage Abdullah 7d5252200f Only make the reload button show the 'unsaved changes' dialog if there are unsaved changes 2024-07-19 13:14:30 +01:00
Sage Abdullah 72934a5049 Fix spacing in editing sessions dialog buttons 2024-07-19 13:14:30 +01:00
Sage Abdullah 865df0e03e Don't add aria-busy and spinner icon when w-swap is deferred 2024-07-19 13:14:30 +01:00
Sage Abdullah 914e8fc88a Defer w-swap write when there's a visible tooltip in the target container
Tooltips may be triggered by other events, not just focus. Use MutationObserver to handle this.
2024-07-19 13:14:30 +01:00
Sage Abdullah a0117bb6b3 Only serialise the form data in SwapController if the method is GET 2024-07-19 13:14:30 +01:00
Sage Abdullah f7c7e5fbd4 Add code comments per review 2024-07-19 13:14:30 +01:00
Sage Abdullah 74c0c25f74 Fill the hole in the warning icon 2024-07-19 13:14:30 +01:00
Sage Abdullah 5de63bd1b3 Use list elements for the editing sessions list 2024-07-19 13:14:30 +01:00
Sage Abdullah 57f34ac6ed Extract editing sessions styles into its own component 2024-07-19 13:14:30 +01:00
Sage Abdullah c46dd53254 Do not swap sessions list HTML until focus has left the container
Prevent disrupting the flow of keyboard users when they are focusing on
the sessions list.
2024-07-19 13:14:30 +01:00
Sage Abdullah fba4389f08 Only show the overwrite confirmation dialog if there's a newer revision 2024-07-19 13:14:30 +01:00
Sage Abdullah edb3a1ab80 Update ping and release URLs on every editing session ping
In case the original session has been cleaned up
2024-07-19 13:14:30 +01:00
Sage Abdullah 5750502772 Include unsaved changes flag as is_editing in session ping request 2024-07-19 13:14:30 +01:00
Sage Abdullah d20658454a Use the submit button's label for overwrite confirmation dialog 2024-07-19 13:14:30 +01:00
Sage Abdullah d2cbe02658 Prevent browser unload confirmation dialog when reloading via custom unsaved changes dialog 2024-07-19 13:14:30 +01:00
Sage Abdullah 298f4fea8f Use w-swap to update the sessions list on every ping
- 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.
2024-07-19 13:14:30 +01:00
Sage Abdullah 886af6de98 Initialize EditingSessionsModule component and SessionController
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.
2024-07-19 13:14:30 +01:00
Sage Abdullah 80480d8499 Add popup theme for tippy and DropdownController 2024-07-19 13:14:30 +01:00
Sage Abdullah e7dac3e18d Allow SwapController to use the form element's method 2024-07-19 13:14:30 +01:00
Sage Abdullah 3c1ba47566 Dispatch w-swap:json event for emitting JSON data from the response 2024-07-19 13:14:30 +01:00
Sage Abdullah 682bef0db2 Allow SwapController to get the HTML from a JSON response 2024-07-19 13:14:30 +01:00
Sage Abdullah c95b6e3dff Fix flaky SwapController tests
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()).
2024-07-19 13:14:30 +01:00
Sage Abdullah 3e6e4f2ee3 Add confirm() method to DialogController
Like hide(), but dispatches an event to indicate that the dialog was 'confirmed'
2024-07-19 13:14:30 +01:00
Sage Abdullah 1c2616623d Add reload() method to ActionController 2024-07-19 13:14:30 +01:00
Sage Abdullah 0277467dac Allow TooltipController to use HTML content target
This follows the same approach we already have in DropdownController
2024-07-19 13:14:30 +01:00
Sage Abdullah 54f12e6354 Add sendBeacon support to ActionController 2024-07-19 13:14:30 +01:00
Sage Abdullah 5168ee0c7c Only apply hover-opacity effect to button icons inside the default 'dropdown' theme 2024-07-19 13:14:30 +01:00
Sage Abdullah f0569661a3 Add ping-critical animation and w-ping--critical class to use it 2024-07-19 13:14:30 +01:00
Sage Abdullah c3cbe81a95 Rename pulse-warning animation to ping-warning and extract to its own file
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.
2024-07-19 13:14:30 +01:00
Albina 2508b712a9
Language label fine-tunes (#12136)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-07-19 12:48:55 +01:00
Sage Abdullah 9ac9a93e54
Reinstate canAddBlock assertions for StreamBlock and ListBlock's max_num 2024-07-18 18:26:14 +01:00
Matt Westcott 6eacfec4ec
Add tests for showing / hiding errors on per-block-type min_num 2024-07-18 18:26:14 +01:00
Matt Westcott b2f49f64a1
Add tests for showing / hiding errors on per-block-type max_num 2024-07-18 18:26:13 +01:00
Matt Westcott c510d7f720
Show error when ListBlock falls below min_num 2024-07-18 18:26:13 +01:00
Matt Westcott 14325d4615
Show error when StreamBlock falls below min_num 2024-07-18 18:26:13 +01:00
Matt Westcott 23df591435
Show error on exceeding ListBlock maxNum, rather than disabling addition 2024-07-18 18:26:13 +01:00
Matt Westcott 0fb10fb663
Show error on exceeding StreamBlock maxNum, rather than disabling addition
As per #9513 / #9784
2024-07-18 18:26:13 +01:00
Albina 2d568dd825
Content checks design upgrade: help text and separate cards (#12090)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2024-07-16 22:27:27 +01:00
Albina 62674d3fbb
Add underscore as an alt text antipattern (#12119) 2024-07-16 08:53:23 +01:00
Sage Abdullah 063c52e1f2 Move inline script for activating workflow actions to workflow-action.js
Also deprecate the `window.ActivateWorkflowActionsForDashboard` and
`window.ActivateWorkflowActionsForEditView` functions as they no longer
need to be globally-accessible
2024-07-16 08:08:26 +01:00
Albina 14f3d4607f
Add content metrics board (#12058) 2024-07-11 14:58:19 +01:00
Alex Morega d0647f3288
Add a deactivate() method to ProgressController 2024-06-28 11:59:43 +01:00