Skip to content

Bugfix FXIOS-15400 [Translation Phase 2] Action sheet UX improvements – bold title, smart placement, single-language auto-translate#33013

Open
razvanlitianu wants to merge 6 commits intomainfrom
rlitianu/fxios-15330-translation-action-sheet-ux
Open

Bugfix FXIOS-15400 [Translation Phase 2] Action sheet UX improvements – bold title, smart placement, single-language auto-translate#33013
razvanlitianu wants to merge 6 commits intomainfrom
rlitianu/fxios-15330-translation-action-sheet-ux

Conversation

@razvanlitianu
Copy link
Copy Markdown
Collaborator

@razvanlitianu razvanlitianu commented Apr 9, 2026

📜 Tickets

Jira ticket
Github issue

💡 Description

Fix UX issues in Translation Action Sheet
Bold title. Uses an attributed string (attributedTitle via KVC) to match the visual weight of system alerts
Improved popover positioning. Anchors to the toolbar button with directional arrow ([.up, .down]); skips center fallback on iOS 16+ where the system handles placement
Single-language shortcut: If only one preferred language is set, skips the picker and triggers translation directly

🎥 Demos

Before After
Demo

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

@mobiletest-ci-bot
Copy link
Copy Markdown

mobiletest-ci-bot commented Apr 9, 2026

Messages
📖 Project coverage: 41.11%

💪 Quality guardian

1 tests files modified. You're a champion of test coverage! 🚀

🥇 Perfect PR size

Smaller PRs are easier to review. Thanks for making life easy for reviewers! ✨

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

🦊 BrowserViewController Check

We’re tracking the size of BrowserViewController.swift to keep it healthy.

  • ✨ Change in file size: +16 lines

✅ New file code coverage

No new file detected so code coverage gate wasn't ran.

Client.app: Coverage: 39.41

File Coverage
BrowserViewController.swift 34.39% ⚠️
MainMenuCoordinator.swift 54.44%
TranslationsMiddleware.swift 95.32%
TranslationsService.swift 38.0% ⚠️

Generated by 🚫 Danger Swift against e8a090c

- Bold title using DefaultDynamicFontHelper for Dynamic Type support
- Remove popover arrow on iPad when anchored to toolbar button with up/down directions
- Skip view fallback source on iOS 26+ to let UIKit handle presentation
- Auto-translate directly when user has exactly one preferred language
UIKit only creates the title label when alert.title is non-nil,
so setValue(forKey: attributedTitle) had no effect without it.
…uage check

Aligns middleware with coordinator logic by using the same
TranslationConfiguration.isMultiLanguageFlow flag instead of
checking languages.count after filtering against supported languages.
@razvanlitianu razvanlitianu force-pushed the rlitianu/fxios-15330-translation-action-sheet-ux branch from 707b8b6 to c318867 Compare April 14, 2026 06:28
@razvanlitianu razvanlitianu marked this pull request as ready for review April 14, 2026 06:31
@razvanlitianu razvanlitianu requested a review from a team as a code owner April 14, 2026 06:32
@razvanlitianu
Copy link
Copy Markdown
Collaborator Author

Adding also language filtering to omit page language in translation.

Copy link
Copy Markdown
Collaborator

@thatswinnie thatswinnie left a comment

Choose a reason for hiding this comment

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

Is this correct behaviour on iOS 18? The user is unable to dismiss the language picker - they are basically forced to translate or change preferred languages.
Image

@razvanlitianu
Copy link
Copy Markdown
Collaborator Author

Is this correct behaviour on iOS 18? The user is unable to dismiss the language picker - they are basically forced to translate or change preferred languages. Image

Would tapping outside work? Otherwise I think we should also add a cancel button.

@thatswinnie
Copy link
Copy Markdown
Collaborator

Is this correct behaviour on iOS 18? The user is unable to dismiss the language picker - they are basically forced to translate or change preferred languages. Image

Would tapping outside work? Otherwise I think we should also add a cancel button.

Currently it doesn't work so maybe we need the cancel button. I think it would be good to have it anyway for a11y reasons.

@razvanlitianu
Copy link
Copy Markdown
Collaborator Author

Screenshot 2026-04-16 at 9 45 44 AM Cancel button added for < iOS 26

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