Skip to content

Commit 709f94a

Browse files
committed
Release v2.2.0: nowo-password-toggle custom element
1 parent 4ad4487 commit 709f94a

5 files changed

Lines changed: 60 additions & 2 deletions

File tree

demo/symfony8-php85/config/reference.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@
707707
* id?: scalar|Param|null,
708708
* type?: scalar|Param|null,
709709
* value?: mixed,
710+
* ...<string, mixed>
710711
* }>,
711712
* autoescape_service?: scalar|Param|null, // Default: null
712713
* autoescape_service_method?: scalar|Param|null, // Default: null
@@ -795,6 +796,7 @@
795796
* iconify?: bool|array{ // Configuration for the remote icon service.
796797
* enabled?: bool|Param, // Default: true
797798
* on_demand?: bool|Param, // Whether to download icons "on demand". // Default: true
799+
* auto_lock?: bool|Param, // Persist "on demand" icons to the local icon directory (see "icon_dir"). Recommended in dev only. Requires "on_demand" to be enabled. // Default: false
798800
* endpoint?: scalar|Param|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design"
799801
* },
800802
* ignore_not_found?: bool|Param, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false
@@ -820,6 +822,21 @@
820822
* trim?: bool|Param, // Trim whitespace (default) // Default: false
821823
* invalid_message?: scalar|Param|null, // Invalid message (default) // Default: "The password is invalid."
822824
* }
825+
* @psalm-type NowoHotReloadConfig = array{
826+
* enabled?: bool|Param, // Master switch. When false, nothing is injected even if FRANKENPHP_HOT_RELOAD is set. // Default: true
827+
* auto_inject?: bool|Param, // When true, HotReloadResponseSubscriber injects assets into HTML responses. // Default: true
828+
* require_frankenphp_env?: bool|Param, // When true (default), inject only if FRANKENPHP_HOT_RELOAD is set or mercure_url is configured. // Default: true
829+
* allow_production?: bool|Param, // When false (default), enabling this bundle in the prod environment raises InvalidConfigurationException. // Default: false
830+
* mercure_url?: scalar|Param|null, // Optional Mercure hub URL. When null, uses $_SERVER['FRANKENPHP_HOT_RELOAD'] when present. // Default: null
831+
* idiomorph?: bool|Param, // When true, include Idiomorph for DOM morphing instead of a full page reload. // Default: true
832+
* idiomorph_script_url?: scalar|Param|null, // URL of the Idiomorph script (classic script tag). Prefer a version-pinned CDN URL. // Default: "https://cdn.jsdelivr.net/npm/idiomorph@0.7.4"
833+
* hot_reload_script_url?: scalar|Param|null, // URL of the frankenphp-hot-reload ESM module. Prefer a version-pinned CDN URL. // Default: "https://cdn.jsdelivr.net/npm/frankenphp-hot-reload@1.0.1/+esm"
834+
* preserve_selectors?: list<scalar|Param|null>,
835+
* preserve_observe?: bool|Param, // When true, the preserve boot script also uses MutationObserver for late-injected toolbar nodes. // Default: true
836+
* csp_nonce_request_attribute?: scalar|Param|null, // Request attribute name that holds the CSP nonce (e.g. "_csp_nonce"). Applied to the inline preserve boot script. // Default: null
837+
* csp_augment_script_src?: bool|Param, // When true, append CDN hosts to an existing Content-Security-Policy script-src on the response after injection. // Default: true
838+
* csp_script_src_hosts?: list<scalar|Param|null>,
839+
* }
823840
* @psalm-type NowoTwigInspectorConfig = array{
824841
* enabled_extensions?: list<scalar|Param|null>,
825842
* excluded_templates?: list<scalar|Param|null>,
@@ -854,6 +871,7 @@
854871
* ux_icons?: UxIconsConfig,
855872
* web_profiler?: WebProfilerConfig,
856873
* nowo_password_toggle?: NowoPasswordToggleConfig,
874+
* nowo_hot_reload?: NowoHotReloadConfig,
857875
* nowo_twig_inspector?: NowoTwigInspectorConfig,
858876
* debug?: DebugConfig,
859877
* },
@@ -877,6 +895,7 @@
877895
* ux_icons?: UxIconsConfig,
878896
* web_profiler?: WebProfilerConfig,
879897
* nowo_password_toggle?: NowoPasswordToggleConfig,
898+
* nowo_hot_reload?: NowoHotReloadConfig,
880899
* nowo_twig_inspector?: NowoTwigInspectorConfig,
881900
* },
882901
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias

