Modify: ui/ShapeDraftman.java - different rendering for groups
Edge cases
Ungroup empty collection: just remove it
Group single shape: valid but maybe warn
Nested groups: recursive ungroup option?
Move child out of group: not supported initially
## Overview
Implement functionality to group multiple shapes into a single unit and ungroup them.
## Current State
- SCollection already exists as composite pattern implementation
- SCollection supports add(), remove(), and child iteration
- No UI for creating groups from selection
## Implementation Plan
### 1. Group operation
- Select multiple shapes
- Press G (or menu item) to group
- Create new SCollection containing selected shapes
- Replace selected shapes with the group in model
- Select the new group
### 2. Ungroup operation
- Select a SCollection (group)
- Press U (or menu item) to ungroup
- Add all children to model at top level
- Remove the SCollection from model
- Select all the ungrouped shapes
### 3. Visual feedback
- Groups show different selection highlight (thicker border or different color)
- Double-click to enter group (edit children)? Or keep flat?
- Show group bounds when selected
### 4. Operations on groups
- Move: translate all children (already works via SCollection.translate())
- Resize: either resize bounds only or resize proportionally
- Color: apply to all children (already works)
- Delete: remove group and all children
### 5. Nested groups
- Allow groups within groups (SCollection can contain SCollection)
- Recursive operations
## Files to modify
- Modify: ui/Controller.java - add group/ungroup handlers
- Modify: App.java - add menu items
- Modify: ui/ShapeDraftman.java - different rendering for groups
## Edge cases
- Ungroup empty collection: just remove it
- Group single shape: valid but maybe warn
- Nested groups: recursive ungroup option?
- Move child out of group: not supported initially
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Overview
Implement functionality to group multiple shapes into a single unit and ungroup them.
Current State
Implementation Plan
1. Group operation
2. Ungroup operation
3. Visual feedback
4. Operations on groups
5. Nested groups
Files to modify
Edge cases