Skip to content

[20.0][MIG] web_filter_header_button: Migration to 20.0 - #3779

Open
CarlosRoca13 wants to merge 11 commits into
OCA:20.0from
Tecnativa:20.0-MIG-web_filter_header_button
Open

CarlosRoca13 wants to merge 11 commits into
OCA:20.0from
Tecnativa:20.0-MIG-web_filter_header_button

Conversation

@CarlosRoca13

Copy link
Copy Markdown

chienandalu and others added 10 commits October 30, 2026 11:14
Now we can configure group filters to show up along the other filters so
users can easily access those as well.

TT49232
When there are too many buttons, they won't fit in the window and they
will overlap with other ui elemnets. We can prevent it putting them in
their own row.

TT49431
In custom views, like the reconciliation one, that use the control panel
we must prevent loading the FilterButton component.

TT49664
@oca-cla-bot

oca-cla-bot Bot commented Oct 30, 2026

Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@OCA-git-bot OCA-git-bot added mod:web_filter_header_button Module web_filter_header_button series:20.0 labels Oct 30, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration web_filter_header_button

@OCA-git-bot OCA-git-bot added this to the 20.0 milestone Oct 30, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 30, 2026
6 of 38 tasks

@Andrii9090-tecnativa Andrii9090-tecnativa left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on Runboat, and it works with the sample filters and groupings. For example, grouping by status in Apps works correctly.
I added the following filter to the Sales Order search view to group orders by date, and it doesn't work
Image

Image

Other filters in the Sales Order search view work correctly with the same shown_in_panel context.

Image

Could you please check whether date groupings are handled correctly?

@chienandalu chienandalu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd fix this tiny gap between the buttons.

Image

onClickToggleHeaderButtonFilters() {
const visible = !this.headerButtonFiltersState.visible;
if (visible) {
browser.localStorage.setItem(this.buttonFiltersVisibilityKey, true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

The read at line 19 is guarded with if (actionId), but the write here is not. For control panels without an action (e.g. the "Search More…" SelectCreateDialog, where env.config.actionId is false), toggling the buttons stores visibleHeaderButtonsfalse+<uid> in localStorage.

That key is never read back, so the dialog always opens with the buttons hidden, and every actionless control panel shares the same stale entry. I reproduced it: open Contacts → a many2one → "Search More…" → toggle the funnel → the key appears in Local Storage.

My suggestion would be only to persist (and remove) the key when actionId is set, keeping the visibility state in memory otherwise.

}
// Font Awesome isn't available anymore, so the old `fa-*` icons would
// be rendered as plain text.
if (options.icon?.startsWith("fa-")) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

startsWith("fa-") only catches the fa-star form. Legacy contexts using the full Font Awesome syntax ('icon': 'fa fa-star') slip through, and since .oi::before renders content: attr(data-icon), the button ends up showing a stray fa fa- text next to the glyph (the font turns star into the icon but the rest is plain text).

The migration script already handles both forms (ICON_RE accepts fa[\w\s-]*), so the runtime guard should be consistent with it for views/filters that haven't been migrated yet. Something like /(^|\s)fa-/.test(options.icon) would cover both.

@CarlosRoca13
CarlosRoca13 force-pushed the 20.0-MIG-web_filter_header_button branch from e78f622 to 543bad8 Compare October 30, 2026 12:04
@CarlosRoca13
CarlosRoca13 force-pushed the 20.0-MIG-web_filter_header_button branch from 543bad8 to 8798187 Compare October 30, 2026 12:12
@CarlosRoca13

Copy link
Copy Markdown
Author

Changes done!

@chienandalu chienandalu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:web_filter_header_button Module web_filter_header_button series:20.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants