fix: show active advanced filter count badge in dropdown button #20229

PR
PR description

Summary

Replaces the hardcoded 0 in ViewBarFilterDropdownAdvancedFilterButton with the actual count of active advanced filter rules, matching the behavior of AdvancedFilterChip in the view bar.

What changed

In packages/twenty-front/src/modules/views/components/ViewBarFilterDropdownAdvancedFilterButton.tsx:

  • Imported useAtomComponentSelectorValue and rootLevelRecordFilterGroupComponentSelector
  • Imported useChildRecordFiltersAndRecordFilterGroups
  • Replaced const advancedFilterQuerySubFilterCount = 0; // TODO with the real computed count via the same hook pattern used in AdvancedFilterChip.tsx

The pill badge will now appear on the "Advanced filter" dropdown menu item showing the number of active advanced filter rules (e.g. "2" when two rules are active).

References

  • Fixes #20207
CUT
cutter bot commented just now

Cutter Summary

With one active advanced filter rule applied, the Advanced filter item in the dropdown gains a count badge on the after-side that is absent on the before-side; the no-rules state shows the item without a badge on both sides.