0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00
Commit Graph

14293 Commits

Author SHA1 Message Date
Albina
5cf621660c
Refactor Wagtail userbar as a web component (#9816)
* Add a border around the userbar menu in Windows high-contrast mode so it can be identified
* Make sure browser font resizing applies to the userbar
* Switch userbar to initialise a Web Component to avoid styling clashes
* Refactor userbar stylesheets to use the same CSS loading as the rest of the admin
2022-12-27 16:55:19 +00:00
Albina
5eb2064574
Close the userbar when clicking its toggle. Fix #9342 (#9808)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>

Fixes https://github.com/wagtail/wagtail/issues/9342
2022-12-27 15:36:05 +00:00
Thibaud Colas
4246c0b703 Add release notes for #9772 in v4.1.2 2022-12-19 14:05:41 +00:00
Thibaud Colas
84e2390192 Add release notes for Stimulus adoption 2022-12-19 14:00:11 +00:00
LB Johnston
86f8d2b7ad Add AutoFieldController
- used to provide the ability for an input element to submit its form once changed or interacted with
2022-12-19 14:00:11 +00:00
LB Johnston
ede189ada5 Set up initial stimulus application integration 2022-12-19 14:00:11 +00:00
LB Johnston
70681ec2bb Fix Draftail unit test failure 2022-12-19 14:00:11 +00:00
Matt Westcott
4f31804e63 Changelog note for #9763 2022-12-15 09:51:40 +00:00
Sage Abdullah
100d213b00
Fix page unlock message
Regression in ddbdd51
2022-12-15 09:39:45 +00:00
Sage Abdullah
d4e036a67e
Apply capfirst to locking help_text 2022-12-14 11:46:58 +00:00
Sage Abdullah
e1041b242d
Add checks to ensure LockableMixin is applied before RevisionMixin 2022-12-14 11:46:58 +00:00
Sage Abdullah
8dcc292d26
Add docs for LockableMixin and locking snippets 2022-12-14 11:46:57 +00:00
Sage Abdullah
1a09e2d70e
Rename WAGTAILADMIN_GLOBAL_PAGE_EDIT_LOCK to WAGTAILADMIN_GLOBAL_EDIT_LOCK 2022-12-14 11:46:57 +00:00
Sage Abdullah
10dbbddaf3
Add tests for locking snippets 2022-12-14 11:46:54 +00:00
Sage Abdullah
1952ecbb63
Add the ability to lock snippets that extend LockableMixin 2022-12-14 11:10:14 +00:00
Sage Abdullah
70e0d2c1dc
Create get_latest_str utility function 2022-12-14 11:10:14 +00:00
Sage Abdullah
12c6c97a8b
Create and show 'lock' and 'unlock' permissions for snippets with LockableMixin 2022-12-14 11:10:14 +00:00
Matt Westcott
3013c4b8b1 Remove LGTM badges from readme
LGTM is shutting down imminently (https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/), and badges will no longer be functional. We now use Github's native CodeQL scanner instead - https://github.com/wagtail/wagtail/blob/main/.github/workflows/codeql-analysis.yml
2022-12-13 11:34:11 +00:00
Natarajan Balaji
b6f7fbf828 Fix issue where Decimal value block null caused an error
- Fixes #9777
- DecimalBlock value when Null forces a conversion to null which crashes the server. Fixed it by returning null when the value is null and decimal when a value is other than null
2022-12-13 07:47:18 +10:00
LB Johnston
da90061ca8 Docs - formatting - clean up whitespace 2022-12-11 18:43:50 +10:00
Damascene
5d78e03084 Docs - Update PASSWORD_REQUIRED_TEMPLATE example
- Add messaging for signed in users that do not have permission for a page
2022-12-11 15:33:30 +10:00
LB Johnston
abc39ad3c4 Changelog for #9761
- Closes #9748
2022-12-11 15:32:47 +10:00
Lovelyfin00
5728b876e0 Update Eslint config
- Legacy code ignoring no longer needed for some rules
2022-12-11 15:32:47 +10:00
Lovelyfin00
2695a53265 Clean up unit tests & super usage in JS
- fixed the prototype error in table.test.js and also the build error
- added super to constructor class due to the error shows during testing
2022-12-11 15:32:47 +10:00
Lovelyfin00
8e2e66bef0 Update tsconfig to align with latest browser usage
- Added the target : es2021 option because least browser support is safari 14.
- Added the dom.iterable option in order for the spread operator to work on DOM elements.
- Added the "strictPropertyInitialization": true option. This ensures that any class constructor property that is declared must be initialized or set.
- Added the "forceConsistentCasingInFileNames": true option to ensure that different filesystem renaming issues will be flagged early
- Re-order the config to be alphabetical
2022-12-11 15:32:47 +10:00
Lovelyfin00
6997ff1d68 Use browser URLSearchParams to determine q param (core.js)
- Fixes #9765
- removed the function for getURLParam function and replaced with URLSearchParam method
- already used in many other places in the same file
2022-12-10 07:19:48 +10:00
LB Johnston
ec41b7448a Add changelog for #8746 2022-12-10 07:05:39 +10:00
LB Johnston
734932c0c4 eslint - add fix for linting error in utils/action
- prefer-default-last was the only issue which is easily fixed in utils/action
- move global ignoring of utils folder
- add basic unit tests for actions.ts
2022-12-10 07:05:39 +10:00
LB Johnston
1f9a9c50bf move identity util to shared utils file 2022-12-10 07:05:39 +10:00
Thibaud Colas
0bf26a73c1 Fix horizontal positioning of rich text inline toolbar 2022-12-10 06:56:54 +10:00
Sage Abdullah
25fa8793a7 Require publish permission for unscheduling snippets 2022-12-09 17:46:54 +00:00
Sage Abdullah
ac3add0f29 Add tests for locking scheduled snippets with LockableMixin 2022-12-09 17:46:54 +00:00
Sage Abdullah
74a4258ebb Lock snippets when scheduled for publishing 2022-12-09 17:46:54 +00:00
Sage Abdullah
0f0ecb4938 Add user_has_permission and user_has_any_permission methods in PermissionCheckedMixin 2022-12-09 17:46:54 +00:00
Sage Abdullah
a53c6f5320 Add default __init__ to BaseLock 2022-12-09 17:46:54 +00:00
Sage Abdullah
859f5b61ac Rename locks 'page' param and attribute to 'object' 2022-12-09 17:46:54 +00:00
Sage Abdullah
39f9a63875 Make ScheduledForPublishLock take precedence before BasicLock
This ensures that a scheduled object is always locked,
even for someone who has locked it with the BasicLock.
2022-12-09 17:46:54 +00:00
Sage Abdullah
7323973673 Move page-locked class in _tabs.scss to content-locked in _panel.scss
This allows locking even if the panels do not use TabbedInterface.
2022-12-09 17:46:54 +00:00
Sage Abdullah
3270267ca2 Use class placeholder for LockableMixin.locked_by related_name
This allows the mixin to be used on non-Page models
2022-12-09 17:46:54 +00:00
Matt Westcott
f635038e13 Release note for StreamField data migration helpers (#9694) 2022-12-09 16:40:07 +00:00
Matt Westcott
aa3ab79384 Avoid setUpTestData in streamfield migration tests
Setting a StreamField RawDataView as a class attribute of a test case is not valid in Django 4.1, as it doesn't support deep copying. Convert these to setUp methods, so that they're recreated for each test invocation.
2022-12-09 16:40:07 +00:00
Matt Westcott
440427f8a7 Disable reference extraction when constructing invalid StreamField data 2022-12-09 16:40:07 +00:00
Joshua Munn
f12c4a3714 Bump wagtail-factories version for Wagtail 4.1 compatibility 2022-12-09 16:40:07 +00:00
Joshua Munn
e84cdc4e2c Add wagtail-streamfield-migration-toolkit docs
- Move RichText -> StreamField migration guide into
  advanced/streamfield_migrations.md
2022-12-09 16:40:07 +00:00
Matt Westcott
a9ba66c648 Remove fallbacks for older Wagtail versions 2022-12-09 16:40:07 +00:00
Matt Westcott
ad65741b94 Add tests for streamfield migration helpers
Currently failing due to wagtail-factories being broken on Wagtail 4.1: https://github.com/wagtail/wagtail-factories/issues/65
2022-12-09 16:40:07 +00:00
Matt Westcott
ec6229c236 Add StreamField migration helpers from https://github.com/sandilsranasinghe/wagtail-streamfield-migration-toolkit/ 2022-12-09 16:40:07 +00:00
LB Johnston
eb808116f0 Development docs - refine classname convention
- Update template example to be in a more logical order & use the correct template syntax
- Update `class_name` as no longer preferred as we have adopted a normalised approach for icon
2022-12-09 20:13:33 +10:00
LB Johnston
3d484e133d Update icon template to allow classname
- Preserve the existing `class_name` behaviour in most other cases
- Update only docs reference to use `classname`
- Relates to #6107 & #6028
2022-12-09 20:13:33 +10:00
LB (Ben Johnston)
4e66afad0a
Eslint - disable rule class-methods-use-this (#9482) 2022-12-09 07:33:28 +00:00