-
-
Notifications
You must be signed in to change notification settings - Fork 51
Add grouping and ungrouping functionality for elements #1438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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".
There was a problem hiding this 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
Groupsproperty 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.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
No TODO comments were found. |
Minimum allowed line rate is |
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.