demo/symfony8/config/reference.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@
707707
* id?: scalar|Param|null,
708708
* type?: scalar|Param|null,
709709
* value?: mixed,
710+
* ...<string, mixed>
710711
* }>,
711712
* autoescape_service?: scalar|Param|null, // Default: null
712713
* autoescape_service_method?: scalar|Param|null, // Default: null
@@ -795,6 +796,7 @@
795796
* iconify?: bool|array{ // Configuration for the remote icon service.
796797
* enabled?: bool|Param, // Default: true
797798
* on_demand?: bool|Param, // Whether to download icons "on demand". // Default: true
799+
* auto_lock?: bool|Param, // Persist "on demand" icons to the local icon directory (see "icon_dir"). Recommended in dev only. Requires "on_demand" to be enabled. // Default: false
798800
* endpoint?: scalar|Param|null, // The endpoint for the Iconify icons API. // Default: "https://api.iconify.design"
799801
* },
800802
* ignore_not_found?: bool|Param, // Ignore error when an icon is not found. Set to 'true' to fail silently. // Default: false
@@ -820,6 +822,21 @@
820822
* trim?: bool|Param, // Trim whitespace (default) // Default: false
821823
* invalid_message?: scalar|Param|null, // Invalid message (default) // Default: "The password is invalid."
822824
* }
825+
* @psalm-type NowoHotReloadConfig = array{
826+
* enabled?: bool|Param, // Master switch. When false, nothing is injected even if FRANKENPHP_HOT_RELOAD is set. // Default: true
827+
* auto_inject?: bool|Param, // When true, HotReloadResponseSubscriber injects assets into HTML responses. // Default: true
828+
* require_frankenphp_env?: bool|Param, // When true (default), inject only if FRANKENPHP_HOT_RELOAD is set or mercure_url is configured. // Default: true
829+
* allow_production?: bool|Param, // When false (default), enabling this bundle in the prod environment raises InvalidConfigurationException. // Default: false
830+
* mercure_url?: scalar|Param|null, // Optional Mercure hub URL. When null, uses $_SERVER['FRANKENPHP_HOT_RELOAD'] when present. // Default: null
831+
* idiomorph?: bool|Param, // When true, include Idiomorph for DOM morphing instead of a full page reload. // Default: true
832+
* idiomorph_script_url?: scalar|Param|null, // URL of the Idiomorph script (classic script tag). Prefer a version-pinned CDN URL. // Default: "https://cdn.jsdelivr.net/npm/idiomorph@0.7.4"
833+
* hot_reload_script_url?: scalar|Param|null, // URL of the frankenphp-hot-reload ESM module. Prefer a version-pinned CDN URL. // Default: "https://cdn.jsdelivr.net/npm/frankenphp-hot-reload@1.0.1/+esm"
834+
* preserve_selectors?: list<scalar|Param|null>,
835+
* preserve_observe?: bool|Param, // When true, the preserve boot script also uses MutationObserver for late-injected toolbar nodes. // Default: true
836+
* csp_nonce_request_attribute?: scalar|Param|null, // Request attribute name that holds the CSP nonce (e.g. "_csp_nonce"). Applied to the inline preserve boot script. // Default: null
837+
* csp_augment_script_src?: bool|Param, // When true, append CDN hosts to an existing Content-Security-Policy script-src on the response after injection. // Default: true
838+
* csp_script_src_hosts?: list<scalar|Param|null>,
839+
* }
823840
* @psalm-type NowoTwigInspectorConfig = array{
824841
* enabled_extensions?: list<scalar|Param|null>,
825842
* excluded_templates?: list<scalar|Param|null>,
@@ -854,6 +871,7 @@
854871
* ux_icons?: UxIconsConfig,
855872
* web_profiler?: WebProfilerConfig,
856873
* nowo_password_toggle?: NowoPasswordToggleConfig,
874+
* nowo_hot_reload?: NowoHotReloadConfig,
857875
* nowo_twig_inspector?: NowoTwigInspectorConfig,
858876
* debug?: DebugConfig,
859877
* },
@@ -877,6 +895,7 @@
877895
* ux_icons?: UxIconsConfig,
878896
* web_profiler?: WebProfilerConfig,
879897
* nowo_password_toggle?: NowoPasswordToggleConfig,
898+
* nowo_hot_reload?: NowoHotReloadConfig,
880899
* nowo_twig_inspector?: NowoTwigInspectorConfig,
881900
* },
882901
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias

