Wagtail-fedit

Latest version: v1.5.4

Safety actively analyzes 625610 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.5.5rc3

Additions
* Test for adapter refetch functionality
* Test for shared context
* [Documentation](https://nigel2392.github.io/wagtail_fedit/) built with [doccer](https://github.com/Nigel2392/doccer)

Changes
* Refactor all javascript files into TS
* Uniform context function for retrieving/adding minimally required attributes to adapter context
* Pre-populate defaults for optional and absolute 'Keywords'
* Add Tippy setting to README

1.5.4

Additions
* Tippy tooltips when hovering over buttons
* Add caveat for userbar model links
* Add keywords for `BackgroundImageFieldAdapter`
* Type annotations to `frontend.js`
* Adapter base JS class now inherits from `EventTarget`
* Add `{% fedit_userbar instance %}` template- tag
* View to re- fetch `Adapter` HTML

Updates
* Updated translations
* Update actions wagtail 6.1 workflow for wagtail==6.1rc2
* Actualise translations

Changes
* README TOC section inside details
* Improve internal workings of `Keyword` class.
* Improve `Adapter.get_header_title` strings by wrapping instance in single quotes.
* Move `View` error messages to `errors.py`
* Improve help command based on settings
* Tiny improvements to CSS selectors / attributes
* Simplify `AdapterNode.render`
* Button visibility based on permissions / URL availability for `FeditAdapterAdminLinkButton`

1.5.3

Additions
* Specify `as variable_name` as final arguments to fedit tag to store the adapter HTML in the context.
Exampe: `{% fedit field my.field inline as my_editable_inline_field %} {{ my_editable_inline_field }}`
* Add `ModelAdapter` for directly editing a django model (or revision of that model).
Example: `{% fedit model instance %}`
* Add adapter tests for `ModelAdapter`
* View tests for `ModelAdapter`
* Add hook to determine type of form-widget to use for ModelField

Updates
* Allow sharing of context through session data instead of URL parameters (allows for nearly arbitrary shared context data without a length imposed)
* Auto-generation of shared-context keys with uuid if enabled
* Allow for custom formfield based on model-field type or related model type if modelfield is `ForeignKey` for `FieldAdapter` and it's subclasses.
Registered with hook `wagtail_fedit.register_field_widgets`.
* Update README

Changes
* Adapters render their own modal HTML
* Changes to how adapters work internally; added `field_required` class-attribute to determine if a model instance alone will suffice in the template-tag.
This means the view, templatetags and adapters got a relatively large-sized rework.
* Field-, Block- and ModelAdapters will now also replace similar elements if their `data-related-id` element- attribute matches
* Check for editing- instance locale in `AdapterView` and the `FEditableView`, set activate locale if exists.
* Optionally save initial `request.LANGUAGE_CODE` in adapter shared context to avoid mismatched translations before and after saves.
* keywords attribute instead of `required_kwargs`, `absolute_tokens` and `optional_kwargs`.
Allows for simpler definitions and better integration with the management command.

1.5.2

Additions

* Add test for HTTP GET action views
* Add README section for settings
* Add hooks to README hooks section
* Add examples of custom adapters in README

Fixes

* Fix snippet publish view

1.5.1

Updates
* README for custom adapter explanation
* README for `adapter_help` command
* Adapters can be fully customized with callbacks into custom JS functions
* Quicklink in block-wrappers to view block in Wagtail admin if `admin` is provided to `BlockAdapter`
* Allow adapters to specify `absolute_tokens` which act like boolean flags inside of the template-tag. These are not parsed as variables!

Additions
* `adapter_help` management command
* 3 new adapters, `BaseFieldFuncAdapter`, `BaseBlockFuncAdapter`, `BackgroundImageFieldAdapter`
* Docstrings for functions in most files
* `WAGTAIL_FEDIT_SIGN_SHARED_CONTEXT` setting to determine if shared context should be signed with a secret key.
* Adapters can provide form attributes (in the iFrame) which in turn can control editor size, size can be `full`, `large` or unspecified for default size.
* Use template-tag to dynamically include all required CSS for your custom adapters with the `wagtail_fedit.register_css` hook.
* Use template-tag to dynamically include all required JS for your custom adapters with the `wagtail_fedit.register_js` hook.
* `wagtail_fedit.field_editor_size` hook to control size of modal for FieldAdapters.
* Check for `editor_size` on block's `meta` attribute to control editor size for BlockAdapters.

Changes
* Move `wrap_adapter` to `utils.py` to avoid import-loops
* Check for `block_id` and `block` if `block` is not `BoundBlock` for the `BlockAdapter`
* Improvements to frontend CSS
* Initialize `FeditToolbarComponent` object with request instead of passing to methods.

Removed
* Multiple unused functions
* Multiple unused templates
* Request argument from methods `FeditToolbarComponent` methods.

1.5.0

* Run context processors after re-rendering when the form was submitted.
* Add tests for context_processors functionality.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.