Skip to content

Document tabular layout and apply presentation nitpicks - #230

Merged
trailcode merged 5 commits into
mainfrom
Trailcode/nitpick
Jul 26, 2026
Merged

Document tabular layout and apply presentation nitpicks#230
trailcode merged 5 commits into
mainfrom
Trailcode/nitpick

Conversation

@trailcode

@trailcode trailcode commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Document hand-aligned tabular C++ layout (including short one-line switch cases), blank-line vertical rhythm, and happy-path-first control flow in docs/ezycad_code_style.md.
  • Apply those presentation rules in gui_settings.cpp and shp_cross_section.cpp (local // clang-format off/on around tables only), plus light blank-line cleanup in nearby shape/sketch files.
  • No intended runtime behavior changes.

Closes #229

Test plan

  • Spot-check docs/ezycad_code_style.md Tabular layout / Vertical rhythm / Control flow polarity sections.
  • Confirm gui_settings.cpp and shp_cross_section.cpp keep clang-format off/on tight to tables (not file-wide).
  • Build / CI green (presentation-only; no feature tests expected).
  • Quick sanity: Settings dialog still loads/saves; cross-section tool still previews/clips.

Notes

  • Branch is formatting/style nitpick only (Trailcode/nitpick).

Note

Low Risk
Mostly documentation and formatting; the Defaults-button and cross-section message refactors are equivalent control flow but worth a quick sanity check in Settings and cross-section clip UX.

Overview
docs/ezycad_code_style.md adds guidance for hand-aligned tabular blocks (JSON keys, assignments, one-line switch cases) with tight // clang-format off/on, plus vertical rhythm (blank lines around ImGui chains, lambdas, returns) and happy-path-first if/else.

gui_settings.cpp and shp_cross_section.cpp are the main code updates: column-aligned settings JSON builders/parsers and compact switch tables; many blank lines before ImGui::SameLine / help tooltips and in the Settings UI. Smaller touch-ups in shp_create, shp_move, shp_rotate, fuse/cut/extrude, skt.cpp, etc. (spacing, polarity). shp_cross_section.h drops an unused #include <cstddef>.

The Settings Defaults button is refactored to if (!content.empty()) { … } else show_message(...) (same outcomes). Clip-message and similar branches use success-first ordering; logic is unchanged per the PR intent.

Reviewed by Cursor Bugbot for commit f4a1900. Bugbot is set up for automated code reviews on this repo. Configure here.

@trailcode
trailcode merged commit f9da612 into main Jul 26, 2026
4 checks passed
@trailcode
trailcode deleted the Trailcode/nitpick branch July 26, 2026 00:27
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.

Document and apply tabular C++ layout / blank-line rhythm

1 participant