From 78823ee501b466b7bac35b3f067b3d9806e9bdbc Mon Sep 17 00:00:00 2001 From: Mark <16909269+Archmonger@users.noreply.github.com> Date: Mon, 19 Sep 2022 22:12:41 -0700 Subject: [PATCH] v1.2.0 (#97) --- CHANGELOG.md | 8 +++++++- docs/src/contribute/django-idom.md | 1 - docs/src/features/components.md | 6 +++--- src/django_idom/__init__.py | 2 +- src/django_idom/components.py | 4 ++-- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 471f872e..894a1390 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ Using the following categories, list your changes in this order: ## [Unreleased] +- Nothing (Yet) + +## [1.2.0] - 2022-09-19 + ### Added - `auth_required` decorator to prevent your components from rendering to unauthenticated users. @@ -32,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 @@ -125,7 +130,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.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 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: diff --git a/docs/src/features/components.md b/docs/src/features/components.md index cc8d9bf4..8d95c062 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` | @@ -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. 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", 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. """