-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update search filter size dynamically #12552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update search filter size dynamically #12552
Conversation
|
@blueoranugtan ui |
There was a problem hiding this 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 enhances the search filters display feature introduced in PR #9520 by dynamically showing/hiding the search filters row based on whether there are actual filters to display, and ensuring the affix component properly recalculates its position when the filter row appears or disappears.
Changes:
- Added dynamic visibility control for the search filters row to only show when meaningful filters are present
- Added 'projectid' to the list of excluded filter keys that should not be displayed
- Improved filter reactivity with immediate initialization in the SearchFilter component
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ui/src/views/AutogenView.vue | Added computed property showSearchFilters to conditionally display filters, added key to affix component for proper re-rendering, and added padding-left style |
| ui/src/components/view/SearchFilter.vue | Added 'projectid' to excluded keys list and added immediate filter initialization in watcher |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| immediate: true, | ||
| handler (newFilters) { | ||
| const clonedFilters = newFilters.map(filter => ({ ...filter })) | ||
| this.searchFilters = clonedFilters.map(f => ({ ...f })) |
Copilot
AI
Jan 30, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assignment appears redundant as clonedFilters is already a cloned array from line 177. The extra cloning via map(f => ({ ...f })) could be simplified to just this.searchFilters = clonedFilters or this.searchFilters = [...clonedFilters] if a new array reference is needed. This would improve code clarity and reduce unnecessary object creation.
| this.searchFilters = clonedFilters.map(f => ({ ...f })) | |
| this.searchFilters = clonedFilters |
|
@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12552 +/- ##
=========================================
Coverage 16.26% 16.26%
Complexity 13428 13428
=========================================
Files 5660 5660
Lines 499907 499910 +3
Branches 60696 60696
=========================================
+ Hits 81316 81318 +2
Misses 409521 409521
- Partials 9070 9071 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
UI build: ✔️ |
|
LGTM. Verified the search filter view in qa/simulator env. |
borisstoyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR make some minor UI improvements over #9520
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?