Skip to content

fix: remove the re-order funcationality from collection data blocks - #1555

Closed
b-d055 wants to merge 9 commits into
masterfrom
fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks
Closed

b-d055 wants to merge 9 commits into
masterfrom
fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks

Conversation

@b-d055

@b-d055 b-d055 commented Mar 10, 2026 •

Copy link
Copy Markdown
Collaborator

No description provided.

@vercel

vercel Bot commented Mar 10, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
geogenesis Ready Ready Preview Mar 18, 2026 9:22pm

Request Review

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 removes re-ordering support for collection-backed table data blocks by gating drag-and-drop / position-based reordering behind the RELATIONS source type.

Changes:

  • Restricts DnD reordering UI (DndContext, SortableItem, PositionBox) to source.type === 'RELATIONS'.
  • Adjusts reorder helpers to use a computed totalEntriesForReorder and to select which relations array to operate on.

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

Comment thread apps/web/partials/blocks/table/table-block-dnd-items.tsx Outdated
Comment thread apps/web/partials/blocks/table/table-block-dnd-items.tsx Outdated
@b-d055
b-d055 force-pushed the fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks branch from 97bb092 to f305a64 Compare March 17, 2026 15:46
Remove collectionRelations/collectionLength props and SystemIds import
that became unused after gating reorder to RELATIONS source type only.
Simplify handleMove to use relations directly since the COLLECTION
branch was unreachable.
b-d055 added 4 commits March 18, 2026 17:00
Enable reordering for both COLLECTION and RELATIONS source types.
Remove unused collectionRelations/collectionLength props and SystemIds
import from the DnD items component.
…-for-collection-data-blocks' of https://github.com/EE-Solutions/geogenesis into fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks
…-for-collection-data-blocks' of https://github.com/geobrowser/geogenesis into fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks
…o fix/data-block-reorder-functonality-should-only-show-up-for-collection-data-blocks

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

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


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

Comment on lines +136 to 142
const movingRelation = relationsToUse.find(r => r.toEntity.id === currentRow?.entityId);

if (!movingRelation) return;

const allSortedRelations = [...collectionRelations].sort((a, b) =>
const allSortedRelations = [...relationsToUse].sort((a, b) =>
Position.compare(a.position ?? null, b.position ?? null)
);
Comment on lines 408 to 413
entries={entries}
onUpdateRelation={onUpdateRelation}
relations={relations ?? []}
collectionRelations={collectionRelations ?? []}
collectionLength={collectionLength}
pageNumber={pageNumber}
pageSize={pageSize}
shouldAutoFocusPlaceholder={shouldAutoFocusPlaceholder}
Comment on lines +195 to +197
const canReorder = source.type === 'RELATIONS' || source.type === 'COLLECTION';

const totalEntriesForReorder = relations?.length ?? sortableEntries.length;
@ohohoreilly

Copy link
Copy Markdown
Contributor

Closing as part of a sweep of the open-PR queue. Not a judgement on the work — reopen if you still want it and I will help get it current.

Opened 2026-03-10 and now conflicting with master. At this distance a rebase is usually more work than redoing the change against current code, and the surrounding code has moved a long way underneath "fix: remove the re-order funcationality from collection data blocks".

@b-d055 — if the idea still stands but the branch does not, a fresh PR or a ticket is probably a better route than reviving this one.

Nothing is discarded: the branch and its history remain, and reopening costs a click.

Context: 74 PRs were open, 25 older than two months, the oldest from February. The point is to make the queue mean something so genuinely ready work is visible rather than buried — #2449 sat ready for three days this week partly because of the noise. Only non-draft, conflicting PRs are in scope; drafts and anything still mergeable are being left alone.

This branch was successfully deployed

1 active deployment
Preview — faca89ad Deployed Mar 18, 2026 by vercel[bot]
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