Skip to content

Conversation

@aveline
Copy link
Contributor

@aveline aveline commented Oct 6, 2022

WHY are these changes introduced?

Add id prop to both Text and Box

@aveline aveline marked this pull request as draft October 6, 2022 17:12
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

size-limit report 📦

Path Size
polaris-react-cjs 209.02 KB (+0.01% 🔺)
polaris-react-esm 135.51 KB (+0.01% 🔺)
polaris-react-esnext 190.88 KB (+0.01% 🔺)
polaris-react-css 41.52 KB (0%)

Comment on lines 126 to 128
word-wrap: break-word;
word-break: break-word;
overflow-wrap: break-word;
Copy link
Member

Choose a reason for hiding this comment

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

Can we double check we need all these properties?

@aveline
Copy link
Contributor Author

aveline commented Oct 12, 2022

Split out breakWord #7389 into its own PR

@aveline aveline changed the title Alpha Text and Box updates Add id prop to Text and Box Oct 12, 2022
@aveline aveline marked this pull request as ready for review October 12, 2022 19:12
@aveline aveline requested a review from laurkim October 12, 2022 19:12
Copy link
Contributor

@laurkim laurkim left a comment

Choose a reason for hiding this comment

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

💯 🚀

@aveline aveline merged commit 8a6c323 into main Oct 12, 2022
@aveline aveline deleted the alpha-text-box-updates branch October 12, 2022 20:47
@github-actions github-actions bot mentioned this pull request Oct 12, 2022
kyledurand pushed a commit that referenced this pull request Oct 14, 2022
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @shopify/polaris-migrator@0.5.0

### Minor Changes

- [#7373](#7373)
[`56c82ee8d`](56c82ee)
Thanks [@aaronccasanova](https://github.com/aaronccasanova)! - Add
`getFunctionArgs` utility

### Patch Changes

- Updated dependencies
\[[`c3f427c17`](c3f427c)]:
    -   @shopify/polaris-tokens@6.2.1

## @shopify/polaris@10.8.0

### Minor Changes

- [#7364](#7364)
[`e4b2c36d8`](e4b2c36)
Thanks [@Bringer128](https://github.com/Bringer128)! - Deprecated
Collapsible preventMeasuringOnChildrenUpdate.
Fixed bug where Collapsible would get stuck in animating state when
duration is 0.
Add support for intentionally disabling the transition in Collapsible.

### Patch Changes

- [#7363](#7363)
[`8a6c323e2`](8a6c323)
Thanks [@aveline](https://github.com/aveline)! - Added `id` prop to
`Text` and `Box`


- [#7348](#7348)
[`ea2a45bbb`](ea2a45b)
Thanks [@aveline](https://github.com/aveline)! - Added `setMediaWidth`
breakpoints test utility


- [#7388](#7388)
[`5bc885765`](5bc8857)
Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed a re-render
bug with Page Actions

- Updated dependencies
\[[`c3f427c17`](c3f427c)]:
    -   @shopify/polaris-tokens@6.2.1

## @shopify/plugin-polaris@0.0.11

### Patch Changes

- Updated dependencies
\[[`56c82ee8d`](56c82ee)]:
    -   @shopify/polaris-migrator@0.5.0

## @shopify/polaris-tokens@6.2.1

### Patch Changes

- [#7385](#7385)
[`c3f427c17`](c3f427c)
Thanks [@laurkim](https://github.com/laurkim)! - Refactored exported
alias and scale types in `breakpoints`, `depth`, `font`, `motion`,
`shape`, `spacing`, and `zIndex`.

## @shopify/stylelint-polaris@4.3.2

### Patch Changes

- Updated dependencies
\[[`c3f427c17`](c3f427c)]:
    -   @shopify/polaris-tokens@6.2.1

## polaris.shopify.com@0.22.0

### Minor Changes

- [#7032](#7032)
[`40ee692aa`](40ee692)
Thanks [@gwyneplaine](https://github.com/gwyneplaine)! - Added Playroom
integration to Polaris docs site.

### Patch Changes

- [#7032](#7032)
[`40ee692aa`](40ee692)
Thanks [@gwyneplaine](https://github.com/gwyneplaine)! - Improved the
design of the Sandbox feature.


- [#7400](#7400)
[`9f9fe1f99`](9f9fe1f)
Thanks [@kyledurand](https://github.com/kyledurand)! - Fixed a scaling
bug caused by content overflow
Fixed a bug where examples that don't have any content wouldn't show up
- Updated dependencies
\[[`8a6c323e2`](8a6c323),
[`e4b2c36d8`](e4b2c36),
[`c3f427c17`](c3f427c),
[`ea2a45bbb`](ea2a45b),
[`5bc885765`](5bc8857)]:
    -   @shopify/polaris@10.8.0
    -   @shopify/polaris-tokens@6.2.1

## polaris-for-figma@0.0.24

### Patch Changes

- Updated dependencies
\[[`8a6c323e2`](8a6c323),
[`e4b2c36d8`](e4b2c36),
[`ea2a45bbb`](ea2a45b),
[`5bc885765`](5bc8857)]:
    -   @shopify/polaris@10.8.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@laurkim laurkim mentioned this pull request Oct 14, 2022
5 tasks
laurkim added a commit that referenced this pull request Oct 14, 2022
### WHY are these changes introduced?

A recent [PR](#7363) that adds an
`id` prop to the Text component was causing a TS error.

### WHAT is this pull request doing?
Small fix to update the way the `id` prop is optionally rendered.
    <details>
      <summary>TS error</summary>
<img
src="https://user-images.githubusercontent.com/26749317/195863679-cfa8e8f7-6d1c-49f3-8b2a-5401931a49d9.png"
alt="TS error">
    </details>

### 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="Playground">
      {/* Add the code you want to test in here */}
      <Text as="h1" variant="heading2xl">
        Text — no id
      </Text>
      <Text as="h1" variant="heading2xl" id="text-heading-test">
        Text — with id
      </Text>
    </Page>
  );
}
```

</details>

### 🎩 checklist

- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] 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.

3 participants