docs/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## Table of contents
99

1010
- [[Unreleased]](#unreleased)
11+
- [[2.2.0] - 2026-09-03](#220---2026-09-03)
1112
- [[2.1.3] - 2026-08-19](#213---2026-08-19)
1213
- [[2.1.2] - 2026-08-18](#212---2026-08-18)
1314
- [[2.1.1] - 2026-08-12](#211---2026-08-12)
@@ -35,10 +36,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3536

3637
## [Unreleased]
3738

39+
## [2.2.0] - 2026-09-03
40+
3841
### Changed
3942

4043
- **Web Component:** the widget renders `<nowo-password-toggle>` and loads `js/nowo-password-toggle.js` (CSP-safe; no inline `onclick` / `onkeydown`). Event delegation on the host remains compatible with Live Components.
44+
- **Deps (dev):** bump `rector/rector`, `friendsofphp/php-cs-fixer`; refresh Composer lockfiles.
45+
46+
### Notes
47+
48+
- Run `assets:install`. Custom theme overrides must remove inline handlers and wrap the input group in `<nowo-password-toggle>`.
4149

50+
[2.2.0]: https://github.com/nowo-tech/PasswordToggleBundle/releases/tag/v2.2.0
4251

4352
## [2.1.4] - 2026-08-24
4453

docs/UPGRADING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,19 @@
22

33
## Table of contents
44

5-
- [Unreleased](#unreleased)
5+
- [From 2.1.4 to 2.2.0](#from-214-to-220)
66
- [From 2.1.3 to 2.1.4](#from-213-to-214)
77

8-
## Unreleased
8+
9+
## From 2.1.4 to 2.2.0
910

1011
The default widget is now `<nowo-password-toggle>` plus `js/nowo-password-toggle.js` (loaded once per request). Run `php bin/console assets:install`. If you copied `toggle_password_widget.html.twig`, remove inline `onclick` / `onkeydown` and wrap the input group in `<nowo-password-toggle>` (see the bundle template). Strict `script-src` hosts no longer need `'unsafe-inline'` for the toggle.
1112

13+
```bash
14+
composer update nowo-tech/password-toggle-bundle
15+
php bin/console assets:install
16+
```
17+
1218
## From 2.1.3 to 2.1.4
1319

1420
No breaking changes. **No application upgrade steps.**

specs/001-baseline/spec.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717

1818
Symfony `PasswordType` form field with **show/hide** toggle using inline JavaScript (Live Component safe), optional Symfony UX Icons, configurable CSS classes, and ARIA labels.
1919

20+
21+
## Notes / release sync
22+
23+
- **2026-09-03:** Toggle host is `<nowo-password-toggle>` with CSP-safe event delegation (no inline onclick/onkeydown).
24+
2025
---
2126

2227
## User Scenarios & Testing

0 commit comments

Comments
 (0)