Juro Oravec
c650e7f3a5
refactor: prefix component ID with c
( #1127 )
2025-04-14 12:01:16 +02:00
Juro Oravec
06cad2ec64
refactor: use typevar defaults + raise on conflicting extensions ( #1125 )
...
* refactor: use typevar defaults + raise on conflicting extensions
* refactor: fix linter errors
2025-04-14 10:00:18 +02:00
Juro Oravec
613dfea379
refactor: cleanup docs, add docs on Render API, allow get_context_data return None ( #1110 )
...
* refactor: cleanup docs, add docs on Render API, allow get_context_data return None
* refactor: fix linter and tests
2025-04-09 15:06:14 +02:00
Juro Oravec
bb5de86b69
feat: expose _class_hash as class_id ( #1094 )
...
* feat: expose _class_hash as class_id
* refactor: fix linting
2025-04-07 11:08:02 +02:00
Juro Oravec
a49f5e51dd
feat: component URL ( #1088 )
...
* feat: allow to set defaults
* refactor: remove input validation and link to it
* feat: component URL
* refactor: fix linter errors
* refactor: fix linter errors + update examples to use Component.View..get
* docs: update comment
* refactor: revert change to hash_comp_cls
* docs: update comment
2025-04-07 10:44:41 +02:00
Juro Oravec
7e74831599
refactor: remove input validation and link to it ( #1082 )
...
* feat: allow to set defaults
* refactor: remove input validation and link to it
* docs: update changelog
* Update typing_and_validation.md
* Update typing_and_validation.md
2025-04-05 08:19:19 +02:00
Juro Oravec
f07818fc7d
feat: allow to set defaults ( #1072 )
...
* feat: allow to set defaults
* docs: update changelog
* refactor: fix new linter errors
2025-03-31 10:38:41 +02:00
Juro Oravec
107284f474
feat: registry.has(); helpers to get all components and registries; access component from ext class ( #1030 )
...
* feat: registry.has(); helpers to get all components and registries; access component from ext class
* refactor: add missing import
2025-03-18 11:30:53 +01:00
Juro Oravec
7dfcb447c4
feat: add decorator for writing component tests ( #1008 )
...
* feat: add decorator for writing component tests
* refactor: udpate changelog + update deps pins
* refactor: fix deps
* refactor: make cached_ref into generic and fix linter errors
* refactor: fix coverage testing
* refactor: use global var instead of env var for is_testing state
2025-03-02 19:46:12 +01:00
Juro Oravec
f36581ed86
feat: benchmarking ( #999 )
...
* feat: add benchmarking dashboard, CI hook on PR, and store lifetime results
* refactor: change python env to 3.13 in benchmarks
* refactor: add verbosity, use 3.11 for benchmarking
* fix: OSError: [Errno 7] Argument list too long
* refactor: add debug statements
* refactor: remove extraneous -e
* refactor: fix tests and linter errors
* fix: track main package in coverage
* refactor: fix test coverage testing
* refactor: fix repo owner name in benchmark on pushing comment
* refactor: add asv monkeypatch to docs workflow
* refactor: temporarily allow building docs in forks
* refactor: use py 3.13 for benchmarking
* refactor: run only a single benchmark for PRs to speed them up
* refactor: install asv in the docs build workflow
* refactor: use hatch docs env to generate benhcmarks in docs CI
* refactor: more trying
* refactor: move tests
* Add benchmark results for 0.137
* Trigger Build
* Add benchmark results for 0.138
* refactor: set constant machine name when benchmarking
* Add benchmark results for 0.139
* refactor: fix issue with paths too long
* Add benchmark results for 0.140
* docs: update comment
* refactor: remove test benchmarking data
* refactor: fix comment
* refactor: allow the benchmark workflow to write to PRs
* refactor: use personal access token to set up the PR benchmark bot
* refactor: split the benchmark PR flow into two to make it work with PRs from forks
* refactor: update deprecated actions/upload-artifact@v3 to v4
* refactor: fix missing directory in benchmarking workflow
* refactor: fix triggering of second workflow
* refactor: fix workflow finally?
* docs: add comments to cut-offs and direct people to benchmarks PR
---------
Co-authored-by: github-actions <github-actions@github.com>
2025-02-23 16:18:57 +01:00
Juro Oravec
96f48bc013
refactor: fix on_render_after hook ( #941 )
2025-02-01 17:39:56 +01:00
Juro Oravec
588053803d
refactor: fix component recursion ( #936 )
2025-02-01 17:19:21 +01:00
Juro Oravec
92f5497c74
refactor: change repo name and URL after org migration ( #924 )
2025-01-22 16:02:46 +01:00
Juro Oravec
d94a459c8d
refactor: rename template_name to template_file ( #878 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-01 17:06:14 +01:00
Juro Oravec
fe67d90547
refactor: Backbone for passing JS and CSS variables ( #861 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-28 19:27:19 +01:00
Laurence Hole
dfd4187192
Adding request
arg to render ( #817 )
...
Co-authored-by: Laurence Hole <laurence@safi.co>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-10 13:28:34 +01:00
Juro Oravec
dd6d668b5e
fix: do not render slot tag when extracting fill tags ( #786 )
...
* fix: do not render slot tag when extracting fill tags
* refactor: show component path in error message
* docs: update changelog
* refactor: fix tests
2024-11-27 17:19:41 +01:00
Juro Oravec
5fd45ab424
chore: Push dev to master to release v0.110 ( #767 )
...
* feat: skeleton of dependency manager backend (#688 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: selectolax update and tests cleanup (#702 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: move release notes to own file (#704 )
* chore: merge changes from master (#705 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yassin Rakha <yaso2go@gmail.com>
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
fix for nested slots (#698 ) (#699 )
* refactor: remove joint {% component_dependencies %} tag (#706 )
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: split up utils file and move utils to util dir (#707 )
* docs: Move docs inside src/ to allow imports in python scripts (#708 )
* refactor: Docs prep 1 (#715 )
* refactor: Document template tags (#716 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: pass slot fills in template via slots param (#719 )
* chore: Merge master to dev (#729 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yassin Rakha <yaso2go@gmail.com>
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
Co-authored-by: Tom Larsen <larsent@gmail.com>
fix for nested slots (#698 ) (#699 )
* fix: Do not raise error if multiple slots with same name are flagged as default (#727 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: tag formatter - allow fwd slash in end tag (#730 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor: Use lowercase names for registry settings (#731 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: add docstrings (#732 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: define settings as a data class for type hints, intellisense, and docs (#733 )
* refactor: fix reload-on-change logic, expose autodiscover's dirs-getting logic, rename settings (#734 )
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* docs: document settings (#743 )
* docs: document settings
* refactor: fix linter errors
* feat: passthrough slots and more (#758 )
* feat: passthrough slots and more
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: remove ComponentSlotContext.slots
* refactor: update comment
* docs: update changelog
* refactor: update docstrings
* refactor: document and test-cover more changes
* refactor: revert fill without name
* docs: update README
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* fix: apostrophes in tags (#765 )
* refactor: fix merge error - duplicate code
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
2024-11-25 09:41:57 +01:00
Juro Oravec
841dd77e91
refactor: Fix template caching, expose cached_template
, Component.template API changes ( #647 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-06 22:40:39 +02:00
Juro Oravec
e712800f5e
feat: add self
context var and make is_filled
into attribute ( #632 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-04 21:41:20 +02:00
Juro Oravec
2d0f270df4
fix: populate RequestContext with context processors ( #643 )
2024-09-04 21:31:44 +02:00
Juro Oravec
0cfc40231b
feat: add component hooks ( #631 )
2024-08-31 13:38:28 +02:00
Juro Oravec
4a9cf7e26d
feat: validate component inputs if types are given ( #629 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 23:09:36 +02:00
Juro Oravec
efd05d6150
feat: Typing for component inputs and access inputs during render ( #585 )
2024-08-22 23:42:34 +02:00
Juro Oravec
b8e92dac37
fix: Set Context.template
for components to work with include ( #582 )
2024-08-16 23:31:00 +02:00
Juro Oravec
e771a0aaaf
refactor: Use top-level exports as public API ( #562 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-03 08:30:39 +02:00
Juro Oravec
8cb88558f0
refactor: Prepare autodiscover and template loader for v1 ( #533 )
2024-07-29 20:27:35 +02:00
pre-commit-ci[bot]
49c4e84f07
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-06-11 19:43:02 +00:00
Juro Oravec
36cd6e3f06
refactor: compat with comp as view by reusing comp instance
2024-06-11 21:41:56 +02:00
Juro Oravec
5c89d4dbeb
refactor: pass slot data and slot default to slot render fn and rename LazySlot to SlotRef
2024-06-11 14:34:04 +02:00
Juro Oravec
40f4476993
refactor: add test for response_class
2024-06-02 16:37:22 +02:00
pre-commit-ci[bot]
a5a0c74d31
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-06-02 14:23:56 +00:00
Juro Oravec
5f07f3d4da
refactor: update tests
2024-06-02 16:22:49 +02:00
Juro Oravec
95f6554f4c
tests: Split test files and run template tests under both context behavior modes ( #509 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-28 08:23:32 +02:00
Juro Oravec
610475353f
feat: Support for HTML attributes and html_attrs
tag ( #491 )
2024-05-12 11:21:34 +02:00
pre-commit-ci[bot]
04d968ace9
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-05-02 20:34:46 +00:00
Juro Oravec
8c4a55901c
tests: add inline syntax highlight, inline template files
2024-05-02 22:33:02 +02:00
Juro Oravec
3fc90e4956
feat: merge context settings, replace if_filled tag with var
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-01 20:55:09 +02:00
Juro Oravec
981eb59cf1
feat: Allow multiple slots with the same name in the same template
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-29 15:09:25 +02:00
Juro Oravec
29c931f150
refactor: fix slot fills for components nested in themselves ( #456 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 20:36:05 +02:00
Juro Oravec
091da26da5
refactor: Tests cleanup and better test isolation ( #452 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 14:20:33 +02:00
Juro Oravec
ae22eff8af
refactor: fix context vars missing in isolated slot ( #455 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-25 12:08:20 +02:00
Juro Oravec
eb40afba7b
refactor: remove Django30CompatibleTestCase
2024-04-18 13:33:58 +02:00
Juro Oravec
bacd683c44
refactor: fix type imports in tests
2024-04-16 23:25:13 +02:00
pre-commit-ci[bot]
ab7f3e0cdb
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2024-04-16 23:25:13 +02:00
Juro Oravec
089cda54c5
refactor: fix tests
2024-04-16 23:25:13 +02:00
Juro Oravec
1dd492314a
refactor: use component_id instead of Template as slot fill cache key
2024-04-16 23:25:13 +02:00
Juro Oravec
3050dc71b9
refactor: add test
2024-04-11 23:44:36 +02:00
Juro Oravec
37fd901908
Resolve media and template files relative to component class dir ( #395 ), thanks @JuroOravec
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
2024-03-23 19:01:39 +01:00
Emil Stenström
edf3885632
Replace all instances of component_block with component. Remove duplicate tests.
2024-02-21 22:38:06 +01:00