Skip to content

Prelaunch - #4

Merged
devsnackio merged 7 commits into
mainfrom
prelaunch/repo-fixes
Aug 18, 2026
Merged

devsnackio merged 7 commits into
mainfrom
prelaunch/repo-fixes

Conversation

@devsnackio

Copy link
Copy Markdown
Owner

What this changes

QA gate

All three must pass — CI runs exactly this set. Run them locally first
(export JAVA_HOME=<JBR> before ./gradlew, or the wrapper fails):

  • ./gradlew :core:testAndroidHostTest :components:testAndroidHostTest
  • ./gradlew :core:compileKotlinWasmJs :components:compileKotlinWasmJs
  • ./gradlew :sample:assembleDebug

Conventions

  • KDoc on every public declaration, @param on every parameter
  • New public APIs annotated @ExperimentalFormaUiApi
  • No hardcoded dp — FormaSpacing tokens only
  • Nothing platform-specific in commonMain (it would break the wasmJs target)
  • Accessibility: 48dp touch targets, contentDescription on icon-only content, correct
    semantics roles
  • Screenshots or a recording for anything visual (light and dark)

For a new or changed component

Delete this section for docs-only or infrastructure changes.

  • Full variant and state coverage
  • @Preview covering all variants
  • Robolectric test in src/androidHostTest (@Config(sdk = [34]), JUnit asserts) that renders
    and asserts on at least one state change
  • docs/component-inventory.json updated, and docs/formaui-reference.md regenerated with
    python3 docs/gen-reference.py . — never hand-edited
  • Registered in preview-wasm/…/PreviewRegistry.kt under the same id
  • Added to the :sample showcase
  • Underlying M3 colors / textStyle parameters forwarded
  • README.md component table and count updated

Anything user-visible

  • CHANGELOG.md updated under the unreleased heading
  • Breaking change? Say so explicitly here, and what callers must do:

FormaSpacing's KDoc said "every value is overridable" and FormaTheme's told
callers to provide LocalFormaSpacing themselves. Neither worked: that
composition local is internal, and FormaTheme provided a fresh FormaSpacing()
over whatever was supplied from outside. You could construct a custom scale;
you could not install one.

Add `spacing: FormaSpacing = FormaTheme.defaultSpacing()` and pass it through,
alongside a defaultSpacing() accessor matching the other three. Additive and
source-compatible, and it makes the override surface genuinely wider than
Material 3's colour/type/shape.
The javadocJar task set a classifier and no source, so every release through
0.2.0 published a 261-byte stub next to 2,344 lines of KDoc. Wire up Dokka
2.2.0 and pack dokkaGeneratePublicationHtml into the jar: :core goes from 261
bytes to 605 KB across 115 pages, :components to 1.3 MB.

Central only checks that a -javadoc.jar exists, which is why this went
unnoticed.
The mavenLocal() block was scoped to org.jetbrains.compose.ui:ui-tooling-preview
as a workaround for an SSL-inspecting proxy, and shipped a comment saying "on
this machine" in a public repo. It was also dead: those artifacts are not in the
local ~/.m2 at all and resolve from Maven Central directly. The full gate passes
with --refresh-dependencies without it.

SECURITY.md still named 0.1.x as the supported line after 0.2.0 shipped.
sample/src/main/res/ had no mipmaps and the manifest declared no icon, so the
showcase app installed as the default green robot — visible in any screenshot
or screen recording that shows the launcher or recents.

Adds an adaptive icon (plus monochrome layer) built from the FormaUI mark as a
vector drawable for API 26+, and rasterised PNGs at five densities for API
24-25, which :sample still supports. docs/gen-launcher-icons.py regenerates the
PNGs from the same geometry as docs/assets/formaui-mark.svg.
The README showed a logo and nothing else — a visual library with no picture of
itself, which also blocked the GitHub social preview and every channel that
renders a card.

ChartTestCapture's captureNodeToImage() already solved the hard part for the
chart pixel tests: a View.draw software capture, since captureToImage() cannot
work under Robolectric. It takes any SemanticsNodeInteraction, so the same
mechanism renders whole boards with no emulator and no device.

ShowcaseScreenshotTest composes four boards and asserts each one actually
painted before writing it, because a correctly-sized blank PNG is the exact
failure ChartPixelRenderTest was written for. gen-marketing-assets.py then
composites them into the README hero, the theme-toggle GIF, the Material 3
comparison and the 1280x640 social preview.

The comparison uses genuine androidx.compose.material3 widgets on the "before"
side rather than unwrapped FormaUI ones: FormaUI's per-component defaults fall
back to FormaShapes() outside FormaTheme, so an unwrapped FormaButton keeps its
8dp corners and would have overstated the difference with something a reader
could disprove by running the same code.
Applies the prepared merged README, with corrections for what actually shipped:

- The theming section documents the new `spacing` parameter, and no longer says
  the 4dp grid is "a fixed contract, not a parameter."
- Drops "distinctive" and unqualified "fully overridable" in favour of the
  claims that survive inspection.
- Answers the AndroidX-Compose-BOM question with a tested result rather than
  leaving it to the first commenter: a stock BOM 2026.08.00 / AGP 9.3.1 app
  with dev.formaui:components:0.2.0 added compiles, dexes and packages with no
  exclusions, because the org.jetbrains.compose artifacts depend on the androidx
  ones rather than duplicating them.
- Test counts re-measured: 288 tests across 47 files, 8,429 lines of test code
  against 6,780 of implementation. The previous figures predate this branch,
  and their implementation count silently excluded 3,007 lines of @Preview code
  — now stated rather than omitted.
- Adds the screenshots and a CI build badge.
Route B's dry run told you to confirm a `-javadoc.jar` was present. It always
was — as a 261-byte stub, for five consecutive releases. A presence-only check
is exactly the check that cannot catch an empty jar, so the step now asks for
the entry count.

Also names the javadoc jar as Dokka-packed in the "how publishing works"
section, which is true as of the previous commit and wasn't before.
@devsnackio
devsnackio merged commit 16e1830 into main Aug 18, 2026
1 check passed
@devsnackio
devsnackio deleted the prelaunch/repo-fixes branch August 18, 2026 14:59
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