Skip to content

fix(Grid): sort copied indexes numerically - #1244

Open
fallintoplace wants to merge 3 commits into
ClickHouse:mainfrom
fallintoplace:fix/grid-copy-numeric-order
Open

fallintoplace wants to merge 3 commits into
ClickHouse:mainfrom
fallintoplace:fix/grid-copy-numeric-order

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • What: Sort copied row and column indexes numerically.
  • Why: Default sorting places 10 before 2.
  • Implementation: Use numeric comparators for copied row and column indexes.
  • Example: Copying [10, 2, 3] gives [2, 3, 10].

Links and tickets

  • None.

Good to know

  • No visual or breaking changes.

Checklist

  • Breaking changes? (add migration notes in changesets)
  • Visual changes? (specify in changesets)
  • Design review needed?

Contribution

  • Sufficient research before PR
  • Self-reviewed the PR
  • Manually tested the changes (when applies - visual confirmation in Storybook)
  • build and build-storybook work locally
  • Tests and Stories are aligned with the changes

Accessibility

  • Keyboard - Keyboard copy keeps selected indexes in numeric order.
  • Names — Accessible names are unchanged.
  • Vision — No colors or focus styles changed.

Screenshots

  • Not applicable; there are no visual changes.

@changeset-bot

changeset-bot Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 52bf71d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@XOP

XOP commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

thank you for contribution, @fallintoplace !
please update the PR description according to the template.

@XOP
XOP requested review from vineethasok and a balanced review from Copilot October 5, 2026 10:47
@XOP XOP added the bug Something isn't working label Oct 5, 2026

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.

Copilot review overview

🟢 Approval recommended

The focused fix is correct, tested for both affected selection modes, and appropriately documented.

Review effort: Balanced
Findings: None

What changed in this PR

Fixes Grid copy ordering so multi-digit row and column indexes are sorted numerically.

Changes:

  • Adds numeric comparators for selected indexes.
  • Adds regression tests for rows and columns.
  • Adds a patch changeset.
File Description
src/​components/​Grid/​copyGridElements.ts Sorts copied indexes numerically.
src/​components/​Grid/​copyGridElements.test.tsx Tests numeric copy ordering.
.changeset/​fix-grid-copy-numeric-order.md Documents the consumer-visible fix.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@XOP XOP added the needs update Needs update due to the external or global updates label Oct 5, 2026
@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Chromatic Storybook

Check Status Link
Storybook ✅ 642 stories published Open Storybook
UI Tests ✅ 642 tests unchanged Open build

Built from commit: 53e3a2ade646dc756501ce71d02f6d0dffd5711c · Chromatic run

Statuses as of the end of the run. The build link shows the live review state.

@XOP XOP removed the needs update Needs update due to the external or global updates label Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants