You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document Tao dialog + CompositionLocal migration notes
Add Step 4 sub-sections covering:
- JewelDecoratedDialog now ships an extension on NucleusApplicationScope
that's required for the Tao backend.
- Parent CompositionLocals propagate across the Tao ComposeScene boundary,
so the double IntUiTheme wrap workaround is no longer needed.
Also add matching Troubleshooting entries for the two errors users were
hitting (NoClassDefFoundError on DecoratedDialogKt, No TextStyle provided
on Tao).
Copy file name to clipboardExpand all lines: docs/migration-2.0.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -272,6 +272,49 @@ The call site (inside `nucleusApplication { … }`) doesn't change — the recei
272
272
273
273
The plain Compose Desktop `Window` still works inside `nucleusApplication`, but you lose the unified `nucleusWindow` handle and the automatic restore-on-second-instance behavior described below.
274
274
275
+
### Dialogs follow the same rule
276
+
277
+
`JewelDecoratedDialog` ships in two flavours, mirroring `JewelDecoratedWindow`:
278
+
279
+
| Receiver | Backend support |
280
+
|---|---|
281
+
|`JewelDecoratedDialog(…)` (no receiver) | AWT only (JBR / JNI). Crashes on Tao with `NoClassDefFoundError: dev/nucleusframework/window/DecoratedDialogKt`. |
282
+
|`NucleusApplicationScope.JewelDecoratedDialog(…)`| Backend-agnostic. Dispatches to AWT or Tao under the hood. |
283
+
284
+
Use the scoped variant for anything composed inside `nucleusApplication { … }` — your "About", "Settings", and confirmation dialogs all need it:
JewelDecoratedDialog(onCloseRequest = onClose, title = "About") { … }
291
+
}
292
+
```
293
+
294
+
The same applies to `MaterialDecoratedDialog` / the generic `DecoratedDialog` extension on `NucleusApplicationScope`.
295
+
296
+
### CompositionLocals propagate across the Tao scene boundary
297
+
298
+
The Tao backend opens a fresh `ComposeScene` per window/dialog. As of 2.0.0-alpha-202605131305 the full parent `CompositionLocalContext` (theme, `LocalDensity`, `LocalLayoutDirection`, user locals, …) is bridged into the new scene automatically — same behavior as Compose's own `Dialog`/`Popup`.
299
+
300
+
This means you do **not** need to wrap content twice anymore:
301
+
302
+
```kotlin
303
+
// Before — needed on Tao to avoid "No TextStyle provided" / "No IsDarkTheme provided"
// After — a single wrap in the parent scope is enough on every backend
311
+
IntUiTheme(theme, styling) {
312
+
JewelDecoratedWindow(…) { …content… }
313
+
}
314
+
```
315
+
316
+
If you previously threaded `theme` / `styling` parameters through every custom window or dialog (`JewelOnboardingWindow`, `JewelAboutWindow`, …) to re-apply `IntUiTheme` inside the scene, you can drop the threading: read the theme from the outer scope once.
317
+
275
318
---
276
319
277
320
## Step 5 — Single Instance Is Automatic
@@ -420,6 +463,12 @@ Pass `enableSingleInstance = false` to `nucleusApplication`. The lock is skipped
420
463
**`Unresolved reference 'JewelDecoratedWindow'` even though the import is correct.**
421
464
The composable became an extension on `NucleusApplicationScope` in 2.0. Wrap-style helper composables must propagate the receiver — see [Step 4](#step-4--replace-window---with-decoratedwindow--).
422
465
466
+
**`NoClassDefFoundError: dev/nucleusframework/window/DecoratedDialogKt` on the Tao backend.**
467
+
You're calling the AWT-only `JewelDecoratedDialog` (no receiver) under `NucleusBackend.Tao`. Switch the host composable to an extension on `NucleusApplicationScope` so the call resolves to `NucleusApplicationScope.JewelDecoratedDialog`, which dispatches to the right backend — see [Step 4 → Dialogs](#dialogs-follow-the-same-rule).
468
+
469
+
**`IllegalStateException: No TextStyle provided` / `No IsDarkTheme provided` on Tao but not on AWT.**
470
+
Older Tao builds (pre-`v2.0.0-alpha-202605131225`) did not bridge `CompositionLocals` across the per-window `ComposeScene`. Bump to `2.0.0-alpha-202605131305` or newer and remove any duplicate `IntUiTheme { … }` you added inside the window/dialog content lambda — a single wrap in the outer scope is enough.
471
+
423
472
**`Could not find org.jetbrains.jewel:jewel-foundation:0.37.…`**
424
473
The IntelliJ snapshots repo is missing. Add `maven("https://www.jetbrains.com/intellij-repository/snapshots")` to `dependencyResolutionManagement.repositories` — see [Prerequisites](#prerequisites).
0 commit comments