Skip to content
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
2 changes: 2 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

### Bug fixes

- Fixed issue with `Stack` where a `Stack.Item` was not getting a minimum width ([2273](https://github.com/Shopify/polaris-react/pull/2273))

### Documentation

- Added accessibility documentation for the drop zone component ([#2243](https://github.com/Shopify/polaris-react/pull/2243))
Expand Down
1 change: 1 addition & 0 deletions src/components/Stack/Stack.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@

.Item {
flex: 0 1 auto;
min-width: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

When the stack width is smaller than the contents, the contents overflow each other. Maybe we could make them wrap to the next line? Not sure if this would introduce even more edge cases though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because this is an abstraction of Flexbox we might just want to leave it as is. Wrapping is left up to the props which should generate the right flexbox rules.

}

.Item-fill {
Expand Down
52 changes: 27 additions & 25 deletions src/components/TextField/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -680,32 +680,34 @@ function SeparateValidationErrorExample() {
: '';

const formGroupMarkup = (
<Stack wrap={false} alignment="leading" spacing="tight">
<Stack wrap={false} alignment="leading" spacing="loose">
<Stack.Item fill>
<Stack distribution="fill" spacing="tight">
<Select
labelHidden
label="Collection rule type"
options={['Product type']}
value={selectTypeValue}
onChange={handleSelectTypeChange}
/>
<Select
labelHidden
label="Collection rule condition"
options={['is equal to']}
value={selectConditionValue}
onChange={handleSelectConditionChange}
/>
<TextField
labelHidden
label="Collection rule content"
error={isInvalid}
id={textFieldID}
value={textFieldValue}
onChange={handleTextFieldValueChange}
/>
</Stack>
<FormLayout>
<FormLayout.Group condensed>
<Select
labelHidden
label="Collection rule type"
options={['Product type']}
value={selectTypeValue}
onChange={handleSelectTypeChange}
/>
<Select
labelHidden
label="Collection rule condition"
options={['is equal to']}
value={selectConditionValue}
onChange={handleSelectConditionChange}
/>
<TextField
labelHidden
label="Collection rule content"
error={isInvalid}
id={textFieldID}
value={textFieldValue}
onChange={handleTextFieldValueChange}
/>
</FormLayout.Group>
</FormLayout>
<div style={{marginTop: '4px'}}>
<InlineError message={errorMessage} fieldID={textFieldID} />
</div>
Expand Down