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

1406 Commits

Author SHA1 Message Date
Lovelyfin00
62786ebd13 Adopt DialogController & TeleportController in admin 2023-07-15 23:03:57 +10:00
Lovelyfin00
c556acef35 Create DialogController (w-dialog) & TeleportController (w-teleport) 2023-07-15 23:03:57 +10:00
LB Johnston
a15f7d188b Rename includes/dialog to controllers/DialogController 2023-07-15 23:03:57 +10:00
Sage Abdullah
994698d76c
Do not use FieldRowPanel for scheduled publishing fields
To prevent inconsistent layout if only one of the fields has an error
2023-07-14 15:21:57 +01:00
Sage Abdullah
876b0e0f19
Move comments counter badge markup to base SidePanelToggle component 2023-07-14 15:21:57 +01:00
Albina
e5da22586b
Update styles for block picker in dark mode (#10644)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-14 14:42:12 +01:00
Albina
a84fdd4919
Update styles for critical buttons in dark mode (#10643)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-14 09:35:43 +01:00
dependabot[bot]
d886e5eadb Bump tough-cookie from 4.0.0 to 4.1.3 in /client/tests/integration
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-13 18:07:49 +10:00
Albina
0b2ea1edac
Update rich text Link/Document Tooltip styles (#10639)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2023-07-13 08:19:59 +01:00
LB Johnston
ae4c3c20c8 Update all snapshots to Jest 29 format
- See https://jestjs.io/docs/upgrading-to-jest29#snapshot-format
2023-07-13 07:51:26 +01:00
LB Johnston
f80e64989e Update failing tests for Jest v29
- Use a console.error spy to avoid the console error bubbling into logs for FieldBlock.test.js (also allows us to confirm an error was thrown)
- Adopt proper approach to 'flush promises' now that API is available for JSDom usage of microtasks/animation frame
- Adapt to new Jest timer mocking approach, use legacy timers in one file as there is not a suitable setTimeout (with zero delay) while also using async await
2023-07-13 07:51:26 +01:00
LB Johnston
f90e03ab35 Update Jest to v29, uuid v9 & update stubs
- `uuid` update is required to avoid import errors - https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md#900-2022-09-05
- Add stubs for window.scrollTo to avoid console errors when running tests
- Filter out warnings for Draftail React warnings, these are unlikely to be resolved anytime soon and add noise to the Jests tests that are unhelpful
- Closes #10043
2023-07-13 07:51:26 +01:00
LB Johnston
2ad71493a9 Add TooltipController (w-tooltip) & remove bootstrap tooltips
Adds a new Stimulus controller for Tippy.js tooltips to replace only the Bootstrap tooltip usage & removes the bootstrap JS tooltip code.

- Dashboard - moderation listing panel
- Reports - Workflow listing status tooltip
- Shared Avatar - user name tooltip
- Workflow listing - steps item tooltip

Closes #8565
2023-07-13 00:43:17 +01:00
Sage Abdullah
db0b985484
Use flex display for listing header .right class
Workaround until #10148 is fixed
2023-07-12 09:18:11 +01:00
Matt Westcott
cbd6a1328c Convert page listing view to tables framework 2023-07-11 10:28:12 +01:00
Matt Westcott
69b7ed0815 Use table component for page search results 2023-07-10 15:21:46 +01:00
LB Johnston
04d1e8162b Migrate header search to a Stimulus controller (w-swap)
- Removes the jQuery slide animation so content will be instantly replaced
- Removes the autofocus behaviour on the search fields as this is not helpful for screen readers / keyboard control
- Includes support for `window.header` if provided alongside dynamic adding of data-* attributes if not included
- Base implementation for #9950
- Co-authored-by: sag᠎e <laymonage@gmail.com>
2023-07-06 20:10:31 +10:00
Thibaud Colas
f4ea0156a2 Implement new Draftail customisation APIs
- Fixes #5580
- Remove TSLA/TWTR/BTC references and replace with clean energy FSLR / NEE stocks
2023-07-06 13:14:54 +10:00
LB Johnston
8251072e6d Replace usage of innerHTML with textContent
- Stimulus CountController content is programatically generated but best to avoid writing HTML accidentally
- ChooserModel field required label should avoid risk of translations with HTML
- Image focal point chooser's label does not need to support HTML
- FieldBlock us using h util but this can be avoided by built in browser escaping when innerText is used
- focal-point-chooser gets value from its set up but we should avoid innerHTML if we can
2023-07-06 12:26:43 +10:00
LB Johnston
1e271afc92 Chore - remove unused global declaration
- Was triggering an Eslint warning
2023-07-05 08:13:38 +10:00
SebCorbin
d52484f524 Auto-select single block in StreamField
- Closes #3998
2023-07-04 17:38:45 +10:00
LB Johnston
150e988f4d
Migrate Tagit init JS to TagController
- Closes #10100
2023-06-27 09:23:01 +01:00
LB Johnston
82ca711f16
Rename initTagField to TagController 2023-06-27 09:23:01 +01:00
LB Johnston
4195f80d29
Create shared util domReady 2023-06-27 09:23:01 +01:00
Sage Abdullah
0ba6cb726c Fix taggit/tagit autocomplete text colour in dark mode
- Relates to #10418
2023-06-27 08:01:57 +10:00
Thibaud Colas
4bd1f7b267 Add a way to hide the tooltip on click for chooser widgets 2023-06-26 13:55:09 +01:00
Thibaud Colas
466e43e571 Fix "More" dropdown for bulk actions 2023-06-26 13:55:09 +01:00
Thibaud Colas
65c37b34bc Fix text wrapping 2023-06-26 13:55:08 +01:00
Thibaud Colas
55fd422eb6 Remove now-unused c-dropdown / data-dropdwon implementation 2023-06-26 13:55:08 +01:00
Thibaud Colas
3b3d4ed981 Remove Tippy implementation migrated to Stimulus 2023-06-26 13:55:08 +01:00
Thibaud Colas
7516b55e83 Switch bulk actions’ "More" dropdown to new component 2023-06-26 13:55:08 +01:00
Thibaud Colas
2b1f13a109 Add missing exports 2023-06-26 13:55:07 +01:00
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