* ft makepad_test
* Improve run handling, manifest parsing, and stdout newline
Replace dynamic free-port lookup with an ephemeral localhost SocketAddr in test runtime and remove the unused find_free_listen_address helper. Ensure headless stdout messages end with a newline. Simplify send_to_app error handling and add a test that queued bootstrap messages are delivered once an app socket connects. Substantially enhance process_manager: unify cargo flag parsing, parse Cargo.toml to determine package/bin targets, resolve the correct binary name for direct stdio runs, and build the cargo/build+exec script from the resolved args. Add unit tests for manifest parsing and script generation and adjust related call sites.
* test harness
* Preserve test attrs; return Vec for gateway binds
In the test macro (libs/makepad_test/macros/src/lib.rs) preserve wrapper-only attributes (ignore and should_panic) on the generated wrapper test while removing them from the inner function. Added Attribute import, is_wrapper_only_test_attr helper, adjusted attribute filtering and emission, and added unit tests to verify attribute placement and expansion.
In the hub (studio/hub/src/hub.rs) change gateway_bind_candidates to return a Vec<SocketAddr> instead of an iterator and special-case ephemeral port 0 to preserve ephemeral binding; otherwise collect the range of candidate ports into a Vec. Added tests to validate candidate behavior. Also minor formatting/whitespace tweaks and a small IPv6 formatting adjustment.
* Add visible Studio mode and remote client
Enable running UI tests visibly through a running Makepad Studio. Adds a new makepad-network dependency and studio_remote client (libs/makepad_test/src/studio_remote.rs) and integrates it into the runtime via a TestConnection enum. Introduces visible-mode tooling: env vars (MAKEPAD_TEST_VISIBLE, MAKEPAD_TEST_STUDIO, MAKEPAD_TEST_STUDIO_MOUNT, MAKEPAD_TEST_STARTUP_DELAY_MS, MAKEPAD_TEST_ACTION_DELAY_MS, MAKEPAD_TEST_KEEP_OPEN_MS), pacing/delays after actions, and pause-before-shutdown. Splits startup into start_headless_app/start_visible_app, clears existing visible builds before launching, and updates tests, docs (GUIDE.md, README.md), and selector/runtime minor cleanups/formatting.
Explicitly redraw the overlay widget draw_list when opening and closing Modal and PopupNotification. This makes the overlay visible immediately on the first open (before the overlay content has refreshed or established a reusable draw area) and ensures the previous frame isn't left visible too long on close. Keeps existing background redraws intact.
* Add animated sidebar toggle and splitter APIs
Add an animated, persistent sidebar toggle and supporting splitter APIs/UI.
- New icon resource: studio/desktop/resources/icons/icon_sidebar_toggle.svg
- UI: replace hidden caption bar with a visible caption that includes a sidebar toggle button (CaptionSidebarToggle), layout adjustments and related controls.
- App behavior: add SidebarAnimation struct and App fields to track animation state and next-frame. Handle button actions, next-frame stepping, and window drag queries to avoid initiating window drag over the toggle.
- Add App methods to query/set the workspace root splitter position, start/step sidebar animations, toggle sidebar (remember/restore width), and sync tab-bar visibility for mounts.
- Persist mount sidebar restore width by adding sidebar_restore_width to MountState and initializing default.
- Make save_state pub(super) so App can save when animation finishes.
- Widgets: expose splitter position and set_splitter_align on Dock and Splitter to allow programmatic width changes and redrawing.
These changes improve UX by providing a smooth animated sidebar hide/show, remembering user width per mount, and ensuring the dock UI updates correctly during mount/tab changes.
* Persist sidebar_restore_width in mount state
Add an Option<f64> sidebar_restore_width to PersistedMountStateRon and wire it through loading and collection so the sidebar width is saved and restored. Include tests to verify a round-trip serialization/deserialization preserves the value and that missing legacy data defaults to None for backward compatibility.
* Sync run preview splitter state
Hide and restore the Run preview column based on whether run tabs exist. Added run_panel_split_restore to AppData to remember the last editor_split ratio per mount, plus a helper (run_preview_splitter_is_collapsed) and a new method sync_run_preview_splitter that collapses the preview when there are no runs and restores the previous ratio when runs reappear (defaults to Weighted(0.62)). Called sync_run_preview_splitter from relevant places: after creating/ensuring run tabs, when clearing build tabs, when closing run tabs, and at startup to initialize each mount. Also added /.cocoindex_code/ to .gitignore.
* Add bottom panel toggle with animation
Introduce a bottom panel toggle UI and animation support. Adds a new icon resource and CaptionPanelToggle button in the caption bar, moves/adjusts caption layout, and wires the button to toggle the bottom panel. Adds a TerminalShellPane, bottom_terminal_tab, and integrates bottom_panel_tabs into the workspace layout. Implements BottomPanelAnimation, animation helpers (panel_animation_progress, start/step logic), workspace splitter height getters/setters, and toggle/select helpers (toggle_bottom_panel, select_bottom_terminal_panel). Persists mount bottom_panel_restore_height in MountState and persisted state with tests updated. Also updates drag/tab behavior to account for the new bottom terminal tab and routes animation next-frame events.
* Refactor reflow_resize and add wrap test
Rewrite reflow_resize to simplify reflow logic and improve handling of growing/shrinking rows and scrollback. The change always captures the old grid state, builds logical (re-wrapped) scrollback lines, and then branches on whether the new height is greater, less, or equal to the old height. On growth it may pull rows from the logical scrollback when the terminal was full, preserve content when a custom scroll region is present, and correctly update cursor, high-water, saved cursor and bottom_trimmed_rows. On shrink it chooses how many bottom rows to push into scrollback based on cursor position, trimmed rows, and content below the cursor, and trims scrollback to max_scrollback. Also adjust cursor bounds and pending_wrap handling. Add a test (visible_wrapped_prompt_rows_do_not_reflow_on_width_growth) to ensure visible wrapped prompt rows do not get reflowed when the width increases.
* Removed `remove_all(view_id)` from `push_view()` to allow
the same view ID on the stack multiple times. Most apps will
need somethin like this, otherwise they'd have to have a weird
statically-known set of fixed views that are eligible to be
on the stack. Robrix, at the least, doesn't have that.
* Fixed `show()` to force-reset the animator state, which was needed
to make a fresh animation always play (even when animating in "reused" views)
* Reset `state` to `Inactive` in `show()`, otherwise it'll never transition to `Active`
* Schedule loader removal after presented frame
Introduce loader_after_presented_frame_id and add schedule/cancel helpers to remove the canvas loader after a presented animation frame. Cancel any pending requestAnimationFrame when the loader is removed or conditions change, and update update_startup_loader to use the new scheduling logic (remove loader only after seen animation frame and quiet frames threshold). This prevents premature removal and visual glitches while preserving the existing fallback timer.
* small fonts should be used when --profile=small
* dont include large fonts on small profile + fix compress serving
* Refactor window initialization and caption sync
Extract sync_caption_bar_state and sync_caption_title from ensure_initialized and call them before the initialized early-return so caption bar state and title are kept in sync even when the widget is re-applied. ensure_initialized still performs the original one-time setup (pass, depth texture, demo frame), but runtime chrome (VR button and caption visibility/title) is now updated up-front to avoid stale UI state.
* fix --bindgen
* Set imports.env in wasm import patches
Add additional string replacements to ensure imports.env = env is injected into generated JS for different formatting variants of the __wbg_get_imports(...) call. This makes the patch robust to variations like missing const or spacing so the env object is always attached to the wasm imports.
* Revert "Set imports.env in wasm import patches"
This reverts commit 37933234d36b4ee867690cf167474638e81febf7.
* Revert "fix --bindgen"
This reverts commit cb236b202b92a46eda3cb1ee4c678bdf6507081a.
* Reapply "fix --bindgen"
This reverts commit 27df4175bd1889222b928ffb68213aa865d1c839.
* Reapply "Set imports.env in wasm import patches"
This reverts commit 23695b4fa646d8f1b7a31a3fc27eb92f5bce0cf8.
* fix xr compilation error
These are needed to support better formatting of Html code
that mixes multiple different styles together, e.g., inline code
next to normal code, or inline code within a blockquote or a heading.
Full summary of changes:
**File:** `draw/src/shader/draw_text.rs`
Added `#[live(0.0)] pub top_drop: f32` to `TextStyle`. This is a vertical offset expressed as a fraction of font size — positive values shift text downward. It's useful for aligning baselines when mixing fonts with different vertical metrics (e.g., a code font rendered inline with regular text).
**File:** `draw/src/shader/draw_text.rs`
When `temp_y_shift != 0`, the extra shift pixels are now added to `allocate_height()` and the emitted walk rect. This prevents containers (blockquotes, etc.) from clipping the descenders (g, p, q, y) of vertically-shifted text.
**File:** `widgets/src/text_flow.rs`
After selecting the appropriate text style (normal/bold/italic/fixed), `draw_text.temp_y_shift` is now set from that style's `top_drop` value. This allows each style variant to specify its own vertical offset, since `TextFlow` uses a single shared `DrawText` instance for all text rendering.
**File:** `draw/src/turtle.rs`
New public method to mutate `layout.padding.left` after a turtle has been created.
**File:** `widgets/src/text_flow.rs`
After drawing the bullet/number marker, the actual cursor position is now measured and `set_padding_left()` is called so that wrapped continuation lines align with the text after the marker, rather than being over-indented by the estimated `font_based_padding` (which was `2.5 * font_size`).
Additionally, the hardcoded `draw_text(cx, " ")` spacer after the marker was replaced with `walk_margin(cx, self.list_item_marker_pad)` for precise pixel-based control.
**File:** `widgets/src/text_flow.rs`
Added `#[live(5.0)] list_item_marker_pad: f64` — a configurable spacing (in pixels) between the list item marker (bullet/number) and the content text that follows it.
* Initial plan
* feat(platform): add window visuals API and M1 backdrop wiring
Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>
* feat(uizoo): add M2 GlassPanel widget and demo tab
Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>
* blue example
* Apply backdrop intensity and transparency
macOS: apply visuals.backdrop_intensity to the NSVisualEffectView alpha (clamped) so backdrop intensity affects the effect view.
Windows: honor visuals.backdrop_intensity by computing an alpha-packed accent color, toggle WS_EX_LAYERED for transparent windows, call SetLayeredWindowAttributes and DwmExtendFrameIntoClientArea when needed, and set the AccentPolicy accordingly (enable blur for transparent or non-none backdrops, set gradient_color based on intensity, and set accent_flags depending on DWM attribute result).
Tests: update expected backdrop_intensity in a unit test from 4.0/1.0 to 0.25 and assert a platform op is emitted. These changes ensure backdrop intensity and transparency settings are respected across platforms.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: wheregmis <26774729+wheregmis@users.noreply.github.com>
Video playback: extended API with volume, playback rate, seek ranges,
buffered ranges, can_play_type, audio-only mode. Unified player wrapping
native backend (AVPlayer/GStreamer/MediaFoundation) with software fallback.
YUV shader pipeline (BT.601/709/2020, NV12 biplanar, rotation).
Camera: V4L2 backend (Linux), expanded NDK Camera2 (Android), AVCapture
stream refactor (iOS/macOS) with shared session architecture. NV12
zero-copy paths on iOS (CVMetalTextureCache) and Android (AImage planes).
Camera preview modes (texture/native/auto).
Video encoding: H264 hardware encode on Apple (VideoToolbox) and Android
(MediaCodec). Camera-to-encoder pipeline with pixel buffer passthrough.
Media plugin system: externalized codec implementation via MediaPlugin
trait. MsePlayer, VideoFrameDecoder, MediaVideoEncoder, SoftwareVideoPlayer
interfaces. Runtime codec capability query and merge.
Includes camera example app.
Co-authored-by: ant <ant@offline.click>
* platform: popup window API with X11/Wayland support
- Add popup window type for context menus and dropdowns
- Wayland: xdg_popup with grab for compositor-driven dismiss
- X11: override-redirect windows with pointer grab
- Explicit-close semantics: app must handle PopupDismissed
- Fix Wayland crash on repeated context menu open/close
- Emit WindowClosed before PopupDismissed in PopupDone
* platform: native mobile selection handles
iOS: custom UIView selection handles with UIPanGestureRecognizer (all versions),
UITextSelectionDisplayInteraction for native highlights (iOS 16+),
MakepadSelectionRect for UITextInput protocol.
Android: custom SelectionHandleView with GradientDrawable oval, touch drag
listeners, JNI bridge for handle drag events.
Widgets: TextFlow clipboard action integration (show on touch up with selection,
hide on touch down/focus lost, TextCut handler), PortalList select-all and
clipboard actions, selection bounding rect computation for popup positioning.
Includes text_selection example app.
---------
Co-authored-by: ant <ant@offline.click>
- Android log levels: map log! macro levels to Android log priorities
(ERROR=6, WARN=5, INFO=4). Some devices suppress DEBUG by default.
- cargo-makepad android: show help text instead of panicking on missing
or invalid subcommand.
- Android build: discover .class files dynamically instead of hardcoding
~25 individual paths. Add Java 8 source/target flags.
- Remove deprecated AsyncTask import from MakepadNetwork.java.
- Studio stdout: add newline after JSON messages for JSON-lines parsing.
- Studio stdout: skip profiler timing in stdout mode to avoid overhead.
- Script thread: fix panic on empty call stack in call_has_me/call_has_try.
- Cursor: reset to Default on FingerHoverOut in TextFlow and TextInput.
Co-authored-by: ant <ant@offline.click>
Replace broad cx.load_all_script_resources() calls with a targeted cx.load_script_resource(handle) to only request the specific resource needed. Refactor script resource loading (platform/src/script/res.rs) by extracting load_script_resource_impl(handle, crate_manifests) and exposing load_script_resource(handle); keep load_all_script_resources() by iterating per-handle. Improve wasm handling: resolve web_url per-resource, set explicit error states when missing, and fire async HTTP requests safely. Remove an early call to load_all_script_resources() from web startup. Additional changes: serve precompressed .br files in the local wasm dev server (with COOP/COEP headers when threaded), add wasm-specific font/theme script entries for widgets, and update various callers (draw shaders, widgets, math_view, gltf/view_splat, image) to use the per-handle loader. These changes reduce unnecessary global loads and limit network/file operations to only required resources.