Skip to content

Releases: adamghill/django-unicorn

0.61.0

28 Jul 03:34
Compare
Choose a tag to compare
  • Add template_html to specify inline template HTML on the component.
  • Add resolved method which only fires once even when there are multiple actions, e.g. during a debounce.

0.60.0

25 Feb 16:22
Compare
Choose a tag to compare
  • Silence warnings about multiple root elements for direct views.
  • Handle force_render in nested children for direct views #663.
  • Handle error when manually refreshing direct views.
  • Handle component field type annotations for dataclasses and Pydantic BaseModel #649 by siliconcow.
  • Update startunicorn command to prevent spamming users and handle folder creation for nested components #642 by felipmartins.

Breaking changes

  • Unparseable kwarg argument passed into a component will be considered None instead of being converted to a string.
<!-- If `abcde` is not a variable in the template context, it will get set to `name` as `None` whereas before it would get set as 'abcde' -->
{% unicorn 'hello' name=abcde %}

0.59.0

15 Feb 02:35
Compare
Choose a tag to compare
  • Update logic to find components #655 by jacksund.
  • Add fallback location to look for components.

0.58.0

24 Dec 02:56
Compare
Choose a tag to compare

This release could not have been made possible without the generous support of @winrid and @om-proptech. Thank you for sponsoring me and believing in django-unicorn! It also includes critical improvements to nested components from @imankulov.

  • Handle a list of ValidationError or just a string instead of requiring a the dict version.
  • Better support for type annotations for component fields.
  • Improved nested component support by imankulov.
  • Add force_render and $parent.

Breaking changes

Child components will not by default render the parent component anymore. If this is required for your child component, specify self.parent.force_render = True in any action that requires the parent to re-render. This change will reduce network bandwidth and isolates the amount of re-rendering required for nested components.

0.57.1

04 Nov 13:08
Compare
Choose a tag to compare
  • Fix: Correctly serialize forms that have a a field with a Select widget.

0.57.0

28 Oct 21:02
Compare
Choose a tag to compare
  • Warn if there is a missing root element.
  • Use unicorn:id to merge elements with morphdom.

0.56.1

02 Oct 02:00
Compare
Choose a tag to compare
  • Handle Alpine.js being loaded with defer.

0.56.0

02 Oct 00:53
Compare
Choose a tag to compare
  • Add support for using both Alpine.js and Unicorn together in a component (#597 by imankulov).
  • Do not send a 304 if the child has a parent (#595).
  • Prevent sending the child DOM if there is a parent to reduce network payload size.
  • More verbose error message when a component can not be loaded (#453 by nerdoc).

0.55.0

01 Sep 21:01
Compare
Choose a tag to compare
  • Support List/list type annotations for component actions and fields (#582).
  • Fix: calling a method in a parent will have the request available ([#583]#583).

Breaking changes

0.54.0

12 Aug 13:51
Compare
Choose a tag to compare
  • Coerce type annotated arguments in an action method to the specified type (#571).
  • Fix: Dictionary fields would sometimes create checksum errors (#572).