0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-25 05:02:57 +01:00
Commit Graph

1374 Commits

Author SHA1 Message Date
Thibaud Colas
9798306f0e Update chooser styles to match designs 2023-06-26 13:55:07 +01:00
Thibaud Colas
1f15f52a6d Update chooser widgets to use new dropdown component 2023-06-26 13:55:07 +01:00
Thibaud Colas
d288b2f81e Add new dropdown component based on Tippy.js 2023-06-26 13:55:07 +01:00
Thibaud Colas
f985262959 Allow all stories within subfolders of shared templates to appear in the same section 2023-06-26 13:55:07 +01:00
Matt Westcott
6c818f1695
Restore the valign='top' style 2023-06-26 11:07:13 +01:00
Sage Abdullah
aebca4781e Defer preview panel iframe src loading until it's opened 2023-06-22 08:11:54 +10:00
Sage Abdullah
281a980736 Defer preview data updates until the preview panel is opened 2023-06-22 08:11:54 +10:00
Sage Abdullah
e598589ac6 Debounce live preview updates to prevent making too many requests 2023-06-22 08:11:54 +10:00
Thibaud Colas
f3f2589b7c Use custom dark theme colors for revision comparisons. Fix #10552 2023-06-20 13:24:09 +01:00
Thibaud Colas
284a4ef78e Move all slim header button classes to be defined in slim_header.html 2023-06-15 15:53:53 +01:00
Thibaud Colas
9285e77734 Allow 2px borders in utility classes 2023-06-15 15:53:53 +01:00
LB Johnston
ba8a975273 SyncController - add better performance & enhance
- Add support for a default 100ms debounce on apply calls so that multiple events (e.g. keyup) do not impact performance
- Refine the delay for updating the field to not use setTimeout by default as this async behaviour is no longer needed for basic usage
- Add unit tests for debounce functionality and clean up unit testing to ensure each test can run in isolation
- Add explicit tests for non-inpu fields such as select (update code to ensure we use setter not setAttribute to support these)
- Add ability to support an action param for a fixed value being synced to another field
- Relates to #10517
2023-06-15 12:22:55 +01:00
LB Johnston
015c4339d7 Slug Controller - enhance default compare function
- Allow compareAs behaviour to be overridden via the event detail OR a param
- Enhance types to be more strict, refine JSDoc to be clearer about the default behaviour
- Add unit tests for default compare function and make logic a bit easier to read in regards to how the slugify/urilify methods are conditionally called
- Relates to #10532
2023-06-14 18:50:43 +01:00
LB Johnston
3ce2b5f007 Chooser modal - update spinner logic on error
- When errors occur on chooser modal content, find the local progress buttons that are in loading state and update the value
- Stimulus will automatically resolve all DOM changes based on the dynamic value update
- Add unit tests for functionality
- Fixes #10498
- Regression from #9910 & #10062
2023-06-13 12:59:45 +01:00
LB Johnston
35de8a98b7 Progress Controller - add backwards compatible cancelSpinner
- support legacy cancelSpinner global for any other code that may still rely on this
- see #10498
2023-06-13 12:59:45 +01:00
LB Johnston
380e04a2fb Small typo in JSDoc - gettext
- The function created is pluralIdx (capital I), the underlying Django function is pluralidx
- Update our gettext JSDoc to align with our usage of pluralIdx (capital I)
2023-06-12 12:14:11 +01:00
Thibaud Colas
40335ba9d1 Add tests to help with maintenance of theme color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
fb793f2b4b Remove all unused color tokens 2023-06-12 10:55:12 +01:00
Thibaud Colas
e0f3f05ffd Remove usage of color tokens which are duplicates 2023-06-12 10:55:12 +01:00
LB Johnston
aa9e9cddc7 Resolve multiple typos (spelling and grammar)
- Optimized/Customized/Catregorize -> Optimised/Customised/Categorise
- Github -> GitHub (80% were spelt with capital H, this is the way GitHub spells itself)
- GitPod -> Gitpod (most were without the capital P, Gitpod's site does not use capital P)
- Remove duplicate words (to to, the the)
- De-coupled -> decoupled
- implementors -> implementers (all other references used 'site implementers' so just aligning with the common case)
- Fix a/an usage in one case
- Fix one comment usage of ok, replace with OK
2023-05-30 21:07:37 +10:00
Thibaud Colas
6bb7e129b6 Fix color contrast of red error messages in dark mode 2023-05-25 08:36:49 +01:00
Thibaud Colas
7cb23a00d9 Simplify rich text commenting color styles for dark mode compatibility 2023-05-25 08:36:49 +01:00
Thibaud Colas
b920ced26d Fix text color for time picker options 2023-05-25 08:36:48 +01:00
Thibaud Colas
56f97890da Fix hover styles for secondary buttons in listings 2023-05-25 08:36:30 +01:00
Thibaud Colas
de12dbbd4e Remove unneeded border for footer actions 2023-05-25 08:36:30 +01:00
Thibaud Colas
ed13e0f7e8 Fix text color for selected / highlighted items in chooser modal listings 2023-05-25 08:36:30 +01:00
Thibaud Colas
cf116f90cf Fix close button appearances in choosers & dialogs 2023-05-25 08:36:30 +01:00
Thibaud Colas
13df497014 Use the correct hover color for form panel icons 2023-05-25 08:36:30 +01:00
Thibaud Colas
4d4feb2ca0 Fix switch component having a white border in dark mode 2023-05-25 08:36:30 +01:00
Thibaud Colas
aca7159b45 Re-add distinctive borders in page explorer 2023-05-25 08:36:30 +01:00
Thibaud Colas
91f2e18b22 Update focus color to a shade that works better in dark mode 2023-05-25 08:36:29 +01:00
Sage Abdullah
a29d573af8 Remove comment button on InlinePanel fields 2023-05-23 08:22:53 +01:00
sag᠎e
f8a9ddff09
Move comment notifications toggle to the comments side panel (#10437)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-05-22 10:56:15 +01:00
Thibaud Colas
efb75c0ae3
Ensure comment buttons always respect WAGTAILADMIN_COMMENTS_ENABLED. Fix #10406 2023-05-17 10:49:16 +01:00
Matt Westcott
8b32acb2ad add mock for updateSettings when testing TableBlock 2023-05-15 15:29:11 +01:00
Sage Abdullah
31948fc9db Fix TableBlock resize target selector
Fixes #10427.

In d51ec00ce1, the target was changed from
'[data-field] > .handsontable' to '.handsontable', as the .handsontable
element is no longer a direct descendant of the [data-field] element.

However, this means that we're marking ALL elements with .handsontable
as resize targets, which is not ideal as pretty much all elements
generated by Handsontable have that class.

The original logic would presumably only select the outermost element
with the .handsontable class, which is equal to the element with the
foo-handsontable-container ID (we store this in the containerId
variable).

Frankly, removing this selector outright would also fix the issue. That
said, let's keep this selector in anyway, to match the logic in older
releases.
2023-05-15 14:39:06 +01:00
Sage Abdullah
b42e934449 Fix incorrect check of Handsontable size options
Regression in 933a730928 introduced in 4.2.

This causes the discrepancy seen between 4.1 vs 4.2 (and later). In 4.2,
this check was broken, which means the event handler never gets added.

The combination of the event handler and the incorrect selector (fixed
in the next commit) would resize all Handsontable elements, resulting in
the bug where the table cannot be interacted with.

The commit b9f8a6b6c0 fixed another cause
of the issue, which was calling `resizeWidth(getWidth())`. The
getWidth() function should only be used to set the Handsontable's
settings, while resizeWidth should be called with '100%' as done within
the event handler.

However, seeing that the event listener is not even attached in 4.2
onwards, dispatching the resize event might not be necessary and
Handsontable might already handle this correctly. That said, let's
avoid making other changes that could potentially cause issues.

With this commit, the bug should reappear in 4.2 and later releases,
making it consistent with 4.1. The bug will be fixed in the next commit.
2023-05-15 14:37:45 +01:00
LB Johnston
c9a51968a8 Count Controller unit tests - avoid dupe body
- body element used but already appending to document.body
2023-05-12 17:09:13 +10:00
Thibaud Colas
dae099affa Prevent overlap between side panels resize grips and comments, preview 2023-05-02 13:06:03 +01:00
Thibaud Colas
418d3ec8b4 Add back minimap overflow when expanded, to display error badges 2023-05-02 13:06:03 +01:00
Sage Abdullah
f4ce346fe1 Fix side panel stuck in resize state when pointer is released outside the grip 2023-04-28 17:22:17 +01:00
sag᠎e
aa96dda15a
Fix dismissible SubMenuItem not showing the number badge when there's a new item (#10107)
Previously, we rely on the fact that the SubMenuItem itself is a dismissible. So, we decide how to show/hide the number badge based on the value for the SubMenuItem's dismissible ID on the server. However, this means that if the user has dismissed the SubMenuItem and we add new dismissible child items within it (e.g. update the ID for the 'What's new in Wagtail version' child item), the number badge will not show up. This commit changes the logic to show/hide the number badge based on whether there are any undismissed items within the SubMenuItem and whether the it has been opened or not.
2023-04-28 15:58:57 +01:00
Andy Babic
e60e4dbb43 Negate top margins on .w-field_label, so that the h3 version looks the same as regular labels 2023-04-25 16:06:08 +01:00
Andy Babic
4086c7de7a Add read_only option support to FieldPanel 2023-04-25 16:05:27 +01:00
Sage Abdullah
d8a0ff98e3 Add handsontable styles override to fix background color in dark mode 2023-04-20 11:34:09 +01:00
Sage Abdullah
2ef3b36c11 Fix comment notice text color in dark mode 2023-04-20 11:34:09 +01:00
Sage Abdullah
b9f8a6b6c0 Dispatch resize event to resize Handsontable on initialisation (#10367)
Fixes #10355
2023-04-20 09:48:58 +01:00
Thibaud Colas
b81ec15e3d
Fix comment "add" buttons being hidden in StreamField 2023-04-20 14:14:25 +07:00
Thibaud Colas
64ae146e29
Swap comment "add" button icons between default and hover 2023-04-20 14:14:24 +07:00
Thibaud Colas
5ef6af178e
Prevent reaching side panel close button while tabbing 2023-04-20 14:14:24 +07:00