Skip to content

Feat: Serve DefaultIcons from material3 as Icons.Default - #50

Merged
b-re-w merged 2 commits into
developfrom
work/default-icons
Oct 3, 2026
Merged

b-re-w merged 2 commits into
developfrom
work/default-icons

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 3, 2026

Copy link
Copy Markdown
Member

Refs #9

from pythonx.compose.material3 import DefaultIcons now gives Kotlin's Icons.Default (INTENT §5.7). This uses a new renaming path alias in the manifest, { DefaultIcons = "Icons.Default" }, which is data, not code, plus new material and material.icons module rows. The path is read on every access, matching the binder's uncached static getter. The stubs type DefaultIcons as Icons.Filled; Add is still Any upstream (python-multiplatform #68).

Notebook mismatch: the notebook writes DefaultIcons.Add(). Add is a property, so DefaultIcons.Add works and Add() is a TypeError. This is pinned by a test, recorded in SPEC, and raised with the lead.

Test added: 11 alias tests plus manifest, stub and mypy tests. Red: 17 failed. The disable check fails 4.

Environment (worktree) Before After
python-multiplatform 31c092f0 202 passed, 1 skipped 221 passed, 1 skipped
no checkout 116 passed, 87 skipped 124 passed, 98 skipped

Drafted by a subagent; reviewed here. Fake host only; drawing the icon is python-multiplatform's render test.

b-re-w added 2 commits October 3, 2026 14:21
INTENT 5.7: the notebook imports DefaultIcons from pythonx.compose.material3
and means Kotlin's Icons.Default. The binder now walks material-icons-core
(python-multiplatform #37/#38): Icons.Default is a static getter declared
Icons.Filled, and each icon (Add) is an extension property getter on it.

- New manifest rows: pythonx.compose.material and
  pythonx.compose.material.icons, each a one-line re-export.
- [aliases] gains a renaming, path form -- still data, no per-name code:
  "pythonx.compose.material.icons" = { DefaultIcons = "Icons.Default" }.
  The list form is unchanged. A bare-name alias is resolved once and kept; a
  dotted path is read on every access, because the binder serves
  Icons.Default as an uncached static getter.
- gen_stubs.py emits the path alias, so DefaultIcons type-checks as
  Icons.Filled; the icons stubs come from the run 37098191598 artefact, where
  Add is still typed Any (python-multiplatform #68).

The notebook writes DefaultIcons.Add() with parentheses. Add is a property,
read without them like every constant since python-multiplatform 46be0212,
so DefaultIcons.Add works and DefaultIcons.Add() is a TypeError; a test pins
it and SPEC says so. Raised with the ecosystem lead as a spelling decision.

Drafted by a subagent in a worktree; reviewed here. Tested against the fake
host only; drawing the icon is python-multiplatform's render test.

feature added: path aliases, the icons module, DefaultIcons.
test added: DefaultIconsAlias (11), manifest alias checks, a renamed-alias stub
test, a committed-icons-stub test, mypy cases. Red: 9 + 1 + 7 failed.
Neutering the path step fails 4.
documentation corrected: SPEC 0/1.2/2/S5.3/8, PROJECT.md, guide, README and
README_ko.
Suite with python-multiplatform 31c092f0 (worktree): 202 passed, 1 skipped ->
221 passed, 1 skipped; without a checkout, 116 passed, 87 skipped -> 124
passed, 98 skipped. check_guide.py: 0.

Refs #9
…elling

Decided with the ecosystem lead: Add is read without parentheses, like every
constant, and the notebook's Add() is the spelling of its time. SPEC section 8
now says so in one line; the notebook itself is not touched.

documentation corrected: SPEC section 8. Tests unchanged.

Refs #9
@b-re-w
b-re-w merged commit 0d5f3be into develop Oct 3, 2026
5 checks passed
@b-re-w
b-re-w deleted the work/default-icons branch October 3, 2026 10:20
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.

1 participant