Repository navigation
refactor: per-destination top bar and shared DevView UI kit - #159
MaxMichel2 wants to merge 2 commits into
Conversation
Keep titles, navigation and labelled actions inside each Navigation3 entry so their content and chrome transition together. Pass the displayed key to action callbacks and confirm resets before clearing mocks. Preserve measured module insets and isolate transient confirmations during navigation. Validation: core 15 device tests pass; core, Analytics, Console and NetworkMock host tests pass; sample debug builds and is installed; toolbar labels and Reset confirmation checked in light/dark via UI dumps; Konsist, Detekt, metalava signature/compatibility and diff checks pass. Graphify update attempted but refused by its missing semantic-node guard; existing graph retained.
Share filter, recovery and grouping patterns through the public core UI package. Give the home screen distinct, theme-toned module tiles, useful subtitles and animated tile colours while preserving explicit host overrides. Add local PNG/XML capture tooling to keep visual checks out of chat image limits. Validation: six module Android host suites passed; 18 core device tests passed; Konsist, Detekt, API generation/compatibility and sample debug build passed. Settled home captures checked in light and dark; capture PNG self-test passed. Graph refreshed with unchanged documentation nodes recovered and references validated; clustered reports/wiki remain from the earlier build. Native iOS execution remains untested.
| var steps by remember(key1 = content.operationUiModel.descriptor.key) { | ||
| mutableStateOf( | ||
| value = (content.operationUiModel.currentState as? OperationMockState.Sequence) | ||
| ?.responses | ||
| .orEmpty() | ||
| .toPersistentList() | ||
| ) |
There was a problem hiding this comment.
Tab changes erase unfinished sequences
SequenceBuilderPage keeps its draft in remember, but AnimatedContent removes the page after switching tabs. Returning to Sequence starts from the saved sequence again, losing unsaved additions or removals. Keep the draft above the page switch and clear it only on Cancel, Save, or dismissal.
| val longestLine = remember(key1 = lines) { lines.maxByOrNull { it.length }.orEmpty() } | ||
| val textMeasurer = rememberTextMeasurer() | ||
| val textStyle = MaterialTheme.typography.bodySmall.copy(fontFamily = FontFamily.Monospace) | ||
| val textWidth = remember(key1 = longestLine, key2 = textMeasurer, key3 = textStyle) { | ||
| textMeasurer | ||
| .measure( | ||
| text = longestLine, |
There was a problem hiding this comment.
Wide characters can be clipped
The pane width comes from the line with the most characters, not the widest rendered line. A shorter line with CJK text or emoji can be wider even with FontFamily.Monospace, since those characters can use fallback fonts. That line is clipped by the shared width, and horizontal scrolling cannot reveal its end. Calculate the widest rendered line and add a mixed-character test.
| property public androidx.compose.ui.graphics.vector.ImageVector icon; | ||
| property public String moduleName; | ||
| property public kotlin.jvm.functions.Function1<kotlinx.serialization.modules.PolymorphicModuleBuilder<androidx.navigation3.runtime.NavKey>,kotlin.Unit> registerSerializers; | ||
| property public com.worldline.devview.core.Section section; | ||
| property public String subtitle; |
There was a problem hiding this comment.
Analytics now declares public icon, moduleName, and subtitle properties, but docs/modules/analytics.md is unchanged. The repository guide requires updating docs/modules/<module>.md when a module's public API changes. The same gap affects Console and Feature Flip, and appears elsewhere too. Update the affected module pages or explicitly explain why no update is needed. This repository requirement must be satisfied before merging.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Dependency and scope
Depends on #157 (informational, not enforced by GitHub). Merge #157 first, then this PR.
The description covers only checkpoints 1–2 against #157's source commit
a6bcca4dc4513347c892b54488435bed190efd7c. The merge target ismain, as requested. Until #157 lands, GitHub's merge diff also includes its inherited changes. A squash/rebase merge of #157 may require an explicitly approved restack. No existing PR was retargeted and no gh-stack metadata was created.Validation
Native iOS execution, TalkBack and enlarged-font walkthrough remain for later validation. The sample's light status-bar contrast fix is scheduled in checkpoint 9.
Excluded local changes:
DEVELOPER-TOOLING-ROADMAP.md, graph cache/build-state artifacts and local capture files.Satisfy the required module-page updates before merging; the sequence-draft and preview-width issues are non-blocking.
Findings
Summary
Moves each destination's toolbar into its navigation entry and adds the shared DevView UI kit.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[DevView backstack] --> B[NavDisplay entry] B --> C[Saved state and ViewModel decorators] C --> D[DestinationScaffold] D --> E[Entry title and labelled actions] D --> F[Entry content] F --> G[Module registration with measured bottom inset] E --> H{Action kind} H --> I[Menu] H --> J[Confirmation] H --> K[Callback with displayed NavKey] J --> KReviews (1) · Last reviewed commit: ":sparkles: Add public DevView UI kit and..." · Reviewed by Greptile