Skip to content

chore: update tests, UIText infrastructure, and string resources (part-5) [WPB-20393]#4579

Open
MohamadJaara wants to merge 1 commit intomo/chore/update-kotlin-part-4from
mo/chore/update-kotlin-part-5
Open

chore: update tests, UIText infrastructure, and string resources (part-5) [WPB-20393]#4579
MohamadJaara wants to merge 1 commit intomo/chore/update-kotlin-part-4from
mo/chore/update-kotlin-part-5

Conversation

@MohamadJaara
Copy link
Member


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

  • Update navigation test extensions across all modules
  • Update navigation utility and tablet dialog route policy tests
  • Update ViewModel tests for new navigation API compatibility
  • Update UIText, SectionHeader, and related UI infrastructure
  • Update string resources across locales
  • Add ADR for tablet dialog navigation parity

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.

Notes (Optional)

Specify here any other facts that you think are important for this issue.

Attachments (Optional)

Attachments like images, videos, etc. (drag and drop in the text box)


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

- Update navigation test extensions across all modules
- Update navigation utility and tablet dialog route policy tests
- Update ViewModel tests for new navigation API compatibility
- Update UIText, SectionHeader, and related UI infrastructure
- Update string resources across locales
- Add ADR for tablet dialog navigation parity
@AndroidBob
Copy link
Collaborator

New ADR(s) in this PR 📚:

10. Tablet dialog navigation parity after Compose Destinations upgrade

Date: 2026-02-06

Status

Accepted

Context

Before the Kotlin/navigation migration (commit 18a563754), the app used DestinationStyle.Runtime and AdjustDestinationStylesForTablets() to switch 17 destinations at runtime:

  • tablet -> DialogNavigation
  • phone -> SlideNavigationAnimation or PopUpNavigationAnimation

After the migration, generated destination styles became immutable (val style), so mutating Destination.style at runtime was no longer possible. This caused tablet screens to be shown as phone-style transitions, and not as true dialogs.

We also need to preserve:

  • true dialog presentation semantics on tablet (not only animation changes)
  • existing phone behavior for the same destinations
  • one source of truth for the target destinations

Decision

We introduced an app-level nav host engine wrapper and centralized route policy:

  1. WireNavHostEngine (app module) mirrors default Compose Destinations engine behavior.
  2. For each destination registration, style is resolved by resolveTabletDialogParityStyle(...):
    • if tablet + route is in parity list -> force DialogNavigation
    • otherwise -> keep existing behavior (manualAnimation ?: destination.style)
  3. The parity list of 17 routes is defined in TabletDialogRoutePolicy.
  4. TabletDialogWrapper receives the same route matcher and applies rounded clipping for tablet parity routes as well, so visual corners match dialog expectations.

Implementation files:

  • app/src/main/kotlin/com/wire/android/navigation/WireNavHostEngine.kt
  • app/src/main/kotlin/com/wire/android/navigation/TabletDialogRoutePolicy.kt
  • core/navigation/src/main/kotlin/com/wire/android/navigation/wrapper/TabletDialogWrapper.kt

Both app nav hosts use rememberWireNavHostEngine(...):

  • MainNavHost
  • nested host in HomeScreen

Consequences

Positive

  • Restores pre-migration tablet behavior for the 17 destinations as true dialogs.
  • Preserves phone behavior without changing navigation call sites.
  • Keeps route ownership centralized, making future additions/removals explicit.
  • Keeps compatibility with Compose Destinations 2.3.x immutable destination style generation.

Trade-offs

  • We maintain a small custom engine implementation that mirrors upstream behavior and should be kept in sync when upgrading Compose Destinations.
  • Wrapper clipping now depends on an injected route matcher, which is another integration point to keep aligned with route policy.

Maintenance rules

When adding/removing tablet dialog parity screens:

  1. Update TabletDialogRoutePolicy.destinationBaseRoutes.
  2. Add/update tests in TabletDialogRoutePolicyTest.
  3. Verify both tablet and phone behavior manually.

When upgrading Compose Destinations:

  1. Diff upstream default engine behavior against WireNavHostEngine.
  2. Re-validate style resolution and manual animation precedence.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 7, 2026

@MohamadJaara MohamadJaara changed the title chore: update tests, UIText infrastructure, and string resources chore: update tests, UIText infrastructure, and string resources (part-5) Feb 8, 2026
@MohamadJaara MohamadJaara changed the title chore: update tests, UIText infrastructure, and string resources (part-5) chore: update tests, UIText infrastructure, and string resources (part-5) [WPB-20393] Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants