Skip to content

Releases: wrabit/django-cotton

v0.9.23

21 Jul 07:57
Compare
Choose a tag to compare

What's Changed

An issue caused a discovery that tags were being mutated if DTL syntax was against an opening tag name i.e.

<li{% expr %}>..</li>

Which after processing resulted in:

<li{% expr %}>..</li{% expr %}>

We solved it by better handling of white space when we match and replace the DTL expressions.

Full Changelog: v.0.9.22...v0.9.23

v0.9.21

19 Jul 07:24
Compare
Choose a tag to compare

What's Changed

Fixed issue reported by @aaltatan where '=' was breaking the attribute parsing by _component.

What else

Full Changelog: v0.9.20...v0.9.21

v.0.9.22

19 Jul 09:32
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.21...v.0.9.22

v0.9.20

17 Jul 09:04
Compare
Choose a tag to compare

What's Changed

  • set charset from engine default by @wrabit in #61

Default charset when processing template files should be utf-8 or as defined in the the loader settings. This was being skipped. Related to an issue from @zagro-dev.

  • fixed tabbed component on docs home by @wrabit in #58
  • improved some coherence in component and slot by @wrabit in #59

Full Changelog: v0.9.19...v0.9.20

v0.9.19

14 Jul 11:39
Compare
Choose a tag to compare

What's Changed

  • permitted duplicate attributes in DTL by @wrabit in #57

@pedroven identified an issue where the loader was not allowing us to use Django template expressions to govern whole attributes inside html elements. This was due to the compilation where BS4 cleanses HTML removing duplicate attributes adhering to html spec:

There must never be two or more attributes on the same start tag whose names are an ASCII case-insensitive match for each other.

Since our target is not HTML, but Django Template Language, this behaviour is not desirable, we now manage this in the Cotton Compiler.

Full Changelog: v0.9.18...v0.9.19

v0.9.18

13 Jul 22:58
Compare
Choose a tag to compare

What's Changed

  • fixed attributes with leading or trailing quotes by @wrabit in #56

Full Changelog: v0.9.17...v0.9.18

v0.9.17

11 Jul 10:53
Compare
Choose a tag to compare

What's Changed

Full Changelog: v0.9.16...v0.9.17

v0.9.16

10 Jul 19:53
Compare
Choose a tag to compare

What's Changed

Cotton components are now cached whilst in production / DEBUG = False.

  • The cache type is LRU with a record count of 1024 which will be cleared on app restart
  • Future refinement needed to optimise the responsibility of caching in the loader
  • Planned improvement of hybrid caching during development

Full Changelog: v0.9.15...v0.9.16

v0.9.15

06 Jul 08:18
Compare
Choose a tag to compare

What's Changed

  • converts hyphen var names to uderscores for access by @wrabit in #41

When we want to explicitly access attribute as a var which has '-' hyphens, it will be accessible by the snake case form. i.e.

<c-component x-data="{}" />
{{ x_data }}

Note: This does not affect attribute names within {{ attrs }} where any hyphenated name will stay hyphenated.

Full Changelog: v0.9.14...v0.9.15

v0.9.14

05 Jul 23:58
Compare
Choose a tag to compare

What's Changed

The vars frame is now only used when we have specified a <c-vars /> tag in a compoent. From benchmarks, there's a ~15% performance increase:

10k components rendering:

Before:
1.71s

After:
1.39s

Full Changelog: v0.9.13...v0.9.14