feat: [DEV-1180] NoCodes — typed defaultVariables on the loadScreen entity, remove onScreenShown overloads#838
Merged
SpertsyanKM merged 4 commits intoJul 16, 2026
Conversation
…ve onScreenShown overloads Rework of the DEV-1167 exposure API (prerelease-only, no public breaking change): - QNoCodeScreen gains defaultVariables + defaultVariable(key) lookup, mapped from the screen payload in loadScreen. - QScreenVariable gains Kind (Custom | Product | Unknown) with tolerant mapping: a missing kind (pre-DEV-1180 payload) defaults to Custom, an unknown kind maps to Unknown instead of failing the screen load. The value is now a typed sealed class (Bool / Str / Num / None) instead of Any?. - The onScreenShown(screenId, products) and (screenId, products, variables) overloads are removed from NoCodesDelegate, the wrapper and the fragment call chain; only the id-only callback remains. The wrapper now overrides the id-only callback to keep main-thread posting. - products is removed from the internal NoCodeScreen DTO and ScreenMapper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015YXuzBxSjRGXowA2ovkXx2
…reen
The sample still overrode the removed 3-arg onScreenShown ('overrides
nothing' compile error — caught in review; :sample is not compiled by
pr-checks). The screen-shown handler is now id-only, and the load-then-show
flow showcases the new API instead: it logs the typed defaultVariables
(kind, key, sealed-class value) from the loaded QNoCodeScreen before
presenting.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015YXuzBxSjRGXowA2ovkXx2
Review feedback from testing: - QScreenVariable.Kind gains SelectedProduct (wire: selected_product) — the screen's Default Product, key always default_selected_product. - defaultVariable(key, kind) — keys are only unique within a kind (a custom variable and a product slot may share a name), so the lookup accepts an optional kind filter (@jvmoverloads for Java callers). - QScreenVariableValue.asString() renders any value as a plain string (bools as true/false, integral numbers without a trailing .0, None as ""). - Sample logs variables via asString(). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015YXuzBxSjRGXowA2ovkXx2
The selected_product entry's key is an internal wire detail — consumers should not need a magic string or a kind-only scan. The typed shortcut resolves the builder's Default Product directly (null when none configured). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015YXuzBxSjRGXowA2ovkXx2
SpertsyanKM
deleted the
kamo/dev-1180-nocodes-sdk-rework-paywall-data-exposure-typed
branch
July 16, 2026 09:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: DEV-1180
Android counterpart of qonversion/qonversion-ios-sdk#702 — rework of the DEV-1167 exposure API (#830/#831). That API shipped only in
prerelease-nocodes/1.10.0— the latest public release No-Codes 1.9.3 does not contain it, so removing it is not a public breaking change.What changed
QNoCodeScreen.defaultVariables— typed default variables configured in the builder, plus adefaultVariable(key)lookup; mapped from the payload inloadScreen.QScreenVariable.kind(Custom/Product/Unknown) with tolerant mapping: missing kind (pre-DEV-1180 payload) →Custom, unknown kind (future backend) →Unknown.valueis now a typed sealed class (Bool/Str/Num/None) instead ofAny?— never publicly released, so free to change.onScreenShown(screenId, products)and(screenId, products, variables)are gone fromNoCodesDelegate,NoCodesDelegateWrapperand theScreenContract/ScreenPresenter/ScreenFragmentchain; only the id-only callback remains (the wrapper now overrides it to keep main-thread posting).productsremoved from the internalNoCodeScreenDTO andScreenMapper.Wire compatibility
Payload key stays
variables(additivekindper entry);productskey dropped. Backend counterparts: qonversion/dash-mono#556, qonversion/configurator#259, qonversion/api-gateway#580.Testing
:nocodes:compileReleaseKotlin+ rootdetektAllclean;:nocodes/:sdkunit tests green.Part of DEV-1180
🤖 Generated with Claude Code
https://claude.ai/code/session_015YXuzBxSjRGXowA2ovkXx2