Thibaud Colas
9f23b19b17
Rework type scale according to latest designs
2023-04-17 09:28:16 +01:00
Thibaud Colas
e0f9014c91
Add missing w-field__help class to other field markup implementations
2023-04-17 09:28:16 +01:00
Matt Westcott
09fb848288
Release notes for #10271 / #10275 / #10294
2023-04-14 15:38:24 +01:00
Sage Abdullah
9e914dbe87
Remove usage_url and get_usage methods from snippet models
...
The usage_url can be resolved from the SnippetViewSet,
and the get_usage can be replaced with ReferenceIndex.get_grouped_references_to
2023-04-14 15:35:10 +01:00
Sage Abdullah
885b4783ee
Add ReferenceIndex.get_grouped_references_to() method
2023-04-14 15:35:03 +01:00
Sage Abdullah
ff363dee87
Remove get_admin_url_namespace() and get_admin_base_path() from snippet models
2023-04-14 15:34:58 +01:00
Sage Abdullah
1d838fbce0
Make SnippetViewSet extend ModelViewSet
2023-04-14 15:34:02 +01:00
Sage Abdullah
fbd3cca30f
Pass SnippetViewSet.get_queryset function as the queryset instead of accessing the viewset directly
2023-04-14 12:34:17 +01:00
Sage Abdullah
87cbf01894
Add docs and tests for overriding SnippetViewSet.get_queryset()
2023-04-14 12:34:11 +01:00
Sage Abdullah
6e6680bd75
Extract BaseSnippetViewSetTests class for custom SnippetViewSet tests
2023-04-14 12:33:59 +01:00
Sage Abdullah
cbcecd0b01
Allow overriding base queryset of Snippets IndexView via SnippetViewSet.get_queryset()
2023-04-14 12:33:50 +01:00
Sage Abdullah
c973f5e118
Split initial logic of generic IndexView's get_queryset to get_base_queryset()
2023-04-14 12:33:39 +01:00
Thibaud Colas
8aa0bf9275
Release notes for #10303
2023-04-14 08:38:01 +01:00
Thibaud Colas
8ee0141361
Update wagtail_icons_table.txt
2023-04-14 08:38:01 +01:00
Thibaud Colas
b307549e3c
Use an SVG icon for rich text horizontal line
2023-04-14 08:38:01 +01:00
Thibaud Colas
6866293d4e
Styling tweaks for new icons
2023-04-14 08:38:01 +01:00
Thibaud Colas
93732690a3
Update icon visuals to FontAwesome 6, with deprecation warnings for removed icons
2023-04-14 08:38:01 +01:00
Sage Abdullah
dc6c0b0949
Allow overriding SnippetViewSet template prefix
2023-04-13 17:53:58 +01:00
Sage Abdullah
f0857770a7
Do not pass SnippetViewSet into the views and pass template_name instead
2023-04-13 17:53:58 +01:00
Sage Abdullah
b0177333f8
Override get_template_names() to allow WagtailAdminTemplateMixin.template_name to be a list
2023-04-13 17:53:58 +01:00
Sage Abdullah
f2ab3ae774
Add docs and tests for Snippets template overrides
2023-04-13 17:53:58 +01:00
Sage Abdullah
1638695d12
Look for model_index.html before using the generic template for snippets ModelIndexView
2023-04-13 17:53:58 +01:00
Sage Abdullah
0ded23402e
Allow template overrides for Snippets views that use generic templates
2023-04-13 17:53:58 +01:00
Sage Abdullah
25ae75ab2f
Allow template overrides from SnippetViewSet
2023-04-13 17:53:58 +01:00
Sage Abdullah
2bb0088f21
Pass viewset instance to all Snippets views
2023-04-13 17:53:58 +01:00
Sage Abdullah
b3a9c79f40
Rename Snippets type_index.html and results.html templates to index.html and index_results.html
2023-04-13 17:53:58 +01:00
Sage Abdullah
1992c72791
Add missing docs for chooser_viewset_class
2023-04-13 17:53:58 +01:00
Hanoon
70a6230a65
Migrate submit translation bulk toggle to Stimulus Controller (w-bulk)
...
- Closes #10247
- adding BulkController files and removing {% block extra_js %} from submit_translation.html
- add unit tests for new controller
- partial work on CSP compliance #7053
2023-04-13 22:28:17 +10:00
Matt Westcott
f88796b3dd
Release note for #10208
2023-04-12 16:26:05 +01:00
Matt Westcott
b3b8af2cf6
Revert "Switch to real database backend for tests"
...
This reverts commit 024763c948
.
2023-04-12 16:23:06 +01:00
Matt Westcott
601c59eef0
Use TransactionTestCase for snippet search tests
2023-04-12 16:22:56 +01:00
Matt Westcott
e1f4876ac6
Use TransactionTestCase for image model search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
daf56028fe
Use TransactionTestCase for image admin view search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
d3503bfd5a
Use TransactionTestCase for document model search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
18e445c5f4
Use TransactionTestCase for simple modeladmin search test
2023-04-12 16:03:54 +01:00
Matt Westcott
706113c1e1
Use TransactionTestCase for TestChooserSearch in test_page_chooser
2023-04-12 16:03:54 +01:00
Matt Westcott
34876237c2
Use TransactionTestCase for page queryset search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
f86666f5ef
Use TransactionTestCase for document admin search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
da171df2ce
Use TransactionTestCase for page search tests
2023-04-12 16:03:54 +01:00
Matt Westcott
7d754d0fce
Use TransactionTestCase for API search tests
...
This allows them to work against MySQL - FTS indexing only takes effect when the transaction is committed, so the regular TestCase class (which wraps the whole test in a transaction) cannot be used. This in turn requires the demosite.json fixture to be tweaked to explicitly set locale and collection.
2023-04-12 16:03:54 +01:00
Matt Westcott
ae89cd6b11
Fix annotate_score tests to test a real search, and run indexer
2023-04-12 16:03:54 +01:00
Matt Westcott
c281c4605b
Fix snippet search tests to avoid searching on a stopword
2023-04-12 16:03:53 +01:00
Matt Westcott
d871cd4635
Disable order_by_relevance when testing custom ordering on search queries
2023-04-12 15:53:34 +01:00
Matt Westcott
dc08bca094
search for 'lord' instead of 'of' to avoid stopword removal
2023-04-12 15:53:34 +01:00
Matt Westcott
09d61cedcd
Use more distinctive keywords in API search tests
...
searching on "elephant" instead of "again" will make it less susceptible to stopword removal
2023-04-12 15:53:34 +01:00
Matt Westcott
99b3813d6e
Use the correct context variable for snippet chooser tests
...
'items' is only assigned within the results.html template, and only when results are non-empty, so if no results are returned we get a KeyError that obscures the real test failure
2023-04-12 15:53:34 +01:00
Matt Westcott
cee79201d3
Fix test for root appearing in search results
...
Search for 'root' so that it isn't dependent on partial matching, and run the indexer first
2023-04-12 15:53:34 +01:00
Matt Westcott
2f41de277d
Switch to real database backend for tests
2023-04-12 15:53:34 +01:00
Matt Westcott
ca6732f569
When capturing deletion signals, don't assume objects have an id field
...
Deleting a model will delete its linked SQLiteFTSIndexEntry records, which use the OneToOneField index_entry as the primary key.
2023-04-12 15:53:34 +01:00
Matt Westcott
12e277a95c
Update page chooser search tests to not rely on partial matching
...
except the one test that's actually testing partial matching
2023-04-12 15:53:34 +01:00