The primary use-case for this was to point to the first item of a radio select, and Django no longer does this as of 4.0 (b9e872b593). In all other known cases, the default behaviour of returning the one input element's ID is sufficient - and if any other widget has non-standard handling of input elements to the point that this isn't the case, then it will certainly need its own Widget subclass on the JS side, and at that point it makes far more sense to provide a suitable JS implementation of idForLabel rather than doing a string replacement on whatever the Django function gives you.
This shouldn't break any documented APIs, as the base Widget class was not exposed outside of entrypoints/admin/telepath/widgets.js on previous releases, meaning that third-party widgets are expected to implement their own work-alike classes which will be unchanged by this. We update the widget API documentation to reflect the fact that an id_for_label parameter is no longer considered a good idea, though.
It references wagtailadmin/js/telepath/telepath.js and wagtail.admin.staticfiles, and we don't want wagtail core to depend on code in wagtail.admin. Also, we don't want to encourage use of this registry outside of admin views, as adapters registered here are likely to depend on admin-specific JS includes.
Leave other versionadded/versionchanged notes intact, as they relate to deprecated features that are not yet removed and should thus be left in place until 7.0.
This is necessary for rST docs, i.e. in docstrings and in eval-rst
blocks. Without this, Sphinx cannot seem to understand the role. See:
https://stackoverflow.com/questions/13387125
MyST-Parser seems to be smarter, it can figure out these custom
roles without having to register the types ourselves. This is evident in
the previous commits where I already use the :setting: role in markdown
docs.
Some link labels are changed to just the code part, because using Sphinx
roles for code objects (e.g. methods, attributes) would always format the
text as inline code.
It's currently impossible to customize the formatting of a link's text in
rST. See https://stackoverflow.com/questions/4743845
- Changed all British spellings to American spellings, in the Customizing admin templates section of the docs
- Transferred all British spellings in the usage guide and advanced topics section to American spellings
- Update a series of other pages to use the spelling cutomize in the file name
Implemented all feedbacks on the usage guide and advanced topics section
- Optimized/Customized/Catregorize -> Optimised/Customised/Categorise
- Github -> GitHub (80% were spelt with capital H, this is the way GitHub spells itself)
- GitPod -> Gitpod (most were without the capital P, Gitpod's site does not use capital P)
- Remove duplicate words (to to, the the)
- De-coupled -> decoupled
- implementors -> implementers (all other references used 'site implementers' so just aligning with the common case)
- Fix a/an usage in one case
- Fix one comment usage of ok, replace with OK
- fix some broken refs that were lost in the migration to markdown files
- use lower_snake_case for all internal refs (most follow this convention)
- release process sub-section in docs should be named release schedule instead
This argument should be used on all new StreamFields created under Wagtail 3. It does add some clutter to the examples, but only using it in select cases would create more confusion...
As per discussion on https://github.com/wagtail/wagtail/discussions/7732, the changes in the upcoming release (sidebar redesign, removal of hallo.js, module reorganisation) warrant a version bump to 3.0 if we're following semantic versioning.
Add system check for use_json_field in StreamField
Change system check level to Warning
Add use_json_field argument to StreamField in test models
Use RemovedInWagtail219Warning instead of a system check
Handle unpacked values in to_python when use_json_field is True
Duplicate models and tests for JSONField-based StreamField
Add basic tests for JSONField-based StreamField
Add json_field property in StreamField to unify JSONField usage
Add docs
Don't use destructuring for kwargs in deconstruct
Add versionchanged note to StreamField reference