Skip to content

Conversation

@vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Nov 5, 2025

Description

This PR partly fixes #9729 by implementing infinite scroll select.

  1. ui/src/components/view/DedicateDomain.vue -> On /host, Click on Add Host, and then select Dedicated Checkbox.
  2. ui/src/views/compute/wizard/OwnershipSelection.vue -> Launch VM Deployment
  3. ui/src/views/iam/AddUser.vue -> On /accountuser, click on Add User button. The dialog changes based on whether the accountid or domainid is present in the query params.
  4. ui/src/views/infra/UsageRecords.vue -> On /usage
  5. ui/src/views/storage/CreateTemplate.vue -> Create a volume snapshot, and create template from it.
  6. ui/src/views/storage/UploadLocalVolume.vue -> On /volume, click on the "Upload Volume from Local"
  7. ui/src/views/storage/UploadVolume.vue -> On /volume, click on the "Upload Volume from URL"
  8. ui/src/views/tools/CreateWebhook.vue -> On /webhook, click on the "Create Webhook" button.
  9. ui/src/views/tools/ManageVolumes.vue -> On /managevolumes

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?

@codecov
Copy link

codecov bot commented Nov 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 17.09%. Comparing base (d53b6db) to head (4fc90c1).
⚠️ Report is 42 commits behind head on 4.20.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #11991      +/-   ##
============================================
+ Coverage     16.19%   17.09%   +0.90%     
- Complexity    13306    13378      +72     
============================================
  Files          5657     5255     -402     
  Lines        498467   466262   -32205     
  Branches      60491    54734    -5757     
============================================
- Hits          80702    79713     -989     
+ Misses       408783   377669   -31114     
+ Partials       8982     8880     -102     
Flag Coverage Δ
uitests ?
unittests 17.09% <ø> (+0.05%) ⬆️

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.

@vishesh92 vishesh92 requested a review from Copilot November 6, 2025 06:25
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 refactors multiple Vue components to replace custom domain/account/project select dropdowns with a new reusable InfiniteScrollSelect component. The changes consolidate repetitive code, remove manual API fetching logic, and leverage automatic data reloading through computed properties.

  • Introduces InfiniteScrollSelect component with infinite scrolling and search capabilities
  • Removes manual fetchDomains(), fetchAccounts(), fetchProjects() methods across multiple components
  • Implements reactive API parameter computed properties that auto-reload data when dependencies change

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ui/src/views/tools/ManageVolumes.vue Replaced domain/account/project select dropdowns with InfiniteScrollSelect
ui/src/views/tools/CreateWebhook.vue Migrated domain/account selections to InfiniteScrollSelect
ui/src/views/storage/UploadVolume.vue Converted zone/disk offering/domain/account selects to InfiniteScrollSelect
ui/src/views/storage/UploadLocalVolume.vue Replaced zone/disk offering/domain/account selections with InfiniteScrollSelect
ui/src/views/storage/CreateTemplate.vue Migrated domain/account selections to InfiniteScrollSelect
ui/src/views/infra/UsageRecords.vue Replaced auto-complete components for domain/account with InfiniteScrollSelect
ui/src/views/iam/AddUser.vue Converted domain/account selections to InfiniteScrollSelect
ui/src/views/compute/wizard/OwnershipSelection.vue Migrated domain/account/project selections to InfiniteScrollSelect with notes about override filtering
ui/src/components/widgets/InfiniteScrollSelect.vue Added allowClear prop to the select component
ui/src/components/view/DedicateDomain.vue Replaced domain/account selections with InfiniteScrollSelect

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

@vishesh92 vishesh92 force-pushed the use-infinite-scroll-select branch from 7a00d91 to c7d282c Compare November 7, 2025 08:39
@vishesh92 vishesh92 requested a review from shwstppr November 7, 2025 13:11
@vishesh92 vishesh92 marked this pull request as ready for review November 7, 2025 22:00
@shwstppr
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@vishesh92 the default option when creating a webhook is only shown whilst another option is chosen. And also still the last shown option is the last but one domain.

@daviftorres
Copy link
Contributor

Dear @vishesh92 , this is a very welcome feature. Thank you.

As our organization grows, the filters and pages take time to load and the UI becomes more and more sluggish. I would say, pagination is could be applied to more parts of the UI.

Keep up with the good work!

@abh1sar
Copy link
Collaborator

abh1sar commented Jan 7, 2026

This looks more suitable for a major release. Thoughts? @vishesh92 @DaanHoogland

@DaanHoogland DaanHoogland added this to the 4.20.3 milestone Jan 7, 2026
@DaanHoogland
Copy link
Contributor

I think it can go on a LTS, it is an improvement on the UI only and does not change any functionality, nor add DB or API interfaces.

@shwstppr
Copy link
Contributor

shwstppr commented Jan 7, 2026

@blueorangutan ui

@blueorangutan
Copy link

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

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

Code mostly looks good, added some comments. There are few comments added in the code which I'm not sure help a lot.
Will try to test some cases.

@vishesh92 are the changes done/forms covered in some order or on random basis? Migrating forms section-wise would have helped a bit more maybe.

Comment on lines +182 to +193
selectableOptions () {
const currentValue = this.$attrs.value
// Only filter out null/empty options when the current value is also null/undefined/empty
// This prevents such options from being selected and allows the placeholder to show instead
if (currentValue === null || currentValue === undefined || currentValue === '') {
return this.options.filter(option => {
const optionValue = option[this.optionValueKey]
return optionValue !== null && optionValue !== undefined && optionValue !== ''
})
}
// When a valid value is selected, show all options
return this.options
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the benefit of this differentiation? Maybe we can show the null/empty option always or is it beneficial when using the value from route?

Copy link
Member Author

Choose a reason for hiding this comment

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

I added this to maintain consistency with the existing behavior in UI.

@blueorangutan
Copy link

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

@RosiKyu RosiKyu self-assigned this Jan 12, 2026
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.

7 participants