Feat/filter flyout - #2124
Merged
luanfreitasdev merged 12 commits intoAug 17, 2026
Merged
Feat/filter flyout#2124
Conversation
HasProperties::toArray() snake_cases every property, so the layout token is stored as layout.outside_filters. The camelCase lookup always resolved to an empty string, dropping the theme's outside filter wrapper classes.
The outside filter panel built its field grid inline. Moving the sorting and the per-filter-type dispatch into filters/fields.blade.php lets another panel render the same fields with a different grid, without duplicating the mapping. The grid classes stay with the caller via $gridClass.
Adds 'flyout' as a third value for the filter config and a filter_flyout block holding the drawer edge plus its two close behaviours, so a table can override them from boot() without touching the view.
Used as the accessible label of the filter drawer's close button.
Filter::flyout(Closure) mirrors the other fluent sub-components and exposes the drawer's class slots: overlay, panel with its per-side anchoring, header, title, close, body, footer and clearAll.
Tailwind carries the drawer's view alias, which DaisyUI and Flux inherit through parentTheme; each theme only sets its own classes.
Renders the backdrop and the panel, sliding in from the configured edge with a matching off-screen transform. Escape and backdrop closing are opt-out via config, the Escape listener is guarded because it is bound to the window. Fields come from the shared filters/fields partial in a single column grid.
Adds filterPosition(), usesFilterPanel() and filterPanelView() and routes the table, the theme headers and the pg-filters partial through them, so 'outside' and 'flyout' share one panel path instead of each view comparing the config string itself. filterFlyoutOptions() normalises the drawer settings so an invalid config value cannot break the panel.
Closing the drawer assigns $wire.showFilters directly, which commits without registering a partial. The updated hook re-registers them so the commit stays inside the Hot Zones instead of triggering a full re-render.
Drops the table.view* aliases and the removed header.export entries, and picks up layout.wrapper, the actions cells, the responsive row tokens, cols.div and the toggleable colors.
Registers filter.flyout in the generator's canonical alias list and adds the drawer's tokens to the meta, so theme() and theme_view() autocomplete them.
Adds Flyout.php to the component table, the filter.flyout token block to the reference, and the rule that themes restyle the shared drawer rather than replacing its view.
Contributor
Author
|
@luanfreitasdev can you check that out if that sits well with you ? |
Member
|
Thank you @virtualtear ⚡️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
⚡ PowerGrid - Pull Request
Description
Adds
flyoutas a third filter position, next toinlineandoutside. Filters move into a drawer that slides in from the left or right edge, opened by the existing filter button in the header.What's new
flyoutfilter position, backed by a shared drawer view (filter-flyout.blade.php) that every theme inherits throughparentTheme.filter.flyout.*theme tokens, set with->flyout(fn (Components\Flyout $f) => ...)or the array form. Styled for Tailwind, DaisyUI and Flux.filters/fields.blade.php, so the outside panel and the drawer render the same fields with their own grid.closetranslation added to all 20 locales, used as the close button'saria-label.pg-filtersHot Zone (no full re-render).Configuration
Per table, override in
boot():Theming
Override the classes only, not the view:
panelcarries the positioning (fixed inset-y-0) and must stay aboveoverlay;panel_left/panel_rightadd only the edge anchoring, since the blade pairs the chosen side with the matching slide-in transform.Backwards compatibility
Non-breaking. Default stays
inline, andoutsidebehaves as before.Related Issue(s):
Documentation
This PR requires Documentation update?