Skip to content

View to Component #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 118 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
51a473a
functional static_css implementation
Archmonger Jun 23, 2022
b1a2bcf
Bump Django IDOM version
Archmonger Jun 23, 2022
6b82359
format components.py
Archmonger Jun 23, 2022
551b6f1
rudimentary docs
Archmonger Jun 23, 2022
d5b0d9c
fix docstring
Archmonger Jun 23, 2022
11b3e42
clean up readme
Archmonger Jun 23, 2022
e9339fa
static_js
Archmonger Jun 23, 2022
836fe71
minor docs styling tweaks
Archmonger Jun 23, 2022
0ee9402
Update docs/features/components.md
Archmonger Jun 23, 2022
a19508f
Merge branch 'static-css' of https://github.com/Archmonger/django-ido…
Archmonger Jun 23, 2022
4cc86aa
flesh out the docs
Archmonger Jun 23, 2022
526bc8f
simplify _cached_static_contents
Archmonger Jun 23, 2022
6b0dfb8
add static js to changelog
Archmonger Jun 23, 2022
70d78fc
clean up changelog entry
Archmonger Jun 23, 2022
0ffb5a5
Selenium 4.3 compatibility
Archmonger Jun 23, 2022
6cc9ded
add title to readme example
Archmonger Jun 23, 2022
7733243
pin selenium to older version 4.2
Archmonger Jun 23, 2022
568a49e
Revert "Selenium 4.3 compatibility"
Archmonger Jun 23, 2022
5f981a0
add new tests
Archmonger Jun 24, 2022
f9aa39f
fix tests
Archmonger Jun 24, 2022
aa55ad7
docs cleanup
Archmonger Jun 24, 2022
fa11504
Create PR template
Archmonger Jun 24, 2022
03ac980
bump the minimum idom version
Archmonger Jun 24, 2022
7095f64
update issue form
Archmonger Jun 26, 2022
bdb3431
minor readme wordsmithing
Archmonger Jun 26, 2022
7ea6306
docstring for component template tag
Archmonger Jun 26, 2022
2de0dee
use PascalCase for component names
Archmonger Jun 28, 2022
1db08a5
Fix formatting
Archmonger Jun 28, 2022
93debb7
Quick draft of view_to_component
Archmonger Jun 28, 2022
bb8ea09
functional compatibility mode
Archmonger Jun 28, 2022
e53c15d
functional standard view to component
Archmonger Jun 28, 2022
86318e5
class view to component
Archmonger Jun 29, 2022
1e26dfa
fix HR on JS test
Archmonger Jun 29, 2022
24de08e
Merge branch 'static-css' into view-to-component
Archmonger Jun 29, 2022
823600e
add ID to compat
Archmonger Jun 29, 2022
fa8efd3
type hinting cleanup
Archmonger Jun 29, 2022
1cdc5c2
ViewToComponentAsync
Archmonger Jun 29, 2022
643940e
ViewToComponentMiddleware
Archmonger Jun 29, 2022
6833008
fix flake8 warning
Archmonger Jun 29, 2022
5371b24
format tests folder
Archmonger Jun 29, 2022
a2cd686
ViewToComponentScript
Archmonger Jun 29, 2022
1dda52d
swap pipe operator with union
Archmonger Jun 29, 2022
ada489c
swap list with typing.List
Archmonger Jun 29, 2022
3aca137
minor refactoring
Archmonger Jun 29, 2022
df6202b
Add todos
Archmonger Jun 29, 2022
b1bf561
format
Archmonger Jun 29, 2022
a245b86
fix spacing
Archmonger Jun 30, 2022
379bb29
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Jul 1, 2022
1f32edc
docstring changes
Archmonger Jul 2, 2022
68ce85e
type hint fixes
Archmonger Jul 4, 2022
18b946b
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Jul 4, 2022
7612466
clean up learn more section
Archmonger Jul 4, 2022
3fa65ae
fix class based views
Archmonger Aug 2, 2022
1b8b1e3
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Aug 14, 2022
49b928f
bump idom
Archmonger Aug 14, 2022
5d882e2
add fixme
Archmonger Aug 14, 2022
848c51d
simplify if expression
Archmonger Aug 14, 2022
0796d4f
Py 3.8 compatibility
Archmonger Aug 14, 2022
7be948f
comments
Archmonger Aug 14, 2022
b249fe2
major view to component refactoring
Archmonger Aug 15, 2022
bd5ae3f
more refactoring
Archmonger Aug 15, 2022
6631221
support django 4.1 async CBC
Archmonger Aug 15, 2022
952f772
fleshed out compatibility mode
Archmonger Aug 15, 2022
60684c0
move view_to_component()
Archmonger Aug 15, 2022
446e65e
move docs to src folder
Archmonger Aug 15, 2022
97503ca
first cut at docs
Archmonger Aug 15, 2022
eb1ef6f
always re-register iframe, incase args/kwargs change
Archmonger Aug 15, 2022
22a16fe
clean up Render Check 5: Sync function view
Archmonger Aug 16, 2022
7b915df
submit args/kwargs to compatibility view
Archmonger Aug 16, 2022
956f390
docstring cleanup
Archmonger Aug 16, 2022
4747d7a
remove x frame options decorator
Archmonger Aug 18, 2022
60aaafe
cleanup old code
Archmonger Aug 30, 2022
c894d34
bump idom version
Archmonger Sep 12, 2022
95872ac
clean up tests
Archmonger Sep 12, 2022
4531a5a
fix cache type hints
Archmonger Sep 12, 2022
941b508
add type: ignore for some instances
Archmonger Sep 12, 2022
728bcc4
reorganize utils.py to reduce deltas
Archmonger Sep 12, 2022
664f79e
remove delete scope
Archmonger Sep 12, 2022
f9117cd
use playwright for tests
Archmonger Sep 13, 2022
cd74403
revert changes to idom.py
Archmonger Sep 13, 2022
89786f7
fix tests
Archmonger Sep 13, 2022
c4e63f1
try removing transaction testcase
Archmonger Sep 13, 2022
44815c1
clean up
Archmonger Sep 13, 2022
998e632
tests for view_to_component
Archmonger Sep 13, 2022
5d039ad
remove unneeded movement of import
Archmonger Sep 13, 2022
b41d337
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Sep 13, 2022
6833e91
fix mypy warnings at the cost of adding more pylance warnings
Archmonger Sep 13, 2022
7c38880
remove duplicate todo
Archmonger Sep 13, 2022
213eb72
Add interface docs for View to Component
Archmonger Sep 13, 2022
d58be7c
add transforms variable
Archmonger Sep 13, 2022
edc1839
transforms arg docs
Archmonger Sep 13, 2022
95065ec
remove tests from mypy
Archmonger Sep 13, 2022
9597d94
bump idom version
Archmonger Sep 14, 2022
4bbdf64
fix hooks link
Archmonger Sep 14, 2022
1b1982d
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Sep 15, 2022
65a5310
Add changelog entry
Archmonger Sep 15, 2022
11afed2
use __future__ annotations
Archmonger Sep 15, 2022
76348c4
sourcery refactoring
Archmonger Sep 15, 2022
fe4c597
formatting
Archmonger Sep 15, 2022
649e7b7
reduce LOC changes
Archmonger Sep 15, 2022
80cbcb9
add changelog entry for bumping IDOM version
Archmonger Sep 15, 2022
5a4a5f4
address review comments on `view_to_component`
Archmonger Sep 15, 2022
6eb9ae7
insert file newline
Archmonger Sep 15, 2022
711b0fd
address more comments
Archmonger Sep 15, 2022
f336819
no need for `or None`
Archmonger Sep 15, 2022
4536262
use serialized request/args/kwargs as async_renderer dependencies
Archmonger Sep 15, 2022
52cc4c8
Makes a best effort to create a name for an object
Archmonger Sep 15, 2022
f30f891
move compatibility render into async_renderer hook
Archmonger Sep 15, 2022
4a43326
fix mypy warning
Archmonger Sep 15, 2022
5f89a12
variable renaming
Archmonger Sep 15, 2022
3b22052
move _generate_obj_name to components.py
Archmonger Sep 16, 2022
83527d2
formatting
Archmonger Sep 16, 2022
56d501a
add tests for request, args, and kwargs
Archmonger Sep 16, 2022
ef2f6c7
Merge remote-tracking branch 'upstream/main' into view-to-component
Archmonger Sep 19, 2022
5d56bd4
fix changelog grammer
Archmonger Sep 19, 2022
a2ac025
deterministic buttons for some tests
Archmonger Sep 19, 2022
85eb888
fix tests
Archmonger Sep 19, 2022
ed104c4
remove unused import
Archmonger Sep 19, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ Using the following categories, list your changes in this order:

