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

[AppProvider] Disable calt font ligatures #10871

Merged
merged 2 commits into from
Oct 4, 2023
Merged

Conversation

chloerice
Copy link
Member

@chloerice chloerice commented Oct 4, 2023

WHY are these changes introduced?

The Inter font has several configurable font settings. By default, calt ligatures are not disabled. This causes unwanted change in the presentation of letters to be symbols, e.g., "x" appearing as a multiply symbol when between numbers like 7x8. This is a problem for automated unique identifiers, like Hydrogen deploy hashes in the /custom-storefronts section of the admin:

calt-ligatures-causing-x-beside-numbers-to-become-.mp4

WHAT is this pull request doing?

This PR disables calt ligatures in the base styles of the AppProvider.

Before After
Screenshot 2023-10-04 at 2 25 05 PM Screenshot 2023-10-04 at 2 24 50 PM

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';

import {Page, Text} from '../src';

export function Playground() {
  return (
    <Page title="Discounts">
      <Text as="p">xguxh880x9klaslojoffihghgthslohfijkl</Text>
    </Page>
  );
}

🎩 checklist

@chloerice chloerice requested review from a team as code owners October 4, 2023 16:32
@github-actions github-actions bot added the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Oct 4, 2023
@chloerice chloerice changed the base branch from main to next October 4, 2023 16:38
@Shopify Shopify deleted a comment from translation-platform bot Oct 4, 2023
@Shopify Shopify deleted a comment from translation-platform bot Oct 4, 2023
@Shopify Shopify deleted a comment from translation-platform bot Oct 4, 2023
@github-actions github-actions bot removed the cla-needed Added by a bot. Contributor needs to sign the CLA Agreement. label Oct 4, 2023
@chloerice
Copy link
Member Author

/snapit

@chloerice chloerice merged commit 77744cb into next Oct 4, 2023
12 checks passed
@chloerice chloerice deleted the disable-calt-ligatures branch October 4, 2023 19:24
mrcthms pushed a commit that referenced this pull request Oct 12, 2023
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

The Inter font has several configurable font settings. By default,
`calt` ligatures are not disabled. This causes unwanted change in the
presentation of letters to be symbols, e.g., "x" appearing as a multiply
symbol when between numbers like `7x8`. This is a problem for automated
unique identifiers, like Hydrogen deploy hashes in the
`/custom-storefronts` section of the admin:


https://github.com/Shopify/polaris/assets/18447883/e8c4d2a1-9d22-42a7-a585-a158e9dcb1b5

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?
This PR disables `calt` ligatures in the base styles of the
`AppProvider`.

| Before | After |
|--------|--------|
| <img width="239" alt="Screenshot 2023-10-04 at 2 25 05 PM"
src="https://github.com/Shopify/polaris/assets/18447883/346bc486-866c-4d64-8fd2-1d13bcad8a0c">|
<img width="237" alt="Screenshot 2023-10-04 at 2 24 50 PM"
src="https://github.com/Shopify/polaris/assets/18447883/fc9f8cc4-d3bc-4d86-8ba4-dd466ed1f4ed">
|

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';

import {Page, Text} from '../src';

export function Playground() {
  return (
    <Page title="Discounts">
      <Text as="p">xguxh880x9klaslojoffihghgthslohfijkl</Text>
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
mrcthms pushed a commit that referenced this pull request Oct 12, 2023
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

The Inter font has several configurable font settings. By default,
`calt` ligatures are not disabled. This causes unwanted change in the
presentation of letters to be symbols, e.g., "x" appearing as a multiply
symbol when between numbers like `7x8`. This is a problem for automated
unique identifiers, like Hydrogen deploy hashes in the
`/custom-storefronts` section of the admin:


https://github.com/Shopify/polaris/assets/18447883/e8c4d2a1-9d22-42a7-a585-a158e9dcb1b5

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?
This PR disables `calt` ligatures in the base styles of the
`AppProvider`.

| Before | After |
|--------|--------|
| <img width="239" alt="Screenshot 2023-10-04 at 2 25 05 PM"
src="https://github.com/Shopify/polaris/assets/18447883/346bc486-866c-4d64-8fd2-1d13bcad8a0c">|
<img width="237" alt="Screenshot 2023-10-04 at 2 24 50 PM"
src="https://github.com/Shopify/polaris/assets/18447883/fc9f8cc4-d3bc-4d86-8ba4-dd466ed1f4ed">
|

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';

import {Page, Text} from '../src';

export function Playground() {
  return (
    <Page title="Discounts">
      <Text as="p">xguxh880x9klaslojoffihghgthslohfijkl</Text>
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
AnnaCheba pushed a commit to AnnaCheba/polaris that referenced this pull request Apr 22, 2024
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

The Inter font has several configurable font settings. By default,
`calt` ligatures are not disabled. This causes unwanted change in the
presentation of letters to be symbols, e.g., "x" appearing as a multiply
symbol when between numbers like `7x8`. This is a problem for automated
unique identifiers, like Hydrogen deploy hashes in the
`/custom-storefronts` section of the admin:


https://github.com/Shopify/polaris/assets/18447883/e8c4d2a1-9d22-42a7-a585-a158e9dcb1b5

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?
This PR disables `calt` ligatures in the base styles of the
`AppProvider`.

| Before | After |
|--------|--------|
| <img width="239" alt="Screenshot 2023-10-04 at 2 25 05 PM"
src="https://github.com/Shopify/polaris/assets/18447883/346bc486-866c-4d64-8fd2-1d13bcad8a0c">|
<img width="237" alt="Screenshot 2023-10-04 at 2 24 50 PM"
src="https://github.com/Shopify/polaris/assets/18447883/fc9f8cc4-d3bc-4d86-8ba4-dd466ed1f4ed">
|

<!--
  Summary of the changes committed.

Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.

If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:

    <details>
      <summary>Summary of your gif(s)</summary>
      <img src="..." alt="Description of what the gif shows">
    </details>
-->

<!-- ℹ️ Delete the following for small / trivial changes -->

### How to 🎩

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#local-development)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

<!--
  Give as much information as needed to experiment with the component
  in the playground.
-->

<details>
<summary>Copy-paste this code in
<code>playground/Playground.tsx</code>:</summary>

```jsx
import React from 'react';

import {Page, Text} from '../src';

export function Playground() {
  return (
    <Page title="Discounts">
      <Text as="p">xguxh880x9klaslojoffihghgthslohfijkl</Text>
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide
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.

None yet

3 participants