diff --git a/CHANGELOG.md b/CHANGELOG.md index 53609f21..4e63f124 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,90 +21,94 @@ Don't forget to remove deprecated code on each major release! ### Changed -- Updated the interface for `reactpy.hooks.use_channel_layer` to be more intuitive. - - Arguments now must be provided as keyworded arguments. - - The `name` argument has been renamed to `channel`. - - The `group_name` argument has been renamed to `group`. - - The `group_add` and `group_discard` arguments have been removed for simplicity. -- To improve performance, `preact` is now used as the default client-side library instead of `react`. +- Updated the interface for `reactpy.hooks.use_channel_layer` to be more intuitive. + - Arguments now must be provided as keyworded arguments. + - The `name` argument has been renamed to `channel`. + - The `group_name` argument has been renamed to `group`. + - The `group_add` and `group_discard` arguments have been removed for simplicity. +- To improve performance, `preact` is now used as the default client-side library instead of `react`. + +### Removed + +- Removed `reactpy_django.components.pyscript_component`. Use `reactpy.executors.pyscript.pyscript_component` instead. ### [5.2.1] - 2025-01-10 ### Changed -- Use the latest version of `@reactpy/client` which includes a fix for needless client-side component re-creation. +- Use the latest version of `@reactpy/client` which includes a fix for needless client-side component re-creation. ### [5.2.0] - 2024-12-29 ### Added -- User login/logout features! - - `reactpy_django.hooks.use_auth` to provide **persistent** `login` and `logout` functionality to your components. - - `settings.py:REACTPY_AUTH_TOKEN_MAX_AGE` to control the maximum seconds before ReactPy's login token expires. - - `settings.py:REACTPY_CLEAN_AUTH_TOKENS` to control whether ReactPy should clean up expired authentication tokens during automatic cleanups. -- Automatically convert Django forms to ReactPy forms via the new `reactpy_django.components.django_form` component! -- The ReactPy component tree can now be forcibly re-rendered via the new `reactpy_django.hooks.use_rerender` hook. +- User login/logout features! + - `reactpy_django.hooks.use_auth` to provide **persistent** `login` and `logout` functionality to your components. + - `settings.py:REACTPY_AUTH_TOKEN_MAX_AGE` to control the maximum seconds before ReactPy's login token expires. + - `settings.py:REACTPY_CLEAN_AUTH_TOKENS` to control whether ReactPy should clean up expired authentication tokens during automatic cleanups. +- Automatically convert Django forms to ReactPy forms via the new `reactpy_django.components.django_form` component! +- The ReactPy component tree can now be forcibly re-rendered via the new `reactpy_django.hooks.use_rerender` hook. ### Changed -- Refactoring of internal code to improve maintainability. No changes to publicly documented API. +- Refactoring of internal code to improve maintainability. No changes to publicly documented API. ### Fixed -- Fixed bug where pre-rendered components could generate a `SynchronousOnlyOperation` exception if they access a freshly logged out Django user object. +- Fixed bug where pre-rendered components could generate a `SynchronousOnlyOperation` exception if they access a freshly logged out Django user object. ## [5.1.1] - 2024-12-02 ### Fixed -- Fixed regression from the previous release where components would sometimes not output debug messages when `settings.py:DEBUG` is enabled. +- Fixed regression from the previous release where components would sometimes not output debug messages when `settings.py:DEBUG` is enabled. ### Changed -- Set upper limit on ReactPy version to `<2.0.0`. -- ReactPy web modules are now streamed in chunks. -- ReactPy web modules are now streamed using asynchronous file reading to improve performance. -- Performed refactoring to utilize `ruff` as this repository's linter. +- Set upper limit on ReactPy version to `<2.0.0`. +- ReactPy web modules are now streamed in chunks. +- ReactPy web modules are now streamed using asynchronous file reading to improve performance. +- Performed refactoring to utilize `ruff` as this repository's linter. ## [5.1.0] - 2024-11-24 ### Added -- `settings.py:REACTPY_ASYNC_RENDERING` to enable asynchronous rendering of components. +- `settings.py:REACTPY_ASYNC_RENDERING` to enable asynchronous rendering of components. ### Changed -- Bumped the minimum ReactPy version to `1.1.0`. +- Bumped the minimum ReactPy version to `1.1.0`. ## [5.0.0] - 2024-10-22 ### Changed -- Now using ReactPy-Router v1 for URL routing, which comes with a slightly different API than before. -- Removed dependency on `aiofile`. +- Now using ReactPy-Router v1 for URL routing, which comes with a slightly different API than before. +- Removed dependency on `aiofile`. ### Removed -- Removed the following **deprecated** features: - - The `compatibility` argument on `reactpy_django.components.view_to_component` - - `reactpy_django.components.view_to_component` **usage as a decorator** - - `reactpy_django.decorators.auth_required` - - `reactpy_django.REACTPY_WEBSOCKET_PATH` - - `settings.py:REACTPY_WEBSOCKET_URL` +- Removed the following **deprecated** features: + - The `compatibility` argument on `reactpy_django.components.view_to_component` + - `reactpy_django.components.view_to_component` **usage as a decorator** + - `reactpy_django.decorators.auth_required` + - `reactpy_django.REACTPY_WEBSOCKET_PATH` + - `settings.py:REACTPY_WEBSOCKET_URL` ## [4.0.0] - 2024-06-22 ### Added -- Client-side Python components can now be rendered via the new `{% pyscript_component %}` template tag - - You must first call the `{% pyscript_setup %}` template tag to load PyScript dependencies -- Client-side components can be embedded into existing server-side components via `reactpy_django.components.pyscript_component`. -- Tired of writing JavaScript? You can now write PyScript code that runs directly within client browser via the `reactpy_django.html.pyscript` element. - - This is a viable substitution for most JavaScript code. +- Client-side Python components can now be rendered via the new `{% pyscript_component %}` template tag + - You must first call the `{% pyscript_setup %}` template tag to load PyScript dependencies +- Client-side components can be embedded into existing server-side components via `reactpy_django.components.pyscript_component`. +- Tired of writing JavaScript? You can now write PyScript code that runs directly within client browser via the `reactpy_django.html.pyscript` element. + - This is a viable substitution for most JavaScript code. ### Changed -- New syntax for `use_query` and `use_mutation` hooks. Here's a quick comparison of the changes: +- New syntax for `use_query` and `use_mutation` hooks. Here's a quick comparison of the changes: ```python query = use_query(QueryOptions(thread_sensitive=True), get_items, foo="bar") # Old @@ -116,110 +120,110 @@ Don't forget to remove deprecated code on each major release! ### Removed -- `QueryOptions` and `MutationOptions` have been removed. The value contained within these objects are now passed directly into the hook. +- `QueryOptions` and `MutationOptions` have been removed. The value contained within these objects are now passed directly into the hook. ### Fixed -- Resolved a bug where Django-ReactPy would not properly detect `settings.py:DEBUG`. +- Resolved a bug where Django-ReactPy would not properly detect `settings.py:DEBUG`. ## [3.8.1] - 2024-05-07 ### Added -- Python 3.12 compatibility +- Python 3.12 compatibility ## [3.8.0] - 2024-02-20 ### Added -- Built-in cross-process communication mechanism via the `reactpy_django.hooks.use_channel_layer` hook. -- Access to the root component's `id` via the `reactpy_django.hooks.use_root_id` hook. -- More robust control over ReactPy clean up tasks! - - `settings.py:REACTPY_CLEAN_INTERVAL` to control how often ReactPy automatically performs cleaning tasks. - - `settings.py:REACTPY_CLEAN_SESSIONS` to control whether ReactPy should clean up expired sessions during automatic cleanups. - - `settings.py:REACTPY_CLEAN_USER_DATA` to control whether ReactPy should clean up orphaned user data during automatic cleanups. - - `python manage.py clean_reactpy` command to manually perform ReactPy clean up tasks. +- Built-in cross-process communication mechanism via the `reactpy_django.hooks.use_channel_layer` hook. +- Access to the root component's `id` via the `reactpy_django.hooks.use_root_id` hook. +- More robust control over ReactPy clean up tasks! + - `settings.py:REACTPY_CLEAN_INTERVAL` to control how often ReactPy automatically performs cleaning tasks. + - `settings.py:REACTPY_CLEAN_SESSIONS` to control whether ReactPy should clean up expired sessions during automatic cleanups. + - `settings.py:REACTPY_CLEAN_USER_DATA` to control whether ReactPy should clean up orphaned user data during automatic cleanups. + - `python manage.py clean_reactpy` command to manually perform ReactPy clean up tasks. ### Changed -- Simplified code for cascading deletion of user data. +- Simplified code for cascading deletion of user data. ## [3.7.0] - 2024-01-30 ### Added -- An "offline component" can now be displayed when the client disconnects from the server. -- URL router now supports a `*` wildcard to create default routes. +- An "offline component" can now be displayed when the client disconnects from the server. +- URL router now supports a `*` wildcard to create default routes. ## [3.6.0] - 2024-01-10 ### Added -- Built-in Single Page Application (SPA) support! - - `reactpy_django.router.django_router` can be used to render your Django application as a SPA. -- SEO compatible rendering! - - `settings.py:REACTPY_PRERENDER` can be set to `True` to make components pre-render by default. - - Or, you can enable it on individual components via the template tag: `{% component "..." prerender="True" %}`. -- New `view_to_iframe` feature! - - `reactpy_django.components.view_to_iframe` uses an `