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

12890 Commits

Author SHA1 Message Date
Matt Westcott
31139e8b24 Remove references to StreamFieldPanel and ChooserPanels from docs 2022-03-02 15:55:25 +00:00
Matt Westcott
b8fd95ee86 Remove uses of StreamFieldPanel, including the check that you're using it 2022-03-02 15:55:25 +00:00
Matt Westcott
5fe7aef030 Move special case for StreamField not having a comments button from StreamFieldPanel to FieldPanel 2022-03-02 15:55:25 +00:00
Matt Westcott
6169422ba0 Implement id_for_label on BlockWidget so that StreamFieldPanel doesn't have to override it 2022-03-02 15:55:25 +00:00
Matt Westcott
52ca4ebaab Remove stream-field CSS class; use block_field instead 2022-03-02 15:55:25 +00:00
Matt Westcott
f6889cd88e Check render_with_errors method before adding 'error' classname, instead of hard-coding an exception in StreamFieldPanel 2022-03-02 15:55:25 +00:00
Matt Westcott
7884b13a6e Remove ChooserPanel references from tests 2022-03-02 15:55:25 +00:00
Matt Westcott
eeb354ac5b Eliminate references to RichTextFieldPanel, now that it's functionally identical to FieldPanel 2022-03-02 15:55:25 +00:00
Matt Westcott
179a867669 Register comparison classes at the field level instead of overriding get_comparison_class on panels 2022-03-02 15:55:25 +00:00
Matt Westcott
6e34b2fdcc Use an extensible registry for comparison classes 2022-03-02 15:55:25 +00:00
Matt Westcott
3a561aa934 Pull out ModelFieldRegistry as a reusable pattern 2022-03-02 15:55:25 +00:00
Matt Westcott
5960905662 Remove logic for normalising page_type from PageChooserPanel, now it's handled by the widget 2022-03-02 15:55:25 +00:00
Matt Westcott
e5775fdfc0 Allow AdminPageChooser to accept target_models in the same formats allowed by PageChooserPanel's page_type argument 2022-03-02 15:55:25 +00:00
Matt Westcott
45de375a88 Pass the correct target_models argument to AdminPageChooser when FK is to a page subclass 2022-03-02 15:55:25 +00:00
Matt Westcott
786a4a3384 Provide a documented register_form_field_override method for apps to register their own form fields with WagtailAdminModelForm 2022-03-02 15:55:25 +00:00
Matt Westcott
d7353e80a5 Remove widget_overrides definitions from chooser panels
These are no longer necessary now that the correct widgets are selected at the form level.
2022-03-02 15:55:25 +00:00
Matt Westcott
de85f28d96 Add mechanism for WagtailAdminModelForm to select an appropriate widget for a ForeignKey to a specific model
This means that pages, images, documents and snippets will use the approprate chooser widget automatically without having to specify it explicitly in the form definition or use a *ChooserPanel in the edit handler.
2022-03-02 15:55:25 +00:00
Matt Westcott
9651b098f9 Remove override of media property from WagtailAdminModelForm
This has been part of django-modelcluster's ClusterForm since 3.1: https://github.com/wagtail/django-modelcluster/pull/73
2022-03-02 15:55:25 +00:00
Matt Westcott
c14de035ec Remove unused get_chosen_item method from BaseChooserPanel
Removing the test is justified as this isn't a public-facing method; it's just a helper to get the object data onto the template, and the test_render_as_field test already confirms that's working correctly.
2022-03-02 15:55:25 +00:00
Matt Westcott
d6358836f2 Remove redundant render_as_field override from BaseChooserPanel
All built-in choosers use the standard field_panel_field.html template - it's probably been this way since Wagtail 1.0, when choosers got their own Widget classes rather than just being HTML decoration around a HiddenInput. As a result, the additional template context they pass (e.g. self.object_type_name) is redundant. If any third-party chooser panels exist that do need them (which is unlikely, if they just copy the existing ones), they should override render_as_field themselves to pass whatever context they need.
2022-03-02 15:55:25 +00:00
Matt Westcott
c6f3b9982c Fix / remove broken documentation links 2022-03-02 11:48:06 +00:00
Matt Westcott
d4899f5a51 Fix heading level 2022-03-02 11:38:46 +00:00
LB Johnston
dc8fdeb11e update browserslist - not ie 11 2022-03-02 20:16:03 +10:00
LB Johnston
aaddf81b36 update release notes with Hallo removal
- resolves #6228
2022-03-02 20:15:33 +10:00
LB Johnston
59fad1fb00 remove hallo tests 2022-03-02 20:15:33 +10:00
LB Johnston
e5f5b070fb remove Hallo editor & related hooks 2022-03-02 20:15:33 +10:00
LB Johnston
6ecdc16bd4 remove Hallo references in the documentation 2022-03-02 20:15:33 +10:00
LB Johnston
13091eab34 remove Hallo JS 2022-03-02 20:15:33 +10:00
LB Johnston
5c01ecfa94 remove Hallo styles 2022-03-02 20:15:33 +10:00
LB Johnston
e20f3f6966 test integration - update packages
- puppeteer - v11 to v13 https://github.com/puppeteer/puppeteer/releases/tag/v12.0.0 & https://github.com/puppeteer/puppeteer/releases/tag/v13.0.0
- @wordpress/jest-puppeteer-axe" - v3 to v4 42a5611fa7/packages/jest-puppeteer-axe/CHANGELOG.md (400-2022-01-27)
- jest & expect-puppeteer - minor update
2022-03-01 22:54:12 +00:00
LB Johnston
51ba6e4c47 integration tests - update package-lock for Node v16 usage 2022-03-01 22:54:12 +00:00
Thibaud Colas
f0bb578f68
Wagtail packaging fixes (#8030) 2022-02-28 22:35:10 +00:00
Sage Abdullah
bf8d5b3f94 Replace data_json TextField with data JSONField in BaseLogEntry 2022-02-28 10:27:07 +00:00
Steve Stein
3bf9b65c06
Tailwind package setup (#8003)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-02-27 16:08:38 +00:00
Tibor Leupold
97f19562c9
Fix URLs in latest.txt (#8046)
The `url` key is meant for the latest release (2.16.1). The `minorUrl` key is for the latest "minor" release (2.16).

PR #7652 adds the functionality to show the appropriate link in the upgrade notification based on the difference between the currently used and the latest version.
2022-02-25 16:43:17 +00:00
Steve Stein
5417982b8c
Design tokens setup (#8005)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
2022-02-25 13:34:04 +00:00
Matt Westcott
e59c8bc644 Fix heading levels 2022-02-25 13:06:40 +00:00
jacobtoppm
4df2bd369b Fix formatting for #8024 2022-02-25 12:36:39 +00:00
Sage Abdullah
05812ce624 Remove replace_text management command 2022-02-25 11:39:47 +00:00
Sage Abdullah
bae76a2af0 Replace content_json TextField with content JSONField in PageRevision 2022-02-25 11:39:47 +00:00
LB (Ben Johnston)
861a509b32
add make format to cover most auto-fixable formatting (#8022) 2022-02-24 17:20:35 +00:00
Thibaud Colas
d149a27392 Upgrade Storybook setup, with latest release, less boilerplate 2022-02-24 21:22:45 +10:00
Thibaud Colas
b3e5f751e4 Add icons loading and demo to Storybook 2022-02-24 21:22:45 +10:00
Thibaud Colas
3aae7d0583 Add base pattern library setup with Storybook 2022-02-24 21:22:45 +10:00
Thibaud Colas
939fa98ef0 Move storybook configuration to a dotless folder, for linting 2022-02-24 21:22:45 +10:00
Thibaud Colas
e2b30c1690 Remove ESLint --max-warnings mistakenly added back in #7876 2022-02-23 10:39:46 +00:00
Matt Westcott
1c0d4d92a8 Install patched django-modelcluster and django-taggit when testing against django main 2022-02-23 08:26:23 +00:00
Matt Westcott
6a7a44f35d Prevent permission formsets from querying an unsaved group instance 2022-02-23 08:26:23 +00:00
Matt Westcott
62f49d7210 Fix test to match new stylesheet tag format in Dj4.1
As of 7c4f396509 the type="text/css" attribute is omitted.
2022-02-23 08:26:23 +00:00
Matt Westcott
1838fbfb1a Prevent custom MESSAGE_TAGS settings from leaking into admin styles
Fixes a test failure against Django main.

In #2552, a fix was applied to ensure that the project-level MESSAGE_TAGS setting was ignored, allowing end-users to customise that setting for their own projects without it leaking into Wagtail admin styles.

Unfortunately, the test was flawed (or was broken in a Django regression at some point): in Django <=4.0, MESSAGE_TAGS was not affected by override_settings after the first request, which meant that unless the test was run in isolation, the custom classname that was supposed to flag up the problem never got applied, and the test always succeeded.

The change to SVG icons broke the intent of #2552, since it used message.level_tag for the icon's classname (and this picks up MESSAGE_TAGS customisations), but due to the broken test this went unnoticed.

24b316536a fixed the override_settings behaviour, making the test fail as it should have done long ago.

Here we adjust the test to not rely on override_settings (so that it does what it's supposed to do on all Django versions), fix a test that gets broken as a side effect (because it's unnecessarily checking message.level_tag), and fixes our SVG-icon-powered message include to bypass the MESSAGE_TAGS setting like the old implementation did.

Confusing? Yes.
2022-02-23 08:26:23 +00:00