-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release/2025.03.0 [main] #949
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Release/2025.02.3 [dev]
* feat: Add font files * feat: RN asset updates * feat: Add useFontLanguage hook * feat: Implement FontLanguageProvider * fix: Correct state variable value assignment * refactor: simplify `useFontLanguage` hook I don't see the need for `useState` + `useEffect`, can just return a variable based directly to the current language, which is reactive. * chore: remove reference to unused font token * fix: remove manual `fontFamily` overrides No component should be performing the `IS_IOS` logic to determine which font to use, that was already done in Tamagui config and components should rely on that, which also provides language-specific font. So removed those `fontFamily` overrides in `ToastConfig` and `Splash`. In `Splash`, the RN-provided Text component was being used to display the version text. It may inherit Tamagui styling by default, but to safe, it made sense to me to use the shared Tamagui-based `Text` component. Also added missing translation for "Version" word. * fix: ensure fonts are properly registered There are many pitfalls in adding fonts to a React Native app, both on iOS and Android. This commit addresses those. **For iOS:** We have numerous targets in the Xcode project, one for each environment. Each of those has their own `.plist` file and configuration settings in `project.pbxproj`, and needed to have the new fonts accounted for in each place. **For Android:** Android is more particular about specific font styles, and per Tamagui docs, you have to explictly define which font face should be used for each specific weight. In making this change to `tamagui.config.js`, it made sense to include all possible font weights in the project to align as closely as possible with the font weights actually in use. * fix: correct default font styling on shared `Text` Set up default styling on shared `Text` component that can be overridden by passed props and/or `style` prop. (Using `styled` turns out to be too prescriptive for instances of attribute-based styling.) * fix: use new title component based on Tamagui The navigation header was using a text component based on RN Text, not our shared `Text` component based on Tamagui. Thus it wasn't picking up on the font style changes implemented to respond based on selected language. Fixed this by using a component for the `headerTitle` option rather than using `headerTitleStyle`. * fix: apply font to `MarkdownView` * fix: always use shared `Text` component --------- Co-authored-by: farmerpaul <paul.hh@metalab.com>
* feat: Add font files * feat: RN asset updates * feat: Add useFontLanguage hook * feat: Implement FontLanguageProvider * fix: Correct state variable value assignment * refactor: simplify `useFontLanguage` hook I don't see the need for `useState` + `useEffect`, can just return a variable based directly to the current language, which is reactive. * chore: remove reference to unused font token * fix: remove manual `fontFamily` overrides No component should be performing the `IS_IOS` logic to determine which font to use, that was already done in Tamagui config and components should rely on that, which also provides language-specific font. So removed those `fontFamily` overrides in `ToastConfig` and `Splash`. In `Splash`, the RN-provided Text component was being used to display the version text. It may inherit Tamagui styling by default, but to safe, it made sense to me to use the shared Tamagui-based `Text` component. Also added missing translation for "Version" word. * fix: ensure fonts are properly registered There are many pitfalls in adding fonts to a React Native app, both on iOS and Android. This commit addresses those. **For iOS:** We have numerous targets in the Xcode project, one for each environment. Each of those has their own `.plist` file and configuration settings in `project.pbxproj`, and needed to have the new fonts accounted for in each place. **For Android:** Android is more particular about specific font styles, and per Tamagui docs, you have to explictly define which font face should be used for each specific weight. In making this change to `tamagui.config.js`, it made sense to include all possible font weights in the project to align as closely as possible with the font weights actually in use. * fix: correct default font styling on shared `Text` Set up default styling on shared `Text` component that can be overridden by passed props and/or `style` prop. (Using `styled` turns out to be too prescriptive for instances of attribute-based styling.) * fix: use new title component based on Tamagui The navigation header was using a text component based on RN Text, not our shared `Text` component based on Tamagui. Thus it wasn't picking up on the font style changes implemented to respond based on selected language. Fixed this by using a component for the `headerTitle` option rather than using `headerTitleStyle`. * fix: apply font to `MarkdownView` * fix: always use shared `Text` component --------- Co-authored-by: farmerpaul <paul.hh@metalab.com>
mbanting
approved these changes
Mar 4, 2025
The wrong Lato font assets were being used, this change updates them. Also, a default `lineHeight` needs to be explicit throughout the app as Android and iOS make different assumptions for a reasonable default value. Chose 125% as a reasonable default, which is overridable if provided.
The wrong Lato font assets were being used, this change updates them. Also, a default `lineHeight` needs to be explicit throughout the app as Android and iOS make different assumptions for a reasonable default value. Chose 125% as a reasonable default, which is overridable if provided.
* fix: Prohibit font shorthand props on `Text` Apparently Tamagui provides shorthand props for font styling that were not being accounted for in our shared `Text` component. For consistency and predictable handling of default values, updated `Text` to exclude those from the valid props list. * fix: disable redundant back button On Android, when a default `headerTitle` component is provided, it changes the default value of `headerBackVisible` to `true`. The back button styling is always provided manually and should never be shown. So made it explicitly `false`.
* fix: Prohibit font shorthand props on `Text` Apparently Tamagui provides shorthand props for font styling that were not being accounted for in our shared `Text` component. For consistency and predictable handling of default values, updated `Text` to exclude those from the valid props list. * fix: disable redundant back button On Android, when a default `headerTitle` component is provided, it changes the default value of `headerBackVisible` to `true`. The back button styling is always provided manually and should never be shown. So made it explicitly `false`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Merge Release/2025.03.0 -> main