### Added

- `auth_required` decorator to prevent your components from rendered to unauthenticated users.
- `auth_required` decorator to prevent your components from rendering to unauthenticated users.
- `use_query` hook for fetching database values.
- `use_mutation` hook for modifying database values.
- `view_to_component` utility to convert legacy Django views to IDOM components.

### Changed

- Bumped the minimum IDOM version to 0.40.2

### Fixed

Expand Down
11 changes: 0 additions & 11 deletions docs/changelog/index.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/contribute/running-tests.md

This file was deleted.

121 changes: 0 additions & 121 deletions docs/features/components.md

This file was deleted.

11 changes: 0 additions & 11 deletions docs/getting-started/learn-more.md

This file was deleted.

23 changes: 23 additions & 0 deletions docs/includes/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--hello-world-view-start-->

```python
from django.http import HttpResponse

def hello_world_view(request, *args, **kwargs):
return HttpResponse("Hello World!")
```

<!--hello-world-view-end-->

<!--hello-world-cbv-start-->

```python
from django.http import HttpResponse
from django.views import View

class HelloWorldView(View):
def get(self, request, *args, **kwargs):
return HttpResponse("Hello World!")
```

<!--hello-world-cbv-end-->
17 changes: 0 additions & 17 deletions docs/index.md

This file was deleted.

11 changes: 11 additions & 0 deletions docs/src/changelog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
hide:
- navigation
- toc
---

!!! note "Attribution"

{% include-markdown "../../../CHANGELOG.md" start="<!--attr-start-->" end="<!--attr-end-->" %}

{% include-markdown "../../../CHANGELOG.md" start="<!--changelog-start-->" %}
File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions docs/src/contribute/running-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This repo uses [Nox](https://nox.thea.codes/en/stable/) to run scripts which can be found in `noxfile.py`. For a full test of available scripts run `nox -l`. To run the full test suite simple execute:

```
nox -s test
```

If you do not want to run the tests in the background:

```
nox -s test -- --headed
```

!!! warning "Most tests will not run on Windows"

Due to [bugs within Django Channels](https://github.com/django/channels/issues/1207), functional tests are not run on Windows. In order for Windows users to test Django-IDOM functionality, you will need to run tests via [Windows Subsystem for Linux](https://code.visualstudio.com/docs/remote/wsl).
Loading