From e7a56efe784c07311a0eb70a22fbf2f7b028696c Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:19:18 -0700 Subject: [PATCH 1/5] v1.2.0 --- CHANGELOG.md | 9 ++++++++- src/django_idom/__init__.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 471f872e..2e78f7d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,12 @@ Using the following categories, list your changes in this order: ### Added +- Nothing (Yet) + +## [1.2.0] - 2022-09-19 + +### Added + - `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. @@ -125,7 +131,8 @@ Using the following categories, list your changes in this order: - Support for IDOM within the Django -[unreleased]: https://github.com/idom-team/django-idom/compare/1.0.0...HEAD +[unreleased]: https://github.com/idom-team/django-idom/compare/1.2.0...HEAD +[1.1.0]: https://github.com/idom-team/django-idom/compare/1.1.0...1.2.0 [1.1.0]: https://github.com/idom-team/django-idom/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/idom-team/django-idom/compare/0.0.5...1.0.0 [0.0.5]: https://github.com/idom-team/django-idom/compare/0.0.4...0.0.5 diff --git a/src/django_idom/__init__.py b/src/django_idom/__init__.py index c34467fc..998ab5a6 100644 --- a/src/django_idom/__init__.py +++ b/src/django_idom/__init__.py @@ -3,7 +3,7 @@ from django_idom.websocket.paths import IDOM_WEBSOCKET_PATH -__version__ = "1.1.0" +__version__ = "1.2.0" __all__ = [ "IDOM_WEBSOCKET_PATH", "IdomWebsocket", From 9dc75427e8d6accf95606fdeee295c13bf4c15cf Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:21:05 -0700 Subject: [PATCH 2/5] fix link --- CHANGELOG.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e78f7d0..10dbe2e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,6 @@ Using the following categories, list your changes in this order: ## [Unreleased] -### Added - - Nothing (Yet) ## [1.2.0] - 2022-09-19 @@ -132,7 +130,7 @@ Using the following categories, list your changes in this order: - Support for IDOM within the Django [unreleased]: https://github.com/idom-team/django-idom/compare/1.2.0...HEAD -[1.1.0]: https://github.com/idom-team/django-idom/compare/1.1.0...1.2.0 +[1.2.0]: https://github.com/idom-team/django-idom/compare/1.1.0...1.2.0 [1.1.0]: https://github.com/idom-team/django-idom/compare/1.0.0...1.1.0 [1.0.0]: https://github.com/idom-team/django-idom/compare/0.0.5...1.0.0 [0.0.5]: https://github.com/idom-team/django-idom/compare/0.0.4...0.0.5 From 67e8089e4ad7e59acd1b528c23a3c79e567ebb2e Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:23:04 -0700 Subject: [PATCH 3/5] add changelog entry for removing selenium --- CHANGELOG.md | 1 + docs/src/contribute/django-idom.md | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10dbe2e5..894a1390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ Using the following categories, list your changes in this order: ### Changed - Bumped the minimum IDOM version to 0.40.2 +- Testing suite now uses `playwright` instead of `selenium` ### Fixed diff --git a/docs/src/contribute/django-idom.md b/docs/src/contribute/django-idom.md index 6199d4f8..3f3d7aee 100644 --- a/docs/src/contribute/django-idom.md +++ b/docs/src/contribute/django-idom.md @@ -7,7 +7,6 @@ If you plan to make code changes to this repository, you'll need to install the - [Python 3.8+](https://www.python.org/downloads/) - [Git](https://git-scm.com/downloads) - [NPM](https://docs.npmjs.com/try-the-latest-stable-version-of-npm) for installing and managing Javascript -- [ChromeDriver](https://chromedriver.chromium.org/downloads) for testing with [Selenium](https://www.seleniumhq.org/) Once done, you should clone this repository: From 30c7887bac9ff2a9d21f10923161313239c0c871 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:30:49 -0700 Subject: [PATCH 4/5] clean up compatibility docstring --- docs/src/features/components.md | 4 ++-- src/django_idom/components.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/features/components.md b/docs/src/features/components.md index cc8d9bf4..49ee122d 100644 --- a/docs/src/features/components.md +++ b/docs/src/features/components.md @@ -27,10 +27,10 @@ Convert any Django view into a IDOM component by usng this decorator. Compatible | Name | Type | Description | Default | | --- | --- | --- | --- | | view | `Callable | View` | The view function or class to convert. | N/A | - | compatibility | `bool` | If True, the component will be rendered in an iframe. Strict parsing does not apply to compatibility mode. | `False` | + | compatibility | `bool` | If True, the component will be rendered in an iframe. When using compatibility mode `tranforms`, `strict_parsing`, and `request` arguments will be ignored. | `False` | | transforms | `Iterable[Callable[[VdomDict], Any]]` | A list of functions that transforms the newly generated VDOM. The functions will be called on each VDOM node. | `tuple` | | strict_parsing | `bool` | If True, an exception will be generated if the HTML does not perfectly adhere to HTML5. | `True` | - | request | `HttpRequest | None` | Request object to provide to the view. Custom request objects cannot be used in compatibility mode. | `None` | + | request | `HttpRequest | None` | Request object to provide to the view. | `None` | | args | `Iterable` | The positional arguments to pass to the view. | `tuple` | | kwargs | `Dict | None` | The keyword arguments to pass to the view. | `None` | diff --git a/src/django_idom/components.py b/src/django_idom/components.py index 9c5aae6c..34ce359c 100644 --- a/src/django_idom/components.py +++ b/src/django_idom/components.py @@ -36,13 +36,13 @@ def view_to_component( Keyword Args: compatibility: If True, the component will be rendered in an iframe. - Strict parsing does not apply to compatibility mode. + When using compatibility mode `tranforms`, `strict_parsing`, and `request` + arguments will be ignored. transforms: A list of functions that transforms the newly generated VDOM. The functions will be called on each VDOM node. strict_parsing: If True, an exception will be generated if the HTML does not perfectly adhere to HTML5. request: Request object to provide to the view. - Custom request objects cannot be used in compatibility mode. args: The positional arguments to pass to the view. kwargs: The keyword arguments to pass to the view. """ From 85cf3a28686c6138be6a60499c9e6aa5c3d79d39 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 20:33:39 -0700 Subject: [PATCH 5/5] consistency in verbiage --- docs/src/features/components.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/features/components.md b/docs/src/features/components.md index 49ee122d..8d95c062 100644 --- a/docs/src/features/components.md +++ b/docs/src/features/components.md @@ -93,7 +93,7 @@ Convert any Django view into a IDOM component by usng this decorator. Compatible For views that rely on HTTP responses other than `GET` (such as `PUT`, `POST`, `PATCH`, etc), you should consider using compatibility mode to render your view within an iframe. - Any view can be rendered within compatibility mode. However, the `strict_parsing` argument does not apply to compatibility mode. + Any view can be rendered within compatibility mode. However, the `transforms`, `strict_parsing`, and `request` arguments do not apply to compatibility mode. Please note that by default the iframe is unstyled, and thus won't look pretty until you add some CSS.