Fixes #1824, as per the outline in https://github.com/wagtail/wagtail/issues/1824#issuecomment-1271840741. Revise the existing migrations so that rather than keeping the wagtailsearch_editorspick table in place and unmanaged for the wagtail.contrib.search_promotions app to potentially rename and adopt, search_promotions creates its own table. This then leaves wagtailsearch free to delete wagtailsearch_editorspick properly in a new migration, to be run on both new and upgraded projects (although this needs to be done inside an existence check, in case the old version of the search_promotions app migrations have already run and renamed the table).
Calling focus() on a block immediately after inserting it with animate:true has been broken since d3e58f7908, since the field only becomes focusable once the animation begins. Address this by adding a new 'focus' option to the BaseSequenceChild constructor and related insert methods, to indicate that the block should be focused as soon as it becomes available.
Use different icons for workflow timeline component, so the steps can be distinguished with other means than color (Sam Moran)
Co-authored-by: Thibaud Colas <thibaudcolas@gmail.com>
WagtailAdminFormPageForm.clean checks for duplicate fields by generating
a clean_name from a FormField's current label, catching duplicate labels.
However, once saved, a FormField's clean_name cannot change. It's
possible for clean_names to clash if a a field is renamed and add a new
field with the same name.
Updated duplicate check to take existing clean_name into account.
Refactored logic to avoid nested loops.
* "time_prefix" has been replaced by the boolean "show_time_prefix"
to only handle the single prefix "at ".
* It now always uses complete gettext strings to allow better
customization in each language.
* For dates older then the current date "user_display_name" is now
used correctly.
* Improved the tests to handle some of the missing cases.
(Mostly) fixes the issue described in https://github.com/wagtail/wagtail/pull/9170#issuecomment-1263592392. When deleting old references within `ReferenceIndex.create_or_update_for_object`, skip over any with a source content_type that does not match the currently-indexed object or any of its superclasses - these can be assumed to come from a more specific version of the object, with relations that we don't know about from inspecting the less-specific one.
This does have the side effect that once an object has been indexed in its more specific form, any invocations of create_or_update_for_object on the less-specific model will be over-cautious, and fail to delete records even if they legitimately refer to relations that exist on the base model - i.e. those references will stick around until the more specific model is indexed. This is a lesser bug than the original, though, and running `rebuild_references_index` will make the index consistent with the database state.