65 lines
5.8 KiB
Markdown
65 lines
5.8 KiB
Markdown
# Makepad dev rendering alignment
|
||
|
||
Baseline: Budget `e5b204e453dc7636458d29138381cdea8713d145`.
|
||
Comparison SDK: official Makepad `44ecb822b48106fa76bde4dfd309e5a8a7ff1932`, the revision reported on the affected Mac. This is an exact-revision comparison, not a claim about a moving `dev` branch.
|
||
|
||
## Findings and adjustments
|
||
|
||
| Area | Comparison | Action |
|
||
|---|---|---|
|
||
| Palette bridge | Budget used `makepad_wm_theme::current()` for both registration and draw-time colours. Upstream Sheets uses `current_for_vm`, which resolves the active Splash style and caches per isolate; `current()` only reads the exported WM theme file. | Restored the two upstream call sites. `app/src/theme.rs` now matches the SDK's `apps/sheets/src/theme.rs` exactly. |
|
||
| Spreadsheet tabs | Budget replaced upstream `TBtn` / `Button` with a custom View-based `NavigationBarButton`, nested labels and a separate selection animator. | Restored `TBtn`, native button text, `ButtonRef` click routing and upstream selected background/text colour application. Adaptive font updates now target the button's own `draw_text`. |
|
||
| Main mode navigation | Budget-specific custom View-based buttons, unlike the stock controls used by Sheets. | Use stock `Button` for Planner, Forms, History and Capture. Preserve routes and selected mode indication. Update the Capture handler along with its widget type. |
|
||
| Window/bootstrap | Static `Root → Window → body` structure agrees with Sheets/Finance. Counter uses a different, dynamic rendering pattern. | No blind addition of Counter's `.render()` call. |
|
||
| DataGrid borders | Budget already uses upstream's `draw_cell.border_color` and `border_size: uniform(1.0)`. | Preserve these valid properties and the stock grid draw implementation. Add a rendered-pixel regression probe rather than rename fields without evidence. |
|
||
| Forms/payment rows | Composite, clickable payment rows contain multiple child labels and are not equivalent to a stock Button. | Retain the custom widget here and existing category-tab behavior; do not remove child rendering or change payment actions. |
|
||
| Budget functionality | Workbook persistence, financial forms/history, Android share/capture, desktop tray/capture and explicit confirmation are intentional additions to Sheets. | Preserve. No native backend or financial model changes. |
|
||
|
||
Budget has substantial **functional additions**, but its spreadsheet renderer is still based on upstream's DataGrid and draw-step pattern. This change removes unnecessary control-rendering differences rather than replacing the application with the demo.
|
||
|
||
## Regression coverage
|
||
|
||
`app/tests/ui.rs` adds two real Makepad UI cases using the `omarchy` and `macos` Splash styles:
|
||
|
||
- Inspect chrome at 420×800 and 1200×800 (the resize is test coverage, not a proposed user workaround).
|
||
- Verify mode buttons, toolbar controls, formula input and sheet tabs are visible.
|
||
- Decode a screenshot and verify the selected button actually paints a background distinct from its surrounding mode bar.
|
||
- Add an isolated blank sheet and probe repeated horizontal grid borders in its screenshot.
|
||
- Navigate into Forms and back to Planner, then select the original sheet.
|
||
|
||
The tests use isolated application storage. Screenshots are of the test application, not captured user desktop data. No production screenshot-persistence behavior was added.
|
||
|
||
## Verification
|
||
|
||
Validated on Linux against the exact SDK above with an isolated Rust 1.99.1 toolchain and the existing `docs/Cargo.lock` (all Cargo gates used `--locked`):
|
||
|
||
- Full native application build passed.
|
||
- 114 Rust library/model/review tests passed (96 + 6 + 7 + 5).
|
||
- All 7 real release UI tests passed under private D-Bus/Xvfb with `BUDGET_LIVE_X11_TEST=1`, including both new pixel checks and the full capture → offline OCR → edit → confirm workflow. Total distinct Rust tests in this run: **121**.
|
||
- 4 Python packaging checks and 12 Java extraction tests passed.
|
||
- Basic `cargo run --locked` remained alive for the 15-second smoke window; no boot/script failure or panic. The headless host emitted PulseAudio fallback and upstream GLSL warnings.
|
||
- The tested application files were byte-compared with the delivered source.
|
||
- Temporary Rust, Cargo caches, SDK checkout and build artifacts were removed after validation; logs and selected test screenshots were retained outside the application tree.
|
||
|
||
Native macOS/Metal runtime verification is not available in the Linux sandbox. Running the `macos` Splash style on Linux is not a native macOS test. The supplied Mac trace showed all logged pipelines completing without a reported shader error or `gpu.hole`; it did not establish a GPU failure. These are source-alignment corrections, not yet proof that the Mac-specific symptom is resolved.
|
||
|
||
## Exact upstream references
|
||
|
||
- https://github.com/makepad/makepad/blob/44ecb822b48106fa76bde4dfd309e5a8a7ff1932/apps/sheets/src/theme.rs
|
||
- https://github.com/makepad/makepad/blob/44ecb822b48106fa76bde4dfd309e5a8a7ff1932/apps/sheets/src/view.rs
|
||
- https://github.com/makepad/makepad/blob/44ecb822b48106fa76bde4dfd309e5a8a7ff1932/libs/wm_theme/src/lib.rs
|
||
- https://github.com/makepad/makepad/blob/44ecb822b48106fa76bde4dfd309e5a8a7ff1932/widgets/families/data/src/data_grid.rs
|
||
|
||
This alignment uses the current SDK's `current_for_vm` API. Validate against the revision above rather than assuming the previously tested `9965c049` fork has that API.
|
||
|
||
## Applying the accompanying patch
|
||
|
||
The patch is against Budget `e5b204e`. From a clean checkout of that revision:
|
||
|
||
```sh
|
||
git apply --check /path/to/budget-makepad-dev-alignment.patch
|
||
git apply /path/to/budget-makepad-dev-alignment.patch
|
||
cargo run -p budget
|
||
```
|
||
|
||
Keep your local Makepad dependency path pointing to the `44ecb822` checkout. The patch does not change Cargo manifests, locks, dependency paths, Android files or native capture adapters. For a checkout that already includes this alignment commit, do not reapply the patch.
|