Skip to content

Conversation

@yuto-trd
Copy link
Member

@yuto-trd yuto-trd commented Dec 6, 2025

Description

Introduce grouping and ungrouping capabilities for selected elements, enhancing the resizing behavior to support multiple elements with context tracking. Implement shortcuts for toggling element grouping and update copy functionality to handle grouped elements. Refactor grouping logic to utilize Scene.Groups and improve property casting in ElementViewModel.

Breaking changes

None.

Fixed issues

None.

Copilot AI review requested due to automatic review settings December 6, 2025 06:18
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

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 introduces element grouping and ungrouping functionality to the timeline editor, allowing users to organize and manipulate multiple elements together. The implementation adds a new Groups property to the Scene model, refactors element selection and manipulation behaviors to support grouped operations, and provides keyboard shortcuts (Ctrl/Cmd+G) for toggling group states.

Key Changes:

  • Added Groups property to Scene with serialization/deserialization support for persisting element groups across sessions
  • Implemented grouping/ungrouping commands with proper undo/redo support via IRecordableCommand
  • Enhanced resize, move, split, copy, cut, delete operations to work with grouped elements or selected elements as appropriate

Reviewed changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Beutl.ProjectSystem/ProjectSystem/Scene.cs Added Groups property (CoreList of ImmutableHashSet) with serialization/deserialization logic using colon-separated Guid strings
src/Beutl/ViewModels/ElementViewModel.cs Implemented grouping logic including GetGroupOrSelectedElements(), group/ungroup commands, and event handlers for tracking group membership
src/Beutl/ViewModels/TimelineViewModel.cs Enhanced paste operation to preserve group relationships and added ToggleGroup command handler for keyboard shortcuts
src/Beutl/Views/ElementView.axaml.cs Refactored resize and move behaviors to support multiple elements via ElementResizeContext array and group-aware element selection
src/Beutl/Views/ElementView.axaml Added context menu items for grouping and ungrouping selected elements
src/Beutl/ViewModels/EditViewModel.cs Auto-groups video and audio elements when adding video files to timeline
src/Beutl/Services/PrimitiveImpls/TimelineTabExtension.cs Registered ToggleGroup keyboard shortcut (Ctrl/Cmd+G)
src/Beutl.Language/Strings.resx, Strings.ja.resx, Strings.Designer.cs Added localized strings for group/ungroup menu items
Files not reviewed (1)
  • src/Beutl.Language/Strings.Designer.cs: Language not supported

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

No TODO comments were found.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

Code Coverage

Package Line Rate Branch Rate Complexity Health
Beutl.Operators 4% 0% 76
Beutl.Core 34% 31% 3142
Beutl.Engine 27% 24% 9789
Beutl.Threading 100% 94% 118
Beutl.Utilities 73% 67% 358
Beutl.Configuration 38% 19% 282
Beutl.Extensibility 2% 0% 105
Beutl.ProjectSystem 17% 10% 1862
Beutl.Language 0% 0% 658
Summary 27% (10563 / 39083) 25% (2811 / 11047) 16390

Minimum allowed line rate is 0%

@yuto-trd yuto-trd merged commit 11cfc09 into main Dec 6, 2025
4 checks passed
@yuto-trd yuto-trd deleted the feat/timeline-element-set branch December 6, 2025 15:55
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.

2 participants