Skip to content

Releases: Nigel2392/wagtail_fedit

(v1.6.1) Adding Blocks

23 May 10:52
Compare
Choose a tag to compare

Additions

  • Allow for adding blocks on the frontend
  • Test for adding blocks on the frontend

Updates

  • If a page is present in the context it will automatically be added to the block's kwargs (shared context)

Fixes

  • Fix frame load after re-editing a previously edited adapter on the frontend

(v1.5.8) Moving blocks

20 May 10:31
Compare
Choose a tag to compare

Additions

  • Allow for moving blocks up or down when using the movable flag in the template tag for blocks.
  • Move-block view
  • New log action for moving blocks
  • Add fetch method for typescript api class
  • Add tests for move-block view

Changes

  • Change internals of typescript adapter classes.
  • Add on_register method for adapters.
  • Update docs
  • Update dutch translations
  • Minor CSS changes
  • Watch container size when editing dom-field or dom-block nodes; resize iFrame accordingly
  • Move around internal modules to avoid import cycles when creating the move-block view
  • Return parent and block's index in find_block method along with the block and contentpath
  • Change tests for find_block updated return arguments

(v1.5.7) Adapter Improvements

18 May 16:19
Compare
Choose a tag to compare

Additions

  • dom-field adapter which allows does not create a modal; but 'replaces' the original content inline.
  • 'dom-block' adapter which allows does not create a modal; but 'replaces' the original content inline.
  • Include adapter_help command output in docs.

Changes

  • Change internals of base adapter.
  • Change event names from being prefixed by MODAL / modal to EDITOR / editor

(v1.5.5) Move to Typescript

08 May 11:53
Compare
Choose a tag to compare

Additions

  • Test for adapter refetch functionality
  • Test for shared context
  • Documentation built with 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

Fixes

  • Fix to function which registers snippet action menu item

(1.5.4) Tippy tooltips, updated translations

23 Apr 15:53
Compare
Choose a tag to compare

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) Remembering data, editing models and more

21 Apr 00:37
Compare
Choose a tag to compare

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) Tests; README update and fixes

20 Apr 23:44
Compare
Choose a tag to compare

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) Custom adapters, general improvements

20 Apr 20:01
Compare
Choose a tag to compare

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) Context Processors and Tests

15 Apr 20:53
Compare
Choose a tag to compare
  • Run context processors after re-rendering when the form was submitted.
  • Add tests for context_processors functionality.

(1.4.9) Fixes, Tests and Updates

15 Apr 19:16
Compare
Choose a tag to compare
  • Fix CSS for editable- html
  • Fix reinitialization of JS class
  • Add tests for BlockAdapter
  • Add ID attribute for adapter template
  • Fix context variables/rendering if not available
  • Updates to README