Repository navigation
Release v2.4.0
v2.4.0
Changelog
Pagination::fromTotal(), popover row / overflow menus, segmented partial. See UPGRADING.
Added
Pagination::fromTotal()/fromRequest(): a clamped pagination from a row count and the requested page /
per-page — page clamped to 1..totalPages (an empty list has one page), per-page restricted to$allowedPerPage
(default[10, 25, 50, 100]; an unknown value falls back to$defaultPerPage, default 25, or the first allowed
value) — plusoffset()/limit()for the query ($pagination['offset']/['limit']too) and
allowedPerPage. Same results as thePagePagination::fromTotal()helper the apps copy, so they can switch. The
constructor and the other factories are unchanged (new optional last argumentallowedPerPage).- Per-page links in the
paginationpartial:per_page_choices: [...], orper_page_selector: truewith a
fromTotal()pagination (pagination.per_pagetranslated in every locale). Off by default. - Popover menus:
popover: trueon themenupartial and_kebab,menu: true(+menu_label,popover) on
row_actions, ortheme.popover_menus: true(defaultfalse): the panel is a native[popover]in the browser top
layer, so table scrollers and cards never clip it. New runtimenowo-ui-popover.js(ported from symfony-beacon's
popover_menucontroller): places the panel under the toggle (flips above without room, stays in the viewport),
aria-expanded, closes on scroll / resize / item choice, Escape closes the menu before a surrounding dialog.
Theme::popoverMenus();menupassesconfirm_externalto its actions. segmentedpartial (slotssegmented,segmented_option): a two-option radio group backed by one checkbox
(FormView or plain input; Live Componentdata-modelfriendly). New runtimenowo-ui-segmented.js(ported from
symfony-beacon'scheckbox_segmentcontroller): click, arrow keys, Home / End select and sync the checkbox with a
bubblingchange.- The
scriptspartial (ThemeSlots::SCRIPTS) also loadspopoverandsegmented(small, delegated, idle until
their markup is on the page). The kitchen sink demo shows a popover row menu, a popover kebab, the segmented control
and per-page links.
Changed
- Dev dependencies
symfony/dom-crawlerandsymfony/css-selector(tests only).