Skip to content
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 18 commits into from
Mar 6, 2025
Merged

Release/2025.03.0 [main] #949

merged 18 commits into from
Mar 6, 2025

Conversation

ChaconC
Copy link
Contributor

@ChaconC ChaconC commented Mar 4, 2025

Merge Release/2025.03.0 -> main

ChaconC and others added 8 commits February 25, 2025 10:32
fix: include additional ItemTypes in ConditionalLogic (M2-8320)
* feat: add event version during upload preprocessing

* test: update ConstructCompletionsService tests

* fix: remove conditional from data.eventId
* 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>
@ChaconC ChaconC requested a review from mbanting March 4, 2025 00:59
farmerpaul and others added 10 commits March 4, 2025 18:06
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`.
@ChaconC ChaconC merged commit 334871f into main Mar 6, 2025
8 checks passed
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.

4 participants