Repository navigation
Release v2.2.0
feat: CSP-safe JSON config island for dashboard.js (2.2.0)
Changelog
Added
- CSP-safe config island: dashboard templates now emit a single
<script type="application/json" id="nowo-dashboard-menu-config">JSON island (fromdashboard/base.html.twig, blocknowo_dashboard_menu_config_island) instead of inlinewindow.__nowoDashboardMenuConfig = Object.assign(...)scripts. Page templates (index,show,show_items_reorder,item_form) provide their data through the top-level Twig variablenowo_dashboard_menu_page_config, merged withcssFrameworkinto the island. JSON is encoded withJSON_HEX_TAG|AMP|APOS|QUOT. config.ts(readConfigIsland,readDashboardMenuConfig) with Vitest tests (100% coverage) and a PHPUnit guard test (CspSafeConfigIslandTest).
Changed
dashboard.js/dashboard.tsread config from#nowo-dashboard-menu-config; island values win over the legacy global.cssFrameworkis now also emitted when the host setslayout_templateto its own layout (it is rendered frombase.html.twig, notlayout.html.twig).
Deprecated
- Reading
window.__nowoDashboardMenuConfigis kept as a fallback for one minor (removed in 2.3.0). Hosts that rewrote the inline script (e.g.KitInlineConfigScriptSubscriber) can drop that workaround for dashboard-menu.
What's Changed
- chore(deps): bump nowo-tech/ui-kit-bundle from 1.8.3 to 1.8.4 by @dependabot[bot] in #76
- chore(deps): bump nowo-tech/phpstan-frankenphp from 1.1.3 to 1.2.0 by @dependabot[bot] in #77
- chore(deps): bump nowo-tech/form-kit-bundle from 2.5.2 to 2.5.3 by @dependabot[bot] in #78
- chore(deps): bump phpstan/phpstan-phpunit from 2.0.18 to 2.0.21 in the phpstan group by @dependabot[bot] in #79
- chore(deps): bump nowo-tech/form-kit-bundle from 2.5.3 to 2.5.4 by @dependabot[bot] in #80
- chore(deps): bump igor-php/igor-php from 0.9.7 to 0.10.0 by @dependabot[bot] in #81
- chore(deps): bump nowo-tech/ui-kit-bundle from 1.8.4 to 1.8.5 by @dependabot[bot] in #82
- chore(deps): bump nowo-tech/phpstan-frankenphp from 1.2.0 to 1.2.1 by @dependabot[bot] in #83
Full Changelog: v2.1.14...v2.2.0