mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.15k stars 2.91k forks source link

Update Fonts in ContextualHintView to use FXFontStyles #18944

Open data-sync-user opened 7 months ago

data-sync-user commented 7 months ago

Please update how we set fonts in ContextualHintView to use FXFontStyles instead of calling DefaultDynamicFontHelper directly. Provide before and after screenshots of the UI.

For example: FXFontStyles.Regular.headline.scaledFont()

┆Issue is synchronized with this Jira Task

Akshay0701 commented 7 months ago

can I work on this issue?

cyndichin commented 7 months ago

Yes! I assigned the issue to you, thank you!

cyndichin commented 6 months ago

@Akshay0701 just wanted to follow up, are you still interested in this task?

cyndichin commented 6 months ago

Thank you for your interest @Akshay0701 I unassigned for now to open it up to other contributors since I haven't heard back. Let me know if you are still interested in this task or other font related tasks! :)

rojinpra7 commented 6 months ago

I was working on this issue but struggled to find out when ContextHintView gets triggered in the view.

cyndichin commented 6 months ago

Thanks @rojinpra7 for your interest in this task! Our ContextHintView does have some complicated logic around it. One way you can find out when it gets triggered is to navigate to the private mode tab (see the purple homepage) and then navigate to a website. You should see the context hint view shown in the screen shot below. If you don't see it, then try to do a fresh install of the app first.

Or you can go to our SampleComponentLibrary project and tap on the ContextualHintView button to view it here:

Firefox Project Sample Component Library Project
simulator_screenshot_BD5D2338-4618-47D7-B8CC-34C7F113526C simulator_screenshot_B8E5EBDD-05A1-4C26-9FD4-68173B6625F4

Hope that helps!

rojinpra7 commented 6 months ago

@cyndichin Thank you. That helped a lot. It looks like ContextualHintView gets triggered only one time during lifespan of the app.

cyndichin commented 6 months ago

It depends on which one, but for the view that describes the fire icon, that is the case. You can find the logic for these views in the ContextualHintEligibilityUtility class.

data-sync-user commented 5 months ago

➤ Cyndi Chin commented:

Please verify that fonts for our CFRs are scaled properly.

data-sync-user commented 5 months ago

➤ Diana Andreea Barladeanu commented:

Validated on v9000 (41169), with iPhone 15 (17.4).

!7A3DF25C-AD5B-407F-88B3-BD5636701606.jpg|width=944,height=2048,alt="7A3DF25C-AD5B-407F-88B3-BD5636701606.jpg"!

data-sync-user commented 4 months ago

➤ Diana Andreea Barladeanu commented:

Validated on v127 (41813), with iPhone 15 (17.4).