Repository navigation
refactor: shared module layout (craft-contrib#20) - #1394
Merged
Merged
Conversation
…ngine/src/templates.rs
…textedit/tests.rs
…/present/tests.rs
…es, shape_handles, rotation_origin, al_keys, booleans, shapebuilder, textedit, textpreview, vectoredit to canvas/
…_spacing, rename to selection/
…wap, style_vars, playground, token_roles to assets/
…codegen, tailwind, devcompare, devinspect, dev_measurements, dev_resources to dev/
…background to sharing/
…etic_ds to content/
…andles, measure_overlay, proto_canvas, render_worker, selection_spacing, live_text, comments, board_bar, board_facilitate, widget_bar to canvas/
…ent_panel, export_panel, layout_panel, section_panel, selection_colors, typography, variable_ui, vector_panel, scale_panel, frame_presets, list_drag, proto_panel, proto_editor, dev_mode, dev_compare, shortcuts_panel to panels/
…s_ui, variables_panel, branch_ui, plugins_ui to dialogs/
…review, board_picker to widgets/
|
Important Review skippedToo many files! This PR contains 328 files, which is 28 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files.
|
dylanmtaylor
approved these changes
Oct 26, 2026
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure-move refactor of FigCraft to the shared module layout in storytold/craft-contrib#20. No behaviour changes. Public paths stay the same: moved modules and items are re-exported from their old parent by name, and no caller is rewritten.
One commit per moved file or area; merge without squashing so each move stays reviewable and bisectable.
Large files split
Line counts are
wc -l(including comments, tests and blank lines) at main (740d1173) and at this PR (60c671da).crates/ui-egui/src/present.rspresent/tests.rs(438)crates/format/src/fig/map.rsmap/layer.rs(699)crates/engine/src/tools.rs(original replaced bycrates/engine/src/canvas/tools.rs)canvas/tools/drag.rs(605)crates/format/src/fig/export.rsexport/layer.rs(440)crates/ui-egui/src/right.rs(original replaced bycrates/ui-egui/src/panels/right.rs)panels/right/paints.rs(553)crates/ui-egui/src/lib.rsapp.rs(385)crates/engine/src/components.rs(original replaced bycrates/engine/src/assets/components.rs)assets/components/patch.rs(528)crates/engine/src/cmd/file.rsfile/load.rs(416)crates/engine/src/live.rs(original replaced bycrates/engine/src/sharing/live.rs)sharing/live/types.rs(482)crates/engine/src/lib.rsdoc_state.rs(348)crates/collab-net/src/hub.rshub/conn.rs(404)crates/engine/src/codegen.rs(original replaced bycrates/engine/src/dev/codegen.rs)dev/codegen/html.rs(390)crates/ui-egui/src/canvas.rscanvas/overlays.rs(545)apps/figcraft-server/src/store.rsstore/files.rs(300)crates/ui-egui/src/typography.rs(original replaced bycrates/ui-egui/src/panels/typography.rs)panels/typography/fields.rs(481)crates/engine/src/cmd/edit.rsedit/props.rs(458)crates/ui-egui/src/menus.rsmenus/palette.rs(410)crates/engine/src/cmd/component.rscomponent/props.rs(609)crates/engine/src/board.rs(original replaced bycrates/engine/src/boards/board.rs)boards/board/derived.rs(339)Also: 1 test module moved out to a
tests.rsfile, 5mod.rsfiles renamed, 2 loose test files moved undertestspaths.crates/ui-egui/src/present.rs(3,422 → 459 + 11 files)present/tests.rspresent/chrome.rspresent/scroll.rspresent/input.rspresent/player.rspresent/actions.rspresent/navigate.rspresent/transition.rspresent/layout.rspresent/device.rspresent/draw.rscrates/format/src/fig/map.rs(3,122 → 367 + 9 files)map/layer.rsmap/component.rsmap/document.rsmap/paint.rsmap/connector.rsmap/text.rsmap/layout.rsmap/proto.rsmap/variables.rscrates/engine/src/tools.rs(2,875 → 578 + 7 files)canvas/tools/drag.rscanvas/tools/handles.rscanvas/tools/click.rscanvas/tools/pointer.rscanvas/tools/pen.rscanvas/tools/draw.rscanvas/tools/keys.rscrates/format/src/fig/export.rs(2,840 → 631 + 7 files)export/layer.rsexport/assets.rsexport/common.rsexport/shape.rsexport/component.rsexport/paint.rsexport/prototype.rscrates/ui-egui/src/right.rs(2,491 → 710 + 5 files)panels/right/paints.rspanels/right/effects.rspanels/right/stroke.rspanels/right/inspect.rspanels/right/menu.rscrates/ui-egui/src/lib.rs(2,383 → 731 + 11 files)app.rscanvas.rs(existing file)app/files.rsapp/commands.rsapp/frame.rsservices.rsapp/control.rsstate.rsclock.rsopen.rspanels.rscrates/engine/src/components.rs(2,339 → 301 + 7 files)assets/components/patch.rsassets/components/sync.rsassets/components/instances.rsassets/components/rebase.rsassets/components/diff.rsassets/components/variants.rsassets/components/guard.rscrates/engine/src/cmd/file.rs(2,169 → 433 + 8 files)file/load.rsfile/export.rsfile/open.rsfile/save.rsfile/rest_import_tests.rsfile/version.rsfile/staging_write_tests.rsfile/tab_order_tests.rscrates/engine/src/live.rs(2,117 → 389 + 5 files)sharing/live/types.rssharing/live/events.rssharing/live/sync.rssharing/live/host.rssharing/live/join.rscrates/engine/src/lib.rs(2,025 → 524 + 10 files)doc_state.rssession/undo.rsderived.rsprefs.rssession/exec.rsview_state.rssession/new.rssession/access.rserror.rscanvas.rscrates/collab-net/src/hub.rs(1,795 → 772 + 5 files)hub/conn.rshub/queue.rshub/hosting.rshub/backend.rshub/limits.rscrates/engine/src/codegen.rs(1,755 → 575 + 5 files)dev/codegen/html.rsdev/codegen/css.rsdev/codegen/arkui.rsdev/codegen/swift.rsdev/codegen/compose.rscrates/ui-egui/src/canvas.rs(1,705 → 366 + 6 files)canvas/overlays.rscanvas/input.rscanvas/outline.rscanvas/render.rscanvas/builder.rscanvas/rulers.rsapps/figcraft-server/src/store.rs(1,675 → 570 + 5 files)store/files.rsstore/journal.rsstore/backend.rsstore/library.rsstore/links.rscrates/ui-egui/src/typography.rs(1,615 → 350 + 5 files)panels/typography/fields.rspanels/typography/glyphs.rspanels/typography/spacing.rspanels/typography/picker.rspanels/typography/axes.rscrates/engine/src/cmd/edit.rs(1,589 → 554 + 3 files)edit/props.rsedit/clipboard.rsedit/select.rscrates/ui-egui/src/menus.rs(1,546 → 601 + 4 files)menus/palette.rsmenus/tree.rsmenus/clipboard.rsmenus/select_layer.rscrates/engine/src/cmd/component.rs(1,527 → 356 + 3 files)component/props.rscomponent/instance.rscomponent/variants.rscrates/engine/src/board.rs(1,495 → 277 + 5 files)boards/board/derived.rsboards/board/items.rsboards/board/edit.rsboards/board/tools.rsboards/board/connectors.rsTotals: 19 files split, 32,221 lines moved out of them, 120 new files.
Changes besides moved lines
test: scan source directories recursively(the one non-move code commit): the i18n key test walksui-egui/srcandformat/src/{fig,rest}recursively, readsfig.rsandrest.rsbeside those directories, and leaves outfig/export/as it left outfig/export.rs. Without it the moves would drop files from the scan, or add the export warnings to the importer notes, without the test noticing. It finds the same keys before and after.docs: update source paths for the layout moves: 16 path references in 7 docs.pub(super), orpub(crate)when used elsewhere in the crate; engineDocStatefields read elsewhere becomepub(crate). Items used only in a type position or under a targetcfggot it too: enginecmd/file/load.rs(wasmread,rest_images,sibling_variables), ui-eguitypography/spacing.rsSpacingEdit, formatfig/map/layer.rsFit, collab-nethub/queue.rs(Charge,Held,Chargesfields) andhub/limits.rsCounted;pub(in crate::cmd)forexport_settingandprint_param.use,modandpub uselines;impl X {wrappers around moved methods. Imports a split left unused were removed in that split's commit (LiveLinkinlivechildren, theprint_paramre-export incmd/file.rs,use super::*instate.rs). Inopen.rsan import used only on wasm is gated with#[cfg(target_arch = "wasm32")].super::xpaths in moved code that would becomesuper::super::xare written from the crate root (crate::cmd::props::apply,crate::fig::export::STASH).app.rsnames the crate-levelcontrolmodule ascrate::control::…(CaptureState,background,drain), because the new childapp/control.rsshadows the bare name there.library_server,live,invite_links,plugins,plugin_directory(now underassets::,sharing::,extensions::), collab-nethuband figcraft-serverstorechildren, and ui-egui's one call inFigApp::failed(figcraft_ui_egui→figcraft_ui_egui::app::commands). No log filter or test names a target.Checks
pure-move-check upstream/main..layout: 67 commits: 60 ok, 7 with unmatched lines. Those are the scan-test commit, and in six splits onlysuper::→crate::path rewrites, lines rustfmt reflowed, thecrate::control::paths and the wasm#[cfg]inopen.rs(listed above). No///,//!or#[…]line is removed. The docs commit changes only.mdfiles.cargo clippy --all-targets -- -D warningsfor every split crate;cargo check -p figcraft-web --target wasm32-unknown-unknown.cargo check --testsforx86_64-pc-windows-msvcandaarch64-apple-darwin. figcraft-ui-egui, figcraft-collab-net, figcraft-server and figcraft passcargo xwin clippy --all-targets --target x86_64-pc-windows-msvc -- -D warnings. Those four can't be checked foraarch64-apple-darwinfrom Linux here: theringbuild script needs a C cross toolchain.Conflicts with open PRs
30 of 38 open PRs touch files this PR changes (2026-10-26).
Split files: changes need porting into the new child files
ui-egui/src/lib.rsengine/src/cmd/file.rsengine/src/lib.rsui-egui/src/dialogs.rsui-egui/src/right.rsengine/src/live.rsui-egui/src/canvas.rsui-egui/src/menus.rscollab-net/src/hub.rsformat/src/fig/export.rsui-egui/src/present.rsapps/figcraft-server/src/store.rsengine/src/codegen.rsengine/src/tools.rsformat/src/fig/map.rsui-egui/src/icons.rsui-egui/src/typography.rsengine/src/components.rsEdited in place (
mod,useand#[path]lines)ui-egui/src/widgets.rsui-egui/src/control.rsui-egui/src/home.rsui-egui/src/i18n.rsengine/src/fonts.rsMoved whole: git follows the rename on rebase
ui-egui/src/colorpicker.rs→ui-egui/src/widgets/colorpicker.rsui-egui/src/style_picker.rs→ui-egui/src/widgets/style_picker.rsui-egui/src/plugins_ui.rs→ui-egui/src/dialogs/plugins_ui.rsui-egui/src/selection_colors.rs→ui-egui/src/panels/selection_colors.rsui-egui/src/variables_panel.rs→ui-egui/src/dialogs/variables_panel.rsengine/src/cmd/mod.rs→engine/src/cmd.rsengine/src/code_connect.rs→engine/src/dev/code_connect.rsengine/src/component_codegen.rs→engine/src/dev/component_codegen.rsformat/src/rest/mod.rs→format/src/rest.rsui-egui/src/layout_panel.rs→ui-egui/src/panels/layout_panel.rscollab-net/src/queue_tests.rs→collab-net/src/hub/queue_tests.rsengine/src/branches.rs→engine/src/sharing/branches.rsengine/src/online.rs→engine/src/sharing/online.rsengine/src/textedit.rs→engine/src/canvas/textedit.rssvg/src/import/mod.rs→svg/src/import.rsui-egui/src/i18n_tests.rs→ui-egui/src/i18n/tests.rsui-egui/src/layers.rs→ui-egui/src/panels/layers.rsui-egui/src/present_behaviour_tests.rs→ui-egui/src/present/behaviour_tests.rsengine/src/devinspect.rs→engine/src/dev/devinspect.rsengine/src/distance.rs→engine/src/canvas/distance.rsengine/src/file_access.rs→engine/src/automation/file_access.rsengine/src/file_access_tests.rs→engine/src/automation/file_access/tests.rsengine/src/library.rs→engine/src/assets/library.rsengine/src/library_tests.rs→engine/src/assets/library/tests.rsengine/src/playground.rs→engine/src/assets/playground.rsengine/src/plugins.rs→engine/src/extensions/plugins.rsengine/src/shapebuilder.rs→engine/src/canvas/shapebuilder.rsengine/src/style_vars.rs→engine/src/assets/style_vars.rsengine/src/textpreview.rs→engine/src/canvas/textpreview.rsengine/src/vectoredit.rs→engine/src/canvas/vectoredit.rsengine/src/vectoredit/ops.rs→engine/src/canvas/vectoredit/ops.rsengine/src/vectoredit/regions.rs→engine/src/canvas/vectoredit/regions.rsengine/src/vectoredit/regions_tests.rs→engine/src/canvas/vectoredit/regions_tests.rsengine/src/widgets.rs→engine/src/extensions/widgets.rsui-egui/src/branch_ui.rs→ui-egui/src/dialogs/branch_ui.rsui-egui/src/comments.rs→ui-egui/src/canvas/comments.rsui-egui/src/dev_compare.rs→ui-egui/src/panels/dev_compare.rsui-egui/src/dev_mode.rs→ui-egui/src/panels/dev_mode.rsui-egui/src/export_panel.rs→ui-egui/src/panels/export_panel.rsui-egui/src/home_recents.rs→ui-egui/src/home/home_recents.rsui-egui/src/missing_fonts.rs→ui-egui/src/dialogs/missing_fonts.rsui-egui/src/present_variables_tests.rs→ui-egui/src/present/variables_tests.rsui-egui/src/proto_editor.rs→ui-egui/src/panels/proto_editor.rsui-egui/src/proto_panel.rs→ui-egui/src/panels/proto_panel.rsui-egui/src/render_worker.rs→ui-egui/src/canvas/render_worker.rsui-egui/src/variable_ui.rs→ui-egui/src/panels/variable_ui.rsui-egui/src/versions.rs→ui-egui/src/panels/versions.rsDocs (path references)
docs/gaps.mddocs/mcp.mddocs/collab-protocol.mddocs/prototyping-parity.mddocs/components-parity.mdAfter the freeze
*_tests.rsfiles declared in the crate roots (95 in ui-egui, 181 in engine): 126 of them import other test modules by crate-root path, so moving them needs path rewrites.#[path]test modules in crates this PR doesn't otherwise change: text (display,fontdb,color), collab (code), format (library,fig/tests.rschildren,fig/export_tests.rs), figcraft (control_server), and docproto.rs's two#[path]submodules.dialogs::show()holds About, Preferences and Find & replace inline; extract them into functions, then move them todialogs/.control.rs,colorpicker.rs,style_picker.rs, …).