- Instead use the `w-init` controller and dispatch a custom event with the detail on the input
- Keep the rich_text_area.html template so that any customisations overriding this will not cause issues
- Fixes#11644
- Update JSDoc throughout controller for better internal documentation
- Ensure we 'clean up' the other controller attributes when the init has completed
- Allow for the ready event to have the preventDefault called and stop other events from dispatching
- Add unit tests to support the above changes
Instead of rendering the 'value' via provided links, simply check that the URLs are resolved in the 'options'
Otherwise we are not testing the correct HTML data
- Turn laces reference into link to package in the release notes
- This is so that interested parties have an easy path to find more information about the library.
- Add note referencing that implementation are now found in Laces
- Add note about components not being limited to the admin
Avoid the need to append to window.chooserUrls for the rich text usage of choosers for the non-core modules (images, documents, embeds).
Instead pass in the lazy URLs to the feature entity options.
Avoid the need to load window.chooserUrls globally in the shared _editor_js.html include.
Instead pass in the lazy URLs to the link chooser entity options.
Ensure that the JSON encoder can correctly handle lazy strings (such as reverse_lazy and gettext_lazy) so that there is better support for admin URLs and translations that may not be able to resolved when the application starts.
Instead of relying on global window.chooserUrls, add the support for also passing in entityType config objects that serve the same purpose.
Update JS unit tests to reflect that the future will no longer support the window.chooserUrls
The modal-workflow.js script is used across a wide range of views in the admin, it's simpler to include it globally instead of having to consider all places it may be used.
Also unblocks use cases that are outside of the core admin such as custom documents/user/image models that may want to leverage this functionality.
This can cause issues where e.g. stale permissions become the ones used
to render the checkboxes after a RenameModel operation (changing the
Python class name, not just the verbose_name).
A similar issue can also be triggered with custom permissions that share
the same codename action (first part of the codename before _) as the
built-in permissions.
Add missing select_related for content_type and batch the permission
queries for all content types instead of doing one query per model,
which can be a lot.
There are still duplicated queries due to the use of formsets, but there
isn't much we can do about it without some nasty hacks:
https://stackoverflow.com/questions/32082945
Ensure that versions are consistent between 1) what we specify in package.json; 2) the tag specified on the pre-commit mirror; 3) the package dependency line in the pre-commit config.
Change BaseTaskStateManager.reviewable_by() so that the specific tasks
are queried in bulk.
In GroupApprovalTask.get_task_states_user_can_moderate(), use
self.task_states reverse related manager so the resulting TaskStates
already have their task ForeignKey set to the current GroupApprovalTask
instance.
Remove 'task' from select_related as the reviewable_by() already fetches
the specific task in bulk.