Skip to content

feat(UI): add loading logic#1095

Merged
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
liuyangjuncong20202570:feat/radix-table
Jun 4, 2025
Merged

feat(UI): add loading logic#1095
benjamin-747 merged 1 commit into
gitmono-dev:mainfrom
liuyangjuncong20202570:feat/radix-table

Conversation

@liuyangjuncong20202570

Copy link
Copy Markdown
Contributor

增加:
table加载动画

@vercel

vercel Bot commented Jun 4, 2025

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2025 10:53am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a loading spinner to the table components to improve user experience while data is being fetched.

  • Introduces conditional spinner display in the tree detail page.
  • Refactors the CodeView to use a new SpinnerTable component with loading state.
  • Updates the Table component to incorporate a loading spinner wrapper.

Reviewed Changes

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

Show a summary per file
File Description
moon/apps/web/pages/[org]/code/tree/[...path]/index.tsx Adds spinner display logic based on TreeCommitInfo.
moon/apps/web/components/CodeView/index.tsx Replaces direct CodeTable usage with SpinnerTable for loading state encapsulation.
moon/apps/web/components/CodeView/TableWithLoading/index.tsx Implements the new SpinnerTable component to manage spinner logic and table display.
moon/apps/web/components/CodeView/Table/index.tsx Integrates a Spinner wrapper and adjusts key generation for table cells.
moon/apps/web/components/CodeView/CodeTable.tsx Passes down the loading prop to RTable for consistent spinner behavior.
Comments suppressed due to low confidence (2)

moon/apps/web/components/CodeView/CodeTable.tsx:96

  • [nitpick] The loading prop is passed down to RTable even though the parent conditionally displays a spinner; ensure that this dual approach to loading states is intentional and does not lead to duplicate spinner displays.
<RTable columns={columns ?? []} datasource={directory} size='3' align='center' onClick={handleRowClick} loading={loading} />

moon/apps/web/components/CodeView/Table/index.tsx:46

  • [nitpick] Concatenating c.key and d.oid for key generation may lead to potential ambiguity if d.oid is not guaranteed unique; consider validating the uniqueness of d.oid or using a more explicit unique identifier.
key={c.key + d.oid}

@benjamin-747
benjamin-747 added this pull request to the merge queue Jun 4, 2025
Merged via the queue into gitmono-dev:main with commit da56061 Jun 4, 2025
6 checks passed
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.

3 participants