Skip to content

[Do not merge] Paywalls: PoC of overriding fonts through the theme#1325

Closed
tonidero wants to merge 4 commits into
paywallsfrom
poc_override_fonts
Closed

[Do not merge] Paywalls: PoC of overriding fonts through the theme#1325
tonidero wants to merge 4 commits into
paywallsfrom
poc_override_fonts

Conversation

@tonidero

@tonidero tonidero commented Oct 9, 2023

Copy link
Copy Markdown
Contributor

Description

This is a small PoC of how it looks like to override the fonts so they are used in the paywall:
image

@tonidero tonidero added the test label Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This might be a bit confusing... Basically the developer needs to override the specific styles we use within the paywall in order to use their typography everywhere, so maybe we should keep a list of these somewhere?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we can make it a part of the API, like we did for iOS. So that if you want to use a custom font provider, it has to define what each of these (titleMedium, titleLarge, etc) is

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was trying to avoid that since it means we need to override the theme for the paywall, instead of relying on the overall theme... but yeah, that might be the best way to make sure this can be customized. I will write up something so it can be part of the API.

@tonidero tonidero force-pushed the poc_override_fonts branch from e451f5f to 1cd491e Compare October 9, 2023 07:55
@tonidero tonidero changed the title [Do not merge] PoC of overriding fonts through the theme [Do not merge] Paywalls: PoC of overriding fonts through the theme Oct 9, 2023
@codecov

codecov Bot commented Oct 9, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.53%. Comparing base (b521669) to head (ee4996d).

Additional details and impacted files
@@            Coverage Diff            @@
##           paywalls    #1325   +/-   ##
=========================================
  Coverage     84.53%   84.53%           
=========================================
  Files           194      194           
  Lines          6538     6538           
  Branches        952      952           
=========================================
  Hits           5527     5527           
  Misses          643      643           
  Partials        368      368           

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

@aboedo

aboedo commented Oct 9, 2023

Copy link
Copy Markdown
Member

OMG that font 😂

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should just keep this as the standard font for all paywalls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤣 I would totally do this, but we would need to find versions with smaller weights and cursive :P. That's not supported in this font unfortunately

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

we can make it a part of the API, like we did for iOS. So that if you want to use a custom font provider, it has to define what each of these (titleMedium, titleLarge, etc) is

@tonidero tonidero changed the base branch from paywalls to toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider October 10, 2023 08:02
@tonidero tonidero force-pushed the poc_override_fonts branch 3 times, most recently from 4766a65 to c87433f Compare October 11, 2023 11:05
@tonidero tonidero changed the base branch from toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider to toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider-2 October 11, 2023 11:08

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note how by specifying the fontStyle to italic, this has more preference than the other font for italic, so we only use it there.

@tonidero tonidero force-pushed the toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider-2 branch from 4976515 to 2900104 Compare October 16, 2023 11:53
@tonidero tonidero force-pushed the toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider-2 branch from 2900104 to fa8be70 Compare October 17, 2023 08:14
Base automatically changed from toniricodiez/pwl-206-support-custom-fonts-through-a-fontprovider-2 to paywalls October 17, 2023 08:36
@tonidero

Copy link
Copy Markdown
Contributor Author

Going to close this in favor of #1358

@tonidero tonidero closed this Oct 17, 2023
@tonidero tonidero deleted the poc_override_fonts branch October 17, 2023 12:22
@vegaro vegaro removed the pr:test label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants