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
Emil Stenström
48fe8171b4
Reformat lines that became too long. And enforce 119 line length.
2024-02-21 22:38:06 +01:00
Dylan Castillo
70a2a01400
Implement single file components
2024-01-14 22:36:55 +01:00
lemontheme
a8dfcce24e
Introduce {% fill %} replacing 'fill' func of 'slot' tag
...
Partial implementation fill-tags plus update tests
Implement {% fill %} tags. Next: update tests.
Bring back support for {%slot%} blocks for bckwrd-compat and implement ambig. resolution policy
Update tests to use fill blocks. Add extra checks that raise errors
Add new tests for fill-slot nesting
Update README. Editing still required
remove unused var ctxt after flake8 complaint
fix flake8 warning about slotless f-string
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Add new slot aliases in fill context. Clean up rendering logic in Component. Update docs.
fix flake8, isort, black errors
Refactor duplicated name validation
Add if_filled tag + elif_filled...else_filled...endif_filled for cond. slots
Fix mistake in do_if_filled() docstring
Upload templates for tests! D'oh
Incorporate PR feedback
Drop Literal type hint; Use isort off-on instead of skip in tests
Treat all fill,slot,if_filled,component names as variables
Reset sampleproject components
Add test for variable filled name
Update examples in docs
2023-03-14 23:40:21 +01:00
Emil Stenström
36237f0752
Make Media.css and Media.js optional.
2023-02-09 22:15:47 +01:00
Emil Stenström
8af63ad3ad
Ignore type="text/css" in tests, it doesn't matter.
2022-12-25 23:00:59 +01:00
Emil Stenström
98ea9405f9
Fix test breakage when setting accessed before django.setup().
2022-07-14 09:29:00 +02:00
pre-commit-ci[bot]
0648ad9a93
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2021-09-10 11:12:26 +00:00
Real-Gecko
5fcabaa5ba
Renamed get_context
to get_context_data
2021-09-10 11:27:55 +02:00
Emil Stenström
5b9188cc9c
Refactored Component class
...
# Conflicts:
# README.md
# pyproject.toml
2021-09-10 11:27:28 +02:00