Commit 50bf1ad
committed
refactor(document): extract large match arms into helper methods
Part of #2740 - Code quality refactors.
This commit addresses the 'Match statements' section of the tracking
issue by extracting three large match arms from process_message() into
dedicated helper methods:
- handle_group_selected_layers: Handles layer grouping in both artboard
and non-artboard workflows (~50 lines extracted)
- handle_move_selected_layers_to: Handles layer movement with proper
transform preservation (~85 lines extracted)
- handle_nudge_selected_layers: Handles keyboard nudging with optional
resize mode (~75 lines extracted)
The main match statement in DocumentMessageHandler is now ~210 lines
shorter and more readable. Logic and behavior remain unchanged.1 parent 934df24 commit 50bf1ad
File tree
1 file changed
+232
-214
lines changed- editor/src/messages/portfolio/document
1 file changed
+232
-214
lines changed
0 commit comments