Juro Oravec
c692b7a310
refactor: Fix #1277 + Cache components' JS/CSS scripts at class creation ( #1283 )
...
* refactor: Cache components' JS and CSS scripts at class creation time
* refactor: add test for no template_rendered signal for component with no template
2025-07-03 12:27:21 +02:00
Juro Oravec
09bcf8dbcc
feat: on_xx_loaded extension hooks ( #1242 )
...
Run tests / test_sampleproject (3.13) (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.13) (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.8) (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.9) (push) Has been cancelled
Run tests / build (windows-latest, 3.10) (push) Has been cancelled
Run tests / build (windows-latest, 3.11) (push) Has been cancelled
Run tests / build (windows-latest, 3.12) (push) Has been cancelled
Run tests / build (windows-latest, 3.13) (push) Has been cancelled
Run tests / build (windows-latest, 3.8) (push) Has been cancelled
Run tests / build (windows-latest, 3.9) (push) Has been cancelled
Run tests / test_docs (3.13) (push) Has been cancelled
Docs - build & deploy / docs (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.10) (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Run tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
* feat: on_xx_loaded extension hooks
* refactor: fix tests
2025-06-08 17:28:10 +02:00
Juro Oravec
09cb8714cc
refactor: don't inherit media if child set to None ( #1224 )
...
* refactor: don't inherit media if child set to None
* refactor: fix typing errors
* refactor: more type fixes
2025-06-02 16:24:27 +02:00
Juro Oravec
8677ee7941
refactor: deprecate template caching, get_template_name, get_template, assoc template with Comp cls ( #1222 )
...
* refactor: deprecate template caching, get_template_name, get_template, assoc template with Comp cls
* refactor: change implementation
* refactor: handle cached template loader
* refactor: fix tests
* refactor: fix test on windows
* refactor: try to fix type errors
* refactor: Re-cast `context` to fix type errors
* refactor: fix linter error
* refactor: fix typing
* refactor: more linter fixes
* refactor: more linter errors
* refactor: revert extra node metadata
2025-06-01 19:20:22 +02:00
Juro Oravec
bae0f28813
refactor: Instantiate component when rendering, and remove metadata stack ( #1212 )
...
* refactor: Instantiate component when rendering, and remove metadata stack
* refactor: update test
* refactor: fix linter errors
* docs: remove example from changelog
2025-05-25 23:33:38 +02:00
Juro Oravec
ccf02fa316
chore: util to manage URLs in the codebase ( #1179 )
...
* chore: util to manage URLs in the codebase
* docs: mentiion validate_links and supported_versions in docs
* refactor: fix linter errors
2025-05-11 14:59:34 +02:00
Juro Oravec
6253042e9e
refactor: remove middleware, add strategy "raw", and call render_deps() from within Template.render() ( #1166 )
...
* refactor: remove middleware, add strategy "raw", and call render_deps() from within Template.render()
* refactor: fix formatting
* refactor: fix benchmark tests
* refactor: avoid processing deps if rendered HTML contains no components
* refactor: remove comments
* refactor: rename "raw" to "ignore"
2025-05-06 21:36:41 +02:00
Juro Oravec
28b61c1609
refactor: Update docs and tests to use get_template_data() ( #1161 )
...
* refactor: update docs and tests to use get_template_data()
* refactor: fix linting
* docs: add note about difference between the two methods
2025-05-03 12:04:10 +02:00
Juro Oravec
59f82307ae
docs: docstrings, fundamentals, and minor changes ( #1145 )
...
* docs: docstrings, fundamentals, and minor changes
* refactor: fix tests + linter errors
2025-04-24 12:47:04 +02:00
Juro Oravec
c650e7f3a5
refactor: prefix component ID with c
( #1127 )
2025-04-14 12:01:16 +02:00
Juro Oravec
9f68f0f1a1
refactor: Fix path resolution relative to COMPONENTS.dirs + add CI test to ensure sampleproject works ( #1075 )
...
* refactor: Fix path resolution relative to COMPONENTS.dirs + add CI test to ensure sampleproject works
* refactor: fix compat with Windows by explicitly using utf8 encoding to read component files
* refactor: add missing components to tests
* docs: update changelog
* refactor: fix formatting
2025-03-31 16:09:37 +02:00
Juro Oravec
42818ad6ff
refactor: fix component media URLs ( #1067 )
...
* refactor: fix component media URLs
* refactor: remove extraneous check and fix tests
* chore: bump v0.134
2025-03-23 22:32:18 +01:00
Juro Oravec
2472c2ad33
refactor: fix use of URLs in Component.Media ( #1064 )
2025-03-23 09:54:24 +01:00
Juro Oravec
ab75cfdb8f
feat: allow globs when specifynigg additionall JS and CSS ( #1043 )
...
* feat: allow globs when specifynigg additionall JS and CSS
* refactor: fix tests and linter errors
2025-03-21 10:23:38 +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
b69c6e6624
feat: replacepython html parser djc-core-html-parser ( #929 )
...
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
2025-01-29 14:24:25 +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
f908197850
feat: @template_tag and refactor how template tags are defined ( #910 )
2025-01-20 22:47:04 +01:00
Juro Oravec
8cd4b03286
feat: Literal dicts and lists part 2 ( #902 )
2025-01-14 09:01:47 +01:00
Juro Oravec
ab037f24b0
feat: add Media.extend ( #890 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-07 22:55:17 +01:00
Juro Oravec
1e4b556b4d
refactor: Assign content of file from Component.template_file to Component.template ( #880 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-01-07 19:34:34 +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
715bf7d447
feat: allow to set main JS and CSS from files + lazy-load component m… ( #870 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-30 18:00:46 +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
Juro Oravec
4dab940db8
feat: Add support for HTML fragments ( #845 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-19 10:03:35 +01:00
Juro Oravec
be27c1c94d
fix: Fix broken JS execution order ( #821 )
...
* fix: fix broken js exec order
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* refactor: remove stale comment
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-06 08:22:27 +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
ee9b92975a
fix: autoimport with nested apps ( #672 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-14 22:47:30 +02:00
Juro Oravec
e1382d3ccd
refactor: Remove safer_staticfiles, replace STATICFILES_DIRS with COMPONENTS.dirs, support [app]/components
( #652 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-11 08:45:55 +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
Juro Oravec
23d91218bd
refactor: usage notes + tests for safer_staticfiles ( #538 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-08 07:25:03 +02:00
Juro Oravec
3c5a7ad823
feat: paths as objects + user-provided Media cls + handle static ( #526 )
...
Co-authored-by: Emil Stenström <emil@emilstenstrom.se>
2024-06-21 19:36:53 +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