Skip to main content

Check Godot mobile UI metadata for touch targets, safe areas, and text overflow risk.

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

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.

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.

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.0.tar.gz (10.9 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.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: godot_mobile_ui_doctor-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 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.0.tar.gz
Algorithm Hash digest
SHA256 bdcaa9334c91b9765bf7fde566171a5e50f70cee6d0847da9b8d7184b6c1a321
MD5 1bee2c556193b5ff2fdd463cf36da24b
BLAKE2b-256 c70eb8dcbd46f2338f1b564fb1f8dcd8d66976d78d889c1e4e3aad47806af4aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_mobile_ui_doctor-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for godot_mobile_ui_doctor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8755157df71c72703d989a41a435595a4f9ebdc875f89528e32f91c4f065b58
MD5 62768af4e9cf9bd8402a4bc43627339f
BLAKE2b-256 1b6efae9d02e7b3163ab88d34c60e2452603e0d59a81dfaa287ebaea915825e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for godot_mobile_ui_doctor-0.1.0-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