GT-3064 Switch tract page rendering to the shared RenderTractPage composable - #4562
Draft
frett wants to merge 3 commits into
Draft
GT-3064 Switch tract page rendering to the shared RenderTractPage composable#4562frett wants to merge 3 commits into
frett wants to merge 3 commits into
Conversation
frett
force-pushed
the
composeTractPage
branch
2 times, most recently
from
August 19, 2026 22:40
e87da43 to
c00d5e7
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
indexOfFirst returns -1 for a missing id, which PagerAdapter interprets as POSITION_UNCHANGED, keeping a holder for a removed or renamed page alive and rebinding it at its stale index. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
frett
force-pushed
the
composeTractPage
branch
from
August 20, 2026 22:11
c00d5e7 to
7bd9733
Compare
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.
Replaces the view-based tract page rendering stack (
PageController/CardController/PageContentLayout) with the sharedRenderTractPagecomposable from godtools-shared.Changes
ManifestPagerAdapternow extendsViewHolderPagerAdapterdirectly, hosting oneComposeViewper page that rendersRenderTractPagewrapped inGodToolsTheme+ProvideRendererServices, with the page'sConstrainedStateLifecycleOwnerprovided asLocalLifecycleOwnerso primary-page gating of analytics and content events falls out of the existing lifecycle promotion.TractPageStateis hoisted per page id in the adapter:updatePage()preserves the active card across language switches, inbound live-shareNavigationEvents callnavigateToCard(), and card position survives rotation/process death via the sharedTractPageState.Saverin the view holder save/restore path.TractPageEvents map to existing behaviors:GoToNextPage→ page navigation,ActiveCardChanged(primary page only) → live-share publishing,OpenModal→ the existingModalOverlaycompose overlay,CardTapped/CardSwiped→ card feature-discovery settings. The first-card bounce hint is driven from lifecycle state + the feature-discovered flows.ScreenViewstate events; the host-sideTractPageAnalyticsScreenEventpost remains only for the tip-dismiss re-track (dismissing a bottom sheet doesn't cycle the page lifecycle).PageContentLayout,BounceInterpolator, the tract page/card/call-to-action layouts, now-dead databinding adapters, orphaned styles/dimens/drawable, unused module dependencies, and their tests (~1,900 lines removed).tract_card_previous/tract_card_nexttranslations are intentionally kept for the Crowdin port to godtools-shared, matching the tips migration.Dependencies
Depends on CruGlobal/kotlin-mpp-godtools-tool-parser#1230 — CI will fail until that PR is merged and a new
1.4.0-SNAPSHOTis published. Developed and verified locally against that branch via anincludeBuildsubstitution.Testing
:ui:tract-renderer,:ui:base-tool,:ui:cyoa-renderer,:ui:lesson-renderer, and:appunit tests pass:app:assembleProductionDebugbuilds🤖 Generated with Claude Code