Skip to content

Conversation

@vishesh92
Copy link
Member

Description

This PR make some minor UI improvements over #9520

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92
Copy link
Member Author

@blueoranugtan ui

Copy link
Contributor

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 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 }))
Copy link

Copilot AI Jan 30, 2026

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.

Suggested change
this.searchFilters = clonedFilters.map(f => ({ ...f }))
this.searchFilters = clonedFilters

Copilot uses AI. Check for mistakes.
@sureshanaparti
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 16.26%. Comparing base (a6ccde4) to head (bc9ba60).
⚠️ Report is 1 commits behind head on 4.20.

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     
Flag Coverage Δ
uitests 4.16% <ø> (+0.01%) ⬆️
unittests 17.11% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/12552 (QA-JID-862)

@sureshanaparti
Copy link
Contributor

LGTM. Verified the search filter view in qa/simulator env.

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM

@borisstoyanov borisstoyanov merged commit 45d623e into apache:4.20 Jan 30, 2026
30 of 31 checks passed
@DaanHoogland DaanHoogland deleted the ui-fix-search-filter-size branch January 30, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants