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
c650e7f3a5
refactor: prefix component ID with c
( #1127 )
2025-04-14 12:01:16 +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
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
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
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
3b1f6088a0
feat: allow different template settings for ComponentRegistries ( #615 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-27 06:18:50 +02:00
Juro Oravec
71d8679e8d
feat: TagFormatter - Allow users to customize component template tags ( #572 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-18 16:58:56 +02:00
Juro Oravec
d6dec450ed
refactor: prepare registry for custom template tags and docs ( #566 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-05 22:31:49 +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
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
91b4accfeb
Render components as views ( #366 ) (thanks @dylanjcastillo)
2024-01-24 22:36:57 +01: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
Emil Stenström
c0c5a94908
Rename duplicate ComponentRegistryTest.
...
Also move registry test to registry.
2021-03-10 12:25:28 +01:00
Emil Stenström
07986c5216
Caching templates to allow for dynamic template generation
...
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
2021-02-15 21:07:14 +01:00
rbeard0330
2633c3f08f
Pass context into component tags by default, and let components disable with "only" ( #20 )
...
Co-authored-by: rbeard0330 <@dul2k3BKW6m>
2021-01-25 12:31:54 +01:00
Emil Stenström
b2726a6832
Contain all registry logic in helper methods.
2020-06-06 09:07:23 +02:00
Emil Stenström
40ebd6b936
Install isort and fix all imports.
2019-11-24 11:09:14 +01:00
Ryan Hiebert
f219370be2
Use dictionary to compare registry
...
The registry is a dictionary, so comparing items() has a couple of
problems:
1. The order of a dictionary is unstable, so it may not turn out as
expected.
2. items() returns a list in Python 2, but a dict_items in Python 3,
which makes the comparison fail.
2015-06-13 13:42:27 -05:00
Emil Stenström
ebf4ac1d20
Add way to unregister components.
2015-06-11 20:52:46 +02:00
Emil Stenström
00bd40aaaf
Don't allow registering the same component twice.
2015-06-11 20:47:35 +02:00
Emil Stenström
313852ce21
A simple ComponentRegistry to store components.
2015-06-11 20:42:16 +02:00