Repository navigation
Release v2.13.0
v2.13.0
Changelog
Listing customizer (cookie preferences) and guided product tour, ported from Symfony Beacon. See UPGRADING.
Added
- Listing customizer (ported from symfony-beacon): the viewer chooses, reorders, hides and stacks the columns of a listing table and shows / hides / reorders its filters, with a reset to the defaults. PHP API under
Nowo\UiKitBundle\Listing:ListingDefinitionInterface(autoconfigured tagnowo_ui_kit.listing_definition),ListingField,ListingFieldState,ListingLayout(stacked column groups,filterRequest()drops hidden filters and a sort on a hidden column,ignoredFilters(),withoutColumns()),ListingLayoutMerger(lenient merge of stored layouts, strictnormalize()/normalizeLayout()of submitted ones),ListingRegistry,ListingTableMode,ListingCustomizerViewandListingCustomizerViewBuilder::forRequest()(servicesnowo_ui_kit.listing.registry,nowo_ui_kit.listing.view_builder). Preferences live in the browser: portListingPreferenceStoreInterfacewith the defaultCookieListingPreferenceStore(cookienowo_ui_listing_<key>, JSON, size-guarded, lenient parse) so the server renders the chosen columns on first paint; a host aliases the port to a server store and passessave_url. See USAGE. - Partials
listing_customizer(page-edge tab +dialogside panel with Columns / Filters tabs, drag and keyboard reorder, visibility toggles, "stack under the previous column", reset; hidden-filters notice),listing_head,listing_cells(cell_<key>blocks, stacked cells as[data-cell-part]lines, row detail cell),listing_filter_fields; theme slotslisting_customizer,listing_customizer_toggle,listing_customizer_tabs,listing_customizer_tab,listing_customizer_panel,listing_customizer_list,listing_customizer_actions,listing_notice; canonical icon kindssliders,grip,stack;listing.*translations in every shipped locale. - Stimulus peer
listing-customizer(stimulus-peers/listing_customizer_controller.ts) and the cookie helpersstimulus-peers/listing_cookie.ts: Apply writes the cookie (path/, SameSite=Lax, one year) and reloads; with aurlvalue it sends the layout to the host instead (CSRF, token refresh on 403); eventslisting-customizer:saved/listing-customizer:save-failed. - Responsive table
save_cookieoption (peer valuecookie): withoutsave_url, the table mode toggle keeps its choice in the listing cookie (ListingCustomizerView::tableOptions()passes it withtable_mode). Hosts passingsave_urlare unchanged. - Guided tour (D-055, ported from Symfony Beacon's per-screen tours):
Nowo\UiKitBundle\Tour\Tour,
TourStep(selector or centred,Labelor string title / description, side / align,TourStep::anchor()for
[data-tour="…"]) and the immutableTourBuilder(welcome(),step(),add(),build()); thetourpartial
(partials/_tour.html.twig,nowo_ui_partial('tour')): a "Tour this page" page-edge tab plus the steps as a
Stimulus value (no inline script, CSP-safe); the Stimulus peerproduct-tour
(stimulus-peers/product_tour_controller.ts): driver.js imported on demand, steps without their anchor skipped,
reduced motion honoured, closed<details>opened for a highlight. The "seen" state is kept in the browser
(localStoragenowo-ui-tour-seen, D-056): auto-start once per tour key, replay from the tab; an optional
seen_urlalso posts{"key": …}with the CSRF header for hosts that persist it server-side.tour.*
translations in every locale, thetouricon in every icon set,driver.jsas an optional peer dependency.
USAGE and STIMULUS. - Page-edge tab
button: true(a<button>instead of the link); the 2.12.1attroption also applies to the
inline link and the button.