Skip to content

Conversation

isthaison
Copy link
Contributor

What problem does this PR solve?

Feat: support sort category

Type of change

  • New Feature (non-breaking change which adds functionality)

@Copilot Copilot AI review requested due to automatic review settings August 2, 2025 01:11
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 2, 2025
Copy link
Contributor

@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 adds sorting functionality to categorize forms by implementing move up/down controls for category items. The change allows users to reorder categories dynamically through UI buttons.

Key changes:

  • Added move functionality to the useFieldArray hook
  • Implemented up/down arrow buttons for reordering categories
  • Added move handler with boundary checks

import humanId from 'human-id';
import trim from 'lodash/trim';
import { ChevronsUpDown, X } from 'lucide-react';
import { ChevronsUpDown,ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react';
Copy link
Preview

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Missing space after comma between 'ChevronsUpDown' and 'ChevronDown'. Consistent spacing in import statements improves readability.

Suggested change
import { ChevronsUpDown,ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react';
import { ChevronsUpDown, ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react';

Copilot uses AI. Check for mistakes.

@dosubot dosubot bot added the 💞 feature Feature request, pull request that fullfill a new feature. label Aug 2, 2025
@KevinHuSh
Copy link
Collaborator

Could you elaborate on the scenario this feature deal with?

@isthaison
Copy link
Contributor Author

During the branching process, there are some cases where the edges overlap each other. Instead of pulling back the entire node, just handle the case to make it easier to visualize.
Step1:
image
Step 2:
image
Step 3:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💞 feature Feature request, pull request that fullfill a new feature. size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants