Skip to content

refactor: consolidate common/table into @repo/shared/components/table (#1516)#1517

Open
frano-m wants to merge 1 commit into
mainfrom
fran/table-consolidate
Open

refactor: consolidate common/table into @repo/shared/components/table (#1516)#1517
frano-m wants to merge 1 commit into
mainfrom
fran/table-consolidate

Conversation

@frano-m

@frano-m frano-m commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Closes #1516.

Completes the shared Table to match the reference consolidated components/Table — moves the app/components/common/Table/ cluster (deferred from the initial Table move) into the existing packages/shared/components/Table/.

Changes

  • git mv into packages/shared/components/Table/ (merges with the cells + table.styles.ts already there):
    • table.tsx, types.ts, hooks/UseRowDirection/hook.ts, components/TableCell/components/NTagCell/utils.tsx.
  • import type tidy: RowData/Props (table.tsx), RowData/Table (types.ts), CellContext/RowData/ComponentProps (NTagCell). JSX left unprefixed per repo convention.
  • Repointed 3 consumers → @repo/shared/components/Table/…: OrganismView AssembliesSection + PangenomeSection (the Table component), ConfigureWorkflowInputs AssemblySelector/columnDef (NTagCell).

Clean leaf cluster — no @//@site-config deps, no union types.

Notes

  • Pure git mv reorg — no behaviour change, so no new tests.
  • The similarly-named app/components/Docs/.../common/Table is a different (Docs) component and is untouched.

Verification

  • No @/components/common/Table imports remain; app/components/common/Table/ removed; moved code has no @//@site-config imports (shared purity).
  • tsc --noEmit, eslint, prettier: clean. Unit tests: 581/581. build:local: succeeds.

🤖 Generated with Claude Code

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

Consolidates the previously app-local common/Table implementation into the shared package @repo/shared/components/Table, aligning the shared Table component structure with the consolidated reference and updating application consumers to import from the shared location.

Changes:

  • Moved the remaining app/components/common/Table leaf cluster into packages/shared/components/Table (including the useRowDirection hook and NTagCell utilities).
  • Updated OrganismView sections and ConfigureWorkflowInputs table column definitions to consume the shared Table / NTagCell utilities via @repo/shared/... imports.
  • Cleaned up type-only imports (import type) for TanStack Table and React types within the shared Table implementation.

Reviewed changes

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

Show a summary per file
File Description
packages/shared/components/Table/types.ts Converts TanStack imports to import type for shared Table props typing.
packages/shared/components/Table/table.tsx Uses type-only imports for RowData/Props while keeping runtime behavior intact.
packages/shared/components/Table/hooks/UseRowDirection/hook.ts Adds the shared useRowDirection hook to keep responsive row direction logic within the shared Table cluster.
packages/shared/components/Table/components/TableCell/components/NTagCell/utils.tsx Converts TanStack + React props imports to type-only imports and keeps JSX import consistent with repo usage.
app/views/OrganismView/components/Main/components/PangenomeSection/pangenomeSection.tsx Repoints Table import to the shared package.
app/views/OrganismView/components/Main/components/AssembliesSection/assembliesSection.tsx Repoints Table import to the shared package.
app/components/Entity/components/ConfigureWorkflowInputs/.../AssemblySelector/hooks/UseTable/columnDef.ts Repoints NTagCell utilities import to the shared package.

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

@frano-m frano-m moved this to Ready for Review in BRC development tasks Jul 24, 2026
…#1516)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@frano-m
frano-m force-pushed the fran/table-consolidate branch from dfb77dd to b4283b8 Compare July 24, 2026 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

consolidate common/Table into @repo/shared/components/Table

3 participants