Skip to content

Comments

feat(apollo-react): support skeleton loader in BaseNode#240

Open
rahul-sharma-uipath wants to merge 1 commit intomainfrom
feat/skeleton-loader-nodes
Open

feat(apollo-react): support skeleton loader in BaseNode#240
rahul-sharma-uipath wants to merge 1 commit intomainfrom
feat/skeleton-loader-nodes

Conversation

@rahul-sharma-uipath
Copy link
Collaborator

@rahul-sharma-uipath rahul-sharma-uipath commented Feb 18, 2026

use loading attribute in NodeData to render skeleton loader for BaseNode

image

Copilot AI review requested due to automatic review settings February 18, 2026 01:59
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas ❌ Failed: Building: No authorization header was set for the request. Building: These authorization settings... N/A, Logs Feb 17, 2026, 06:09:55 PM
apollo-ui-react ❌ Failed: Building: No authorization header was set for the request. Building: These authorization settings... N/A, Logs Feb 17, 2026, 06:09:57 PM
apollo-vertex ❌ Failed: Building: No authorization header was set for the request. Building: These authorization settings... N/A, Logs Feb 17, 2026, 06:09:50 PM
apollo-wind ❌ Failed: Building: No authorization header was set for the request. Building: These authorization settings... N/A, Logs Feb 17, 2026, 06:09:58 PM

@github-actions
Copy link

github-actions bot commented Feb 18, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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

Adds a skeleton/loading rendering mode to the Canvas BaseNode so nodes can display a shimmer placeholder while their content is loading.

Changes:

  • Extends BaseNodeData with a loading?: boolean flag to enable a skeleton state.
  • Implements an early-return loading render path in BaseNode that shows a skeleton in place of the icon area.
  • Introduces BaseSkeletonIcon styling and a new Storybook story to showcase loading across shapes.

Reviewed changes

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

File Description
packages/apollo-react/src/canvas/components/BaseNode/BaseNode.types.ts Adds loading?: boolean to the node data contract.
packages/apollo-react/src/canvas/components/BaseNode/BaseNode.tsx Adds a loading/skeleton render branch for nodes.
packages/apollo-react/src/canvas/components/BaseNode/BaseNode.styles.ts Adds BaseSkeletonIcon styled wrapper around ApSkeleton.
packages/apollo-react/src/canvas/components/BaseNode/BaseNode.stories.tsx Adds a Loading story and manifest/node setup to demo the skeleton state.

Comment on lines 429 to 460
// Skeleton loading state from node data
if (data.loading) {
const skeletonShape = display.shape ?? 'square';

return (
<div
ref={containerRef}
style={{ position: 'relative' }}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
onFocus={handleFocus}
onBlur={handleBlur}
>
<BaseContainer
selected={selected}
shape={skeletonShape}
className={interactionState}
interactionState={interactionState}
width={width}
height={height}
>
{/* Shimmer skeleton replacing the icon area */}
<BaseSkeletonIcon
variant="rectangle"
shape={skeletonShape}
nodeHeight={height}
nodeWidth={width}
/>
</BaseContainer>
</div>
);
}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The data.loading early-return skips rendering handleElements. This breaks the file’s own invariant (“Always render all handles so they register…”) and can cause missing/incorrect edge anchoring or SmartHandle registration while the node is loading. Consider always rendering the handles (e.g., render handleElements with visible={false} / hidden visuals) even in loading state.

Copilot uses AI. Check for mistakes.
@rahul-sharma-uipath rahul-sharma-uipath marked this pull request as ready for review February 18, 2026 02:27
Copilot AI review requested due to automatic review settings February 18, 2026 02:27
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment on lines +447 to +451
export const BaseSkeletonIcon = styled(ApSkeleton)<{
shape?: NodeShape;
nodeHeight?: number;
nodeWidth?: number;
}>`
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

BaseSkeletonIcon introduces custom props (shape, nodeHeight, nodeWidth) that will be forwarded through ApSkeleton onto the underlying <div> via {...rest}, resulting in invalid DOM attributes and React warnings. Use transient props (e.g. $shape, $nodeHeight, $nodeWidth) and/or shouldForwardProp to prevent these styling-only props from reaching the DOM.

Copilot uses AI. Check for mistakes.
Comment on lines +487 to 506
{data.loading ? (
<BaseSkeletonIcon
variant="rectangle"
shape={displayShape}
color={displayColor}
backgroundColor={displayIconBackground}
height={displayFooter ? undefined : height}
width={displayFooter ? undefined : (width ?? height)}
>
{Icon}
</BaseIconWrapper>
nodeHeight={displayFooter ? undefined : height}
nodeWidth={displayFooter ? undefined : (width ?? height)}
/>
) : (
Icon && (
<BaseIconWrapper
shape={displayShape}
color={displayColor}
backgroundColor={displayIconBackground}
height={displayFooter ? undefined : height}
width={displayFooter ? undefined : (width ?? height)}
>
{Icon}
</BaseIconWrapper>
)
)}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The new data.loading rendering path changes visible output but there are no automated tests covering the skeleton state (e.g., asserting ap-skeleton is rendered and the icon isn’t). Since this is library code under packages/, add a unit/component test for BaseNode’s loading behavior to prevent regressions.

Copilot generated this review using guidance from repository custom instructions.
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.

1 participant