Skip to content

DPS-42065 : Virtualization changes for autocomplete, Loading message indicator - #654

Merged
venkymano-akamai merged 16 commits into
ACLPManager:aclp_developfrom
venkymano-akamai:autocomplete_virtualization
Apr 9, 2026
Merged

DPS-42065 : Virtualization changes for autocomplete, Loading message indicator#654
venkymano-akamai merged 16 commits into
ACLPManager:aclp_developfrom
venkymano-akamai:autocomplete_virtualization

Conversation

@venkymano-akamai

Copy link
Copy Markdown

Description 📝

Highlight the Pull Request's context and intentions.

Changes 🔄

List any change(s) relevant to the reviewer.

  • ...
  • ...

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

Please specify a release date (and environment, if applicable) to guarantee timely review of this PR. If exact date is not known, please approximate and update it as needed.

Preview 📷

Include a screenshot <img src="" /> or video <video src="" /> of the change.

🔒 Use the Mask Sensitive Data setting for security.

💡 For changes requiring multiple steps to validate, prefer a video for clarity.

Before After
📷 📷

How to test 🧪

Prerequisites

(How to setup test environment)

  • ...
  • ...

Reproduction steps

(How to reproduce the issue, if applicable)

  • ...
  • ...

Verification steps

(How to verify changes)

  • ...
  • ...
Author Checklists

As an Author, to speed up the review process, I considered 🤔

Check all that apply

  •  Use React components instead of HTML Tags
  • Proper naming conventions like cameCase for variables & Function & snake_case for constants
  • Use appropriate types & avoid using "any"
  • No type casting & non-null assertions
  • Adding a changeset
  • Providing/Improving test coverage
  • Use sx props to pass styles instead of style prop
  • Add JSDoc comments for interface properties & functions
  • Use strict equality (===) instead of double equal (==)
  • Use of named arguments (interfaces) if function argument list exceeds size 2
  • Destructure the props
  • Keep component size small & move big computing functions to separate utility
  • 📱 Providing mobile support

  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

Copilot AI left a comment

Copy link
Copy Markdown

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 introduces virtualization for CloudPulse resource selection to improve Autocomplete performance with large option sets, and adds a delayed “taking longer than expected” loading indicator message for long-running CloudPulse loading states.

Changes:

  • Add react-window (and types) and a VirtualizedListbox implementation for virtualized Autocomplete list rendering.
  • Add a reusable useDelayedLoadingIndicator hook (with tests) and integrate it into CloudPulse dashboard filters and alert resource loading states.
  • Tune Autocomplete filtering via createFilterOptions to reduce work while typing.

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Locks new dependencies (react-window, memoize-one, @types/react-window) and related snapshot updates.
packages/manager/package.json Adds react-window and @types/react-window to Manager dependencies.
packages/manager/src/features/CloudPulse/Utils/useDelayedLoadingIndicator.ts New hook to show a secondary loading indicator after a delay.
packages/manager/src/features/CloudPulse/Utils/useDelayedLoadingIndicator.test.ts Unit tests for the delayed loading hook using fake timers.
packages/manager/src/features/CloudPulse/shared/VirtualizedListBox.tsx New react-window-based virtualized listbox component.
packages/manager/src/features/CloudPulse/shared/VirtualizedListBox.css Styling for the virtualized listbox scrollbar behavior.
packages/manager/src/features/CloudPulse/shared/CloudPulseResourcesSelect.tsx Integrates virtualized listbox and optimized filtering into the resources Autocomplete.
packages/manager/src/features/CloudPulse/shared/CloudPulseDashboardFilterBuilder.tsx Adds delayed “taking longer” message to the filter builder loading state.
packages/manager/src/features/CloudPulse/Alerts/AlertsResources/AlertsResources.tsx Adds delayed “taking longer” message to alerts resources loading state.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment on lines +153 to +165
// Wrapper component to connect VirtualizedListbox with MUI Autocomplete
const ListboxWrapper = React.forwardRef<
HTMLDivElement,
React.HTMLAttributes<HTMLElement>
>((props, ref) => {
// Extract children and forward to VirtualizedListbox
const { children, ...otherProps } = props;
return (
<Box ref={ref} {...otherProps}>
<VirtualizedListbox>{children}</VirtualizedListbox>
</Box>
);
});

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The virtualized listbox introduces a nested scroll container (Box wrapping FixedSizeList). MUI’s Autocomplete uses the listbox ref/element to manage scrolling the highlighted option into view; with this structure, the forwarded ref points to the Box, but the actual scrollable element is inside FixedSizeList, which can break keyboard navigation/auto-scroll. Consider making the provided listbox component itself the scroll container and forwarding the ref to react-window’s outerRef (or otherwise wiring MUI’s listbox ref to the element that actually scrolls).

Copilot uses AI. Check for mistakes.
Comment thread packages/manager/src/features/CloudPulse/shared/CloudPulseResourcesSelect.tsx Outdated
Comment thread packages/manager/src/features/CloudPulse/shared/VirtualizedListBox.css Outdated
<CircleProgress size="md" />
{showLoadingIndicator && (
<Typography mt={2} variant="body1">
The loading time is over 10 seconds. Please wait while the process completes.

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The delayed-loading message is hard-coded to “over 10 seconds”, which couples UI copy to the 10000ms parameter and can become incorrect if the delay changes. Consider deriving the displayed duration from the delay value (or a shared constant) and using clearer user-facing copy (e.g., “Loading is taking longer than expected…”).

Suggested change
The loading time is over 10 seconds. Please wait while the process completes.
Loading is taking longer than expected. Please wait while the process completes.

Copilot uses AI. Check for mistakes.
<CircleProgress />
{showLoadingIndicator && (
<Typography variant="body1">
The loading time is over 10 seconds. Please wait while the process completes.

Copilot AI Apr 7, 2026

Copy link

Choose a reason for hiding this comment

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

The delayed-loading message is hard-coded to “over 10 seconds”, which couples UI copy to the 10000ms parameter and can become incorrect if the delay changes. Consider deriving the displayed duration from the delay value (or a shared constant) and using clearer user-facing copy (e.g., “Loading is taking longer than expected…”).

Suggested change
The loading time is over 10 seconds. Please wait while the process completes.
Loading is taking longer than expected. Please wait while the process completes.

Copilot uses AI. Check for mistakes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@venkymano-akamai

Copy link
Copy Markdown
Author

all the cypress failures will be fixed in automation PR

@venkymano-akamai
venkymano-akamai merged commit 83f9676 into ACLPManager:aclp_develop Apr 9, 2026
32 checks passed
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.

4 participants