Skip to content

Conversation

@david-livefront
Copy link
Collaborator

🎟️ Tracking

N/A

📔 Objective

This PR updates the screen transitions to be push in the correct direction when the using an RTL language.
Transition names were updated to reflect this change.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@david-livefront david-livefront marked this pull request as ready for review November 13, 2025 15:24
onDimNavBarRequest: (Boolean) -> Unit,
) {
composable<GeneratorRoute.Standard> {
composableWithRootPushTransitions<GeneratorRoute.Standard> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also noticed that this screen did not have the right transitions applied.

@claude
Copy link
Contributor

claude bot commented Nov 13, 2025

Claude finished @david-livefront's task —— View job


Code Review: RTL Transitions

Overall Assessment: APPROVE

This PR correctly addresses RTL transition direction issues by replacing directional APIs with layout-aware ones. The changes are well-executed with proper naming consistency.


Key Changes

Finding 1: Transition naming improved from pushLeft/pushRight to pushToStart/pushToEnd with accurate documentation

The renaming from directional terms (left/right) to layout-aware terms (start/end) is excellent. Documentation now correctly describes both the origin and direction:

  • "Slides the new screen in from the start (left) of the screen towards the end (right)" ✓
  • "Slides the current screen out to the end (right) of the screen towards the start (left)" ✓
💭 Documentation clarity consideration

The parenthetical "(left)" and "(right)" in comments are LTR-centric. While helpful for most developers, they technically describe LTR behavior only. In RTL layouts, "start" is right and "end" is left.

Consider:

/**
 * Slides the new screen in from the layout start towards the layout end.
 * In LTR: left → right. In RTL: right → left.
 */

This is minor since the current docs are clear enough, but it would be more technically precise.

Finding 2: API migration from slideInHorizontally/slideOutHorizontally to slideIntoContainer/slideOutOfContainer properly handles RTL

The change from offset-based APIs to direction-based APIs is correct:

Before (RTL-unaware):

slideInHorizontally(initialOffsetX = { fullWidth -> -fullWidth / 2 })

After (RTL-aware):

slideIntoContainer(
    towards = AnimatedContentTransitionScope.SlideDirection.Start,
    initialOffset = { fullWidth -> fullWidth / 2 }
)

The SlideDirection enum automatically handles RTL layout direction, so SlideDirection.Start will slide from right-to-left in RTL locales.

Finding 3: GeneratorNavigation.kt now uses proper transition wrapper

Changed from plain composable<GeneratorRoute.Standard> to composableWithRootPushTransitions<GeneratorRoute.Standard>, which is consistent with the pattern used elsewhere and ensures the screen gets proper push transitions (as noted in the author's comment at app/src/main/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/GeneratorNavigation.kt:95).


Verification

✓ All references to old naming (pushLeft, pushRight) successfully removed
✓ Transition direction logic correctly inverted for enter/exit pairs
✓ Generator screen now has consistent transitions with other root screens
✓ Changes follow established patterns in NavGraphBuilderExtensions.kt
✓ No test updates needed (transition utilities lack test coverage)


@github-actions
Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details4e662ef8-681a-4c72-b491-0b9c56bc1cd6

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.99%. Comparing base (7a40bfe) to head (edd10bf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6166   +/-   ##
=======================================
  Coverage   84.99%   84.99%           
=======================================
  Files         723      723           
  Lines       52854    52854           
  Branches     7676     7676           
=======================================
  Hits        44925    44925           
  Misses       5246     5246           
  Partials     2683     2683           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@david-livefront
Copy link
Collaborator Author

Thanks @SaintPatrck

@david-livefront david-livefront added this pull request to the merge queue Nov 13, 2025
Merged via the queue into main with commit 55c7ab4 Nov 13, 2025
18 of 20 checks passed
@david-livefront david-livefront deleted the fix-rtl-transitions branch November 13, 2025 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants