8000 Node Status Indicator Revamp by 0x0f0f0f · Pull Request #916 · xyflow/web · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Node Status Indicator Revamp #916

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

Open
wants to merge 5 commits into
base: component-revamp
Choose a base branch
from

Conversation

0x0f0f0f
Copy link
Contributor
@0x0f0f0f 0x0f0f0f commented Jul 1, 2025

No description provided.

Copy link
vercel bot commented Jul 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
example-apps ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2025 3:07pm
reactflow-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2025 3:07pm
ui-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 2, 2025 3:07pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
svelteflow-website ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2025 3:07pm
xyflow-website ⬜️ Ignored (Inspect) Visit Preview Jul 2, 2025 3:07pm

Copy link
@Copilot 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 extends the NodeStatusIndicator to support an initial state, adds two loading variants (border and overlay), and updates documentation, component code, and examples accordingly.

  • Introduced NodeStatusLoadingVariant prop to switch between border and overlay loading indicators
  • Refactored and renamed loading indicator components; updated default loading variant
  • Updated documentation and registry examples to showcase each status and variant

Reviewed Changes

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

File Description
sites/reactflow.dev/src/content/components/nodes/node-status-indicator.mdx Added initial state and documented new loadingVariant options
apps/ui-components/registry/components/node-status-indicator/index.tsx Added loadingVariant prop, split loading indicators, updated switch logic
apps/ui-components/registry/components/node-status-indicator/component-example.tsx Replaced default export with multiple named examples for each status/variant
apps/ui-components/registry/components/node-status-indicator/app-example.tsx Updated node definitions and nodeTypes mapping for new example components
Comments suppressed due to low confidence (3)

sites/reactflow.dev/src/content/components/nodes/node-status-indicator.mdx:9

  • [nitpick] Consider adding a brief usage example or note on what the initial state looks like in practice, so readers know when and how to apply it.
A node wrapper that has multiple states for indicating the status of a node. Status can be one of the following: `success`, `loading`, `error` and `initial`.

apps/ui-components/registry/components/node-status-indicator/index.tsx:15

  • [nitpick] The name SpinnerLoadingIndicator describes the inner spinner but doesn’t convey that this is the overlay variant. Consider renaming to OverlayLoadingIndicator for consistency with BorderLoadingIndicator.
export const SpinnerLoadingIndicator = ({

apps/ui-components/registry/components/node-status-indicator/index.tsx:29

  • The CSS calc expressions lack spaces around the operator, which may lead to invalid parsing. Use left-[calc(50% - 1.25rem)] and top-[calc(50% - 1.25rem)] for correct syntax.
          <span className="absolute left-[calc(50%-1.25rem)] top-[calc(50%-1.25rem)] inline-block h-10 w-10 animate-ping rounded-full bg-blue-700/20" />

@printerscanner
Copy link
Member
  • I know we talked about potentially making this a part of the base node. I'm assuming you all discussed that and decided not to go with it?
  • To me, the demo visuals and the usage code that you copy into your app should be the smallest possible MVP because people just want to quickly copy and paste the snippet they want into the code. (Shadcn does it interestingly where they have multiple code viewers https://ui.shadcn.com/docs/components/button, but I think that would take some refactoring of the components project so not something for right now. )
  • I'm wondering if we can do something to make the variant explainer text slightly more beautiful. Something like this?

Screenshot 2025-07-01 at 14 24 42

@0x0f0f0f
Copy link
Contributor Author
0x0f0f0f commented Jul 1, 2025
  • I'm assuming you all discussed that and decided not to go with it?

Not yet!

but I think that would take some refactoring of the components project

It would need some re-design of the reactflow.dev/src/components/ui-component-viewer.mdx.tsx component

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.

2 participants
0