Skip to content

Commit

Permalink
Fixed regressions from Global Time Picker (#1044)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Jul 23, 2018
1 parent 09e0e7c commit aa1e8b7
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `3.2.0`.
**Bug fixes**

- Removed IE flex column fix in favor of forcing the consumer to add a `grow` prop. ([#1044](https://github.com/elastic/eui/pull/1044))
- Removed max-width to children of `EuiPopover`. ([#1044](https://github.com/elastic/eui/pull/1044))

## [`3.2.0`](https://github.com/elastic/eui/tree/v3.2.0)

**Note: this release creates a minor regression to the display of `EuiFlexItem`s inside a `column` `EuiFlexGroup`. This is fixed in `master`.**
**Note: this release creates a minor regression to the display of `EuiPopoverTitle`. This is fixed in `master`.**

- Added typings for 'EuiBadge' ([#1034](https://github.com/elastic/eui/pull/1034))
- Added a visual pattern for Kibana's Global Date Picker ([#1026](https://github.com/elastic/eui/pull/1026))
- Added `responsive` prop to `EuiFlexGrid` ([#1026](https://github.com/elastic/eui/pull/1026))
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/date_picker/global_date_picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export default class extends Component {
}

return (
<EuiFlexItem key={date}><EuiLink onClick={this.closePopover}>{dateRange || date}</EuiLink></EuiFlexItem>
<EuiFlexItem grow={false} key={date}><EuiLink onClick={this.closePopover}>{dateRange || date}</EuiLink></EuiFlexItem>
);
});

Expand Down
6 changes: 3 additions & 3 deletions src-docs/src/views/flex/direction.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {

export default () => (
<EuiFlexGroup direction="column">
<EuiFlexItem>Content grid item</EuiFlexItem>
<EuiFlexItem>Another content grid item</EuiFlexItem>
<EuiFlexItem>Using the column direction</EuiFlexItem>
<EuiFlexItem grow={false}>Content grid item</EuiFlexItem>
<EuiFlexItem grow={false}>Another content grid item</EuiFlexItem>
<EuiFlexItem grow={false}>Using the column direction</EuiFlexItem>
</EuiFlexGroup>
);
17 changes: 14 additions & 3 deletions src-docs/src/views/flex/flex_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,20 @@ export const FlexExample = {
code: directionHtml,
}],
text: (
<p>
You can change direction using the <EuiCode>direction</EuiCode> prop.
</p>
<div>
<p>
You can change direction using the <EuiCode>direction</EuiCode> prop.
</p>
<EuiCallOut color="warning" title="IE11 Warning">
<p>
Depending on the nested structure of your flex groups, it is possible that
flex-items inside a column directed flex group will not show. To counter this,
add the <code>grow</code> prop and set to either <code>false</code> or a number.
Setting <code>grow</code> to <code>true</code> will not suffice. You may also need
to adjust the <code>flex-basis</code> value.
</p>
</EuiCallOut>
</div>
),
demo: <div className="guideDemo__highlightGrid"><Direction /></div>,
}, {
Expand Down
5 changes: 1 addition & 4 deletions src/components/flex/_flex_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,15 @@
/*
* 1. We need the extra specificity here to override the FlexGroup > FlexItem styles.
* 2. FlexItem can be manually set to not grow if needed.
* 3. Fix for IE or else flex item never shows
*/
.euiFlexGroup--directionColumn &, /* 3 */
.euiFlexGroup--directionColumnReverse &, /* 3 */
&.euiFlexItem--flexGrowZero { /* 1 */
flex-grow: 0; /* 2 */
flex-basis: auto; /* 2 */
}

@for $i from 1 through 10 {
&.euiFlexItem--flexGrow#{$i} {
flex-grow: $i
flex-grow: $i;
}
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/popover/_popover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@
visibility: hidden; /* 2 */
transform: translateY(0) translateX(0) translateZ(0); /* 2 */

> * {
max-width: 100%; /* 3 */
}

&.euiPopover__panel-isOpen {
opacity: 1;
visibility: visible;
Expand Down

0 comments on commit aa1e8b7

Please sign in to comment.