Skip to main content

Check Godot mobile UI metadata for safe areas, touch targets, text overflow, overlays, and readiness reports.

Project description

Godot Mobile UI Doctor

godot-mobile-ui-doctor checks exported Godot UI metadata for common mobile layout risks: small touch targets, cramped controls, safe-area overlap, off-screen nodes, duplicate ids, and text that is likely to overflow its rectangle.

The first version reads JSON metadata, so it can run in CI without opening the Godot editor. Projects can generate the metadata from their own debug tools, test harnesses, editor scripts, or screenshot pipelines.

Install

python -m pip install godot-mobile-ui-doctor

From a source checkout:

python -m pip install -e .\godot-mobile-ui-doctor

Quick Start

godot-mobile-ui-doctor examples\tiny-mobile-ui-project\mobile-ui.json --format markdown

Fail CI when warnings are present:

godot-mobile-ui-doctor mobile-ui.json --fail-on warning --format json --output reports\mobile-ui.json

Build a screen-by-screen readiness matrix:

godot-mobile-ui-doctor matrix mobile-ui.json --format markdown --output reports\mobile-ui-matrix.md

Render PNG overlays for quick visual review:

godot-mobile-ui-doctor overlays mobile-ui.json --output-dir reports\mobile-ui-overlays --fail-on none

Combine the UI matrix with nearby mobile release reports:

godot-mobile-ui-doctor readiness mobile-ui.json --input-report reports\input-map.json --export-report reports\export.json --mobile-perf-report reports\mobile-perf.json --format markdown --output reports\mobile-readiness.md

Reuse viewport definitions from a visual smoke capture plan:

godot-visual-smoke plan visual-smoke.toml --project . --format json --output reports\visual-plan.json
godot-mobile-ui-doctor matrix mobile-ui.json --visual-smoke-plan reports\visual-plan.json --format markdown
godot-mobile-ui-doctor overlays mobile-ui.json --visual-smoke-plan reports\visual-plan.json --output-dir reports\mobile-ui-overlays
godot-mobile-ui-doctor readiness mobile-ui.json --visual-smoke-plan reports\visual-plan.json --visual-smoke-report reports\visual-plan.json --format markdown

Metadata Shape

{
  "thresholds": {
    "min_touch_size": 44,
    "min_touch_spacing": 8
  },
  "viewports": [
    {
      "name": "portrait_phone",
      "width": 720,
      "height": 1280,
      "safe_area": {"left": 0, "top": 48, "right": 0, "bottom": 24}
    }
  ],
  "screens": [
    {
      "name": "main_menu",
      "viewport": "portrait_phone",
      "nodes": [
        {
          "id": "play",
          "kind": "button",
          "x": 24,
          "y": 96,
          "width": 44,
          "height": 44,
          "text": "Play",
          "interactive": true
        }
      ]
    }
  ]
}

Coordinates are expected to be viewport pixels after layout. The tool does not need scene files or a Godot binary for this first metadata-based check.

If the UI metadata omits viewports, pass --visual-smoke-plan with JSON from godot-visual-smoke plan --format json. Viewports in mobile-ui.json override matching visual-smoke viewport names, so project-specific layout exports can still take precedence.

Checks

  • missing_viewport: a screen references a viewport that was not exported.
  • duplicate_node_id: a screen repeats a node id.
  • node_outside_viewport: a node rectangle leaves the viewport bounds.
  • safe_area_overlap: an important node overlaps a safe-area inset.
  • touch_target_too_small: an interactive node is smaller than the configured target size.
  • touch_targets_too_close: interactive rectangles are too close together.
  • text_overflow_risk: text is unlikely to fit in the exported rectangle.
  • no_interactive_controls: a screen has no interactive controls in the metadata.

Outputs

  • text: readable terminal report.
  • json: CI and scripts.
  • markdown: PR comments, release notes, and report artifacts.
  • png: optional overlay previews from the overlays command.

JSON reports include the package version, a schema version, and a rule catalog. Findings include stable rule_id values plus rule_title and rule_help fields, so CI comments and local scripts can explain what to check next.

Mobile Readiness Matrix

The matrix command groups findings by screen and viewport. It is useful when a project has several phone and tablet captures and you want a quick table showing which screens are clean, which need review, and which need action.

The matrix includes safe-area, touch-target, spacing, text-fit, and viewport bounds status for each screen.

Overlay Previews

The overlays command writes one PNG per screen and viewport. It draws the safe-area rectangle, exported control bounds, interactive touch targets, and any rule ids attached to a control. The output is useful for PR artifacts because a reviewer can see the risky rectangles without opening the Godot project.

godot-mobile-ui-doctor overlays mobile-ui.json --output-dir reports\mobile-ui-overlays --scale 0.5 --fail-on none
godot-mobile-ui-doctor overlays mobile-ui.json --screenshot-dir reports\screenshots --output-dir reports\mobile-ui-overlays --fail-on none

Mobile UI overlay preview

If --screenshot-dir is supplied, the command looks for PNGs named screen__viewport.png or screen.png and draws the overlay on top of the captured screen. Screens without a matching screenshot still use the plain grid background.

Combined Readiness

The readiness command builds on the screen matrix and can include JSON reports from related toolkit checks:

  • --input-report from godot-input-audit
  • --export-report from godot-export-doctor
  • --localization-report from godot-l10n-guard
  • --mobile-perf-report from godot-mobile-perf-doctor
  • --visual-smoke-report from godot-visual-smoke

This gives a compact mobile release review: portrait UI risks, touch/input coverage, export settings, localization expansion risk, static mobile performance warnings, and screenshot-plan status in one report. Linked reports include their top findings so a reviewer can see the first actions without opening every JSON file. Repeated rule ids are also grouped, which helps show whether a linked report is failing because of one repeated setup problem or a mix of unrelated issues.

How To Export Metadata

The tool deliberately keeps the input format simple. A project-specific exporter can walk visible Control nodes after layout and write each node's id, class, global rectangle, visible text, font size, and whether it is interactive.

Good ids are stable names such as cargo_buy_button or settings_back, not generated scene-instance paths. Stable ids make reports easier to compare across runs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

godot_mobile_ui_doctor-0.1.8.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

godot_mobile_ui_doctor-0.1.8-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file godot_mobile_ui_doctor-0.1.8.tar.gz.

File metadata

  • Download URL: godot_mobile_ui_doctor-0.1.8.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for godot_mobile_ui_doctor-0.1.8.tar.gz
Algorithm Hash digest
SHA256 e5fd5a611d31c1b51f962a781c70be8f43366e79719e3c4c65061ec997c3716c
MD5 84d06d9732c451a7583c5fcbedce9c47
BLAKE2b-256 8ff7415bde9efb68d0bbe5bdeeaaaeaf9cb85865b2c24098fbbe969751d601ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_mobile_ui_doctor-0.1.8.tar.gz:

Publisher: publish-mobile-ui-doctor.yml on NonniGB/godot-production-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file godot_mobile_ui_doctor-0.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for godot_mobile_ui_doctor-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7d7b9e5eaed11b5cd2fe27f209b6d69ebd9dce92b7adab19022996e1a4d752e7
MD5 468626f8f78bbfd0f47d6d77d229f534
BLAKE2b-256 5b9a4bed2c62c84ac83d77229cfb1ebd4d1a9d6fddaf58f01dba10e82ac7f71b

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_mobile_ui_doctor-0.1.8-py3-none-any.whl:

Publisher: publish-mobile-ui-doctor.yml on NonniGB/godot-production-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page