Skip to content

Analytics filter refinements#24

Open
tomerqodo wants to merge 10 commits intocopilot_combined_20260121_qodo_grep_cursor_copilot_1_base_analytics_filter_refinements_pr240from
copilot_combined_20260121_qodo_grep_cursor_copilot_1_head_analytics_filter_refinements_pr240
Open

Analytics filter refinements#24
tomerqodo wants to merge 10 commits intocopilot_combined_20260121_qodo_grep_cursor_copilot_1_base_analytics_filter_refinements_pr240from
copilot_combined_20260121_qodo_grep_cursor_copilot_1_head_analytics_filter_refinements_pr240

Conversation

@tomerqodo
Copy link

Benchmark PR from qodo-benchmark#240

Copilot AI review requested due to automatic review settings January 21, 2026 18:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refines the analytics filter UI/UX with visual and functional improvements including updated styling, improved dropdown behavior, and icon changes.

Changes:

  • Modified filter component styling with updated padding, spacing, and visual presentation
  • Added auto-close functionality for multiselect dropdowns and improved search input clearing behavior
  • Updated filter button icons and removed default i18n text labels

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
apps/stats/src/views/Stats/layout/stats-header.tsx Adjusted navbar padding from uniform py-8 to asymmetric pb-6 pt-9
apps/stats/src/views/Stats/components/stats-filter.tsx Updated filter styling (badge to monospace text), added selectedOptionsClassName, changed icons, configured auto-close behavior, and removed button text labels
apps/shade/src/components/ui/filters.tsx Added autoCloseOnSelect support, modified default i18n strings to empty, improved popover close handling, adjusted operator dropdown styling, and refined animation behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
} else {
onChange([option.value] as T[]);
setOpen(false);
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The removal of the handleClose() call for single-select (non-multiselect) options creates inconsistent behavior. When autoCloseOnSelect is not configured, single-select options will now call setOpen(false) but not handleClose(), which means the search input won't be cleared (since handleClose() includes setSearchInput('')). This creates an inconsistency where the search input persists after selection in some scenarios.

Suggested change
setOpen(false);
setOpen(false);
handleClose();

Copilot uses AI. Check for mistakes.
addButtonText={filters.length ? 'Add filter' : 'Filter'}
className='mb-6 mt-0.5 [&>button]:order-last'
addButtonIcon={<LucideIcon.FunnelPlus />}
addButtonText={filters.length ? '' : ''}
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Setting addButtonText to an empty string for both filtered and unfiltered states removes the text label from the button. Combined with the icon-only approach (FunnelPlus), this may create accessibility issues for screen reader users who won't have descriptive text announcing what the button does. Consider keeping descriptive text or ensuring proper aria-label attributes are set.

Suggested change
addButtonText={filters.length ? '' : ''}
addButtonText="Filters"

Copilot uses AI. Check for mistakes.
className='mb-6 mt-0.5 [&>button]:order-last'
addButtonIcon={<LucideIcon.FunnelPlus />}
addButtonText={filters.length ? '' : ''}
className='mb-6 [&>button]:order-last'
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The className selector '[&>button]:order-last' has been changed from 'mt-0.5 [&>button]:order-last'. Removing the top margin (mt-0.5) may affect the vertical alignment and spacing of the filter component. Ensure this change is intentional and the layout still appears correct without this spacing.

Suggested change
className='mb-6 [&>button]:order-last'
className='mb-6 mt-0.5 [&>button]:order-last'

Copilot uses AI. Check for mistakes.
onSelect={() => {
if (isMultiSelect) {
const newValues = [...effectiveValues, option.value] as T[];
var newValues = [...effectiveValues, option.value] as T[];
Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

The variable declaration has been changed from 'const' to 'var', which is against modern JavaScript best practices. The 'var' keyword has function scope rather than block scope and can lead to unexpected behavior. This should remain 'const' as the variable is not reassigned.

Suggested change
var newValues = [...effectiveValues, option.value] as T[];
const newValues = [...effectiveValues, option.value] as T[];

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants