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

[IOAPPX-349] Add the new IOText component with support for advanced a11y features #312

Merged
merged 31 commits into from
Jul 24, 2024

Conversation

dmnplb
Copy link
Collaborator

@dmnplb dmnplb commented Jul 22, 2024

Short description

This PR adds the new IOText component, which replaces the legacy BaseTypography component. Compared to the previous component, IOText has the following features:

  • Built-in support for bold text, if set by the user (iOS only)
  • Add the new typographic attributes, like fontSize and lineHeight to the makeFontStyleObject function
  • Manage required or optional props (like style) with a stricter approach without using the TypographyFactory
  • Based on the new IOFontSize scale

List of changes proposed in this pull request

  • Add the new IOText component
  • Update all the typographic styles using IOText, bypassing the TypographyFactory
  • Update the typographic styles with a fallback theme color to ensure built-in support for dark mode
  • Add the new useBoldTextEnabled hook
  • Deprecate BaseTypography
  • Remove LabelLink in favor of asLink prop for all the Label… and Body typographic styles
  • Add the new LabelMini style
  • Remove MdH4, MdH5 and MdH6 styles
  • Improve FeatureInfo component API

Preview

bolder-text.mov

Co-authors

@CrisTofani

How to test

N/A

@dmnplb dmnplb added the a11y label Jul 22, 2024
@dmnplb dmnplb changed the base branch from main to 2.x July 22, 2024 09:36
@dmnplb dmnplb marked this pull request as ready for review July 24, 2024 13:18
@dmnplb dmnplb requested review from a team as code owners July 24, 2024 13:18
@dmnplb dmnplb merged commit 642f222 into 2.x Jul 24, 2024
2 checks passed
@dmnplb dmnplb deleted the IOAPPX-349-add-IOText-component branch July 24, 2024 13:49
dmnplb added a commit that referenced this pull request Aug 27, 2024
> [!note]
> This PR depends on:
> * #312

## Short description
This PR adds the new IO typeface (temporarily named **Titillio**). This
change is visible only if experimental DS is on.

## List of changes proposed in this pull request
- Add the new `Titillio` typeface and relative font files
- Remove references to `ReadexPro`

### Preview


https://github.com/user-attachments/assets/eb1820dc-1f82-49e9-9218-1a2430ed6477



## How to test
1. Run the example app
2. Enable experimental DS and check every screen

---------

Co-authored-by: Cristiano Tofani <cri.tofani@gmail.com>
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.

2 participants