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

Change our docs on text line limit #2589

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {generateCodeBlock} from '../helpers/generateCodeBlock';
const data: ReferenceEntityTemplateSchema = {
name: 'Text',
description:
'Text can be rendered in different sizes and colors in order to structure content. By default, `Text` will always stretch to fill the width of the container, but it can be wrapped in a `Box` to limit its width to what it needs. When the width of `Text` reaches its limit, the `string` will automatically wrap to 2 lines before being truncated.',
'Text can be rendered in different sizes and colors in order to structure content. By default, `Text` will always stretch to fill the width of the container, but it can be wrapped in a `Box` to limit its width to what it needs. When the width of `Text` reaches its limit, the `string` will automatically wrap to the next line.',
isVisualComponent: true,
type: 'component',
definitions: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,15 @@ Refer to the [migration guide](/docs/api/pos-ui-extensions/migrating) for more i

### Breaking Changes

- Removed the deprecated ActionItem component. Use a [Button](/docs/api/pos-ui-extensions/components/button) instead.
- Removed the deprecated SmartGridApi. Use the [ActionApi](/docs/api/pos-ui-extensions/apis/action-api) instead.
- Removed the deprecated \`ActionItem\` component. Use a [Button](/docs/api/pos-ui-extensions/components/button) instead.
- Removed the deprecated \`SmartGridApi\`. Use the [ActionApi](/docs/api/pos-ui-extensions/apis/action-api) instead.
- Removed the deprecated DiscountType. Use [CartDiscountType](/docs/api/pos-ui-extensions/apis/cart-api#cartapi-propertydetail-applycartdiscount) and [LineItemDiscountType](/docs/api/pos-ui-extensions/apis/cart-api#cartapi-propertydetail-setlineitemdiscount) instead.
- Removed the deprecated \`badge\` prop from the [List](/docs/api/pos-ui-extensions/components/list) component. Use \`badges\` instead.
- Removed the deprecated \`TextFieldProps\` type from the [TextField](/docs/api/pos-ui-extensions/components/textfield) component.
- Deprecated \`'vertical'\` and \`'horizontal'\` as values for the \`direction\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component.
- Deprecated the \`flexChildren'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component.
- Deprecated the \`flex'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component.
- Deprecated the \`flexWrap'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component.
- Deprecated the \`paddingHorizontal'\` and \`paddingVertical\` fields in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component.
- Deprecated \`'vertical'\` and \`'horizontal'\` as values for the \`direction\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Use \`'block'\` and \`'inline'\` instead.
- Deprecated the \`flex'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Set \`blockSize\` or \`inlineSize\` to a value other than \`'auto'\` to create the desired size for your \`Stack\`.
- Deprecated the \`flexWrap'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Content will now wrap automatically.
- Deprecated the \`paddingHorizontal'\` and \`paddingVertical\` fields in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Use \`paddingInline\` and \`paddingBlock\` instead.
Comment on lines +72 to +74
Copy link

Choose a reason for hiding this comment

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

Suggested change
- Deprecated the \`flex'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Set \`blockSize\` or \`inlineSize\` to a value other than \`'auto'\` to create the desired size for your \`Stack\`.
- Deprecated the \`flexWrap'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Content will now wrap automatically.
- Deprecated the \`paddingHorizontal'\` and \`paddingVertical\` fields in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Use \`paddingInline\` and \`paddingBlock\` instead.
- Deprecated the \`'flex'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Set \`blockSize\` or \`inlineSize\` to a value other than \`'auto'\` to create the desired size for your \`Stack\`.
- Deprecated the \`'flexWrap'\` field in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Content will now wrap automatically.
- Deprecated the \`'paddingHorizontal'\` and \`paddingVertical\` fields in the [Stack](/docs/api/pos-ui-extensions/components/Stack) component. Use \`paddingInline\` and \`paddingBlock\` instead.

Copy link

Choose a reason for hiding this comment

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

Actually, we should be consistent, I see there are some that don't have ' at all above.

Copy link
Contributor Author

@js-goupil js-goupil Jan 28, 2025

Choose a reason for hiding this comment

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

@runmad those are prop names, not strings, so I don't think we should wrap them in quotes. We're wrapping them in the tick ` marks to make them look like code. That said, your comment did prompt me to look at the missing tick marks and there's a few I'll push up.

- Removed \`customValidator\` prop from the [FormattedTextField](/docs/api/pos-ui-extensions/components/formattedtextfield) component.
- Removed \`email\`, \`firstName\`, \`lastName\`, and \`note\` from the [Customer](/docs/api/pos-ui-extensions/apis/cart-api#customer) object.

Expand All @@ -82,10 +81,10 @@ Refer to the [migration guide](/docs/api/pos-ui-extensions/migrating) for more i
- Added \`currency\` prop to the [SessionApi](/docs/api/pos-ui-extensions/apis/session-api).
- [Cart API](/docs/api/pos-ui-extensions/apis/cart-api) updates:
- Added \`bulkUpdateCart\` function for single-operation cart updates.
- The \`addLineItem\` and \`addCustomSale\` functions now return a UUID for the added line item.
- The \`addLineItem\` and \`addCustomSale\` functions now return a \`UUID\` for the added line item.
- Added [Box](/docs/api/pos-ui-extensions/components/box) component.
- Enhanced the [Stack](/docs/api/pos-ui-extensions/components/box) component. New fields include \`justifyContent\`, \`alignItems\`, and \`alignContent\`, as well as numerous new sizing and spacing options.
- Added Sizing and fill options to the[Image](/docs/api/pos-ui-extensions/components/image) component.
- Added sizing and fill options to the[Image](/docs/api/pos-ui-extensions/components/image) component.
`,
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {RemoteSubscribable} from '@remote-ui/async-subscription';

export interface LocaleApiContent {
/** IETF-formatted locale at time of page load and a callback to subsribe to value changes. Current supports only one subscription.
/** IETF-formatted locale at time of page load and a callback to subscribe to value changes. Current supports only one subscription.
* You can utilize `makeStatefulSubscribable` on a `RemoteSubscribable` to implement multiple subscriptions.
* Using `makeStatefulSubscribable` or the corresponding hooks counts as a subscription.
*/
Expand Down
Loading