Skip to content

Commit

Permalink
fix: Update components to respect new breakpoints (#1416) (#1419)
Browse files Browse the repository at this point in the history
* fix: Update components to respect new breakpoints

Signed-off-by: Viraj Sanghvi <[email protected]>

* revert i18ntokens.json

Signed-off-by: Viraj Sanghvi <[email protected]>

---------

Signed-off-by: Viraj Sanghvi <[email protected]>
(cherry picked from commit 5484bcc)
  • Loading branch information
virajsanghvi authored Sep 26, 2024
1 parent c1097b1 commit 3284bfe
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### 📈 Features/Enhancements

### 🐛 Bug Fixes
- Update components to respect new breakpoints

### 🚞 Infrastructure

Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/guidelines/colors/_color_section.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* GitHub history for details.
*/

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.guideColorsPage__stickySlider {
position: sticky;
top: $ouiHeaderHeightCompensation;
Expand Down
2 changes: 1 addition & 1 deletion src/components/header/header_links/header_links.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('OuiHeaderLinks', () => {
test('is rendered', () => {
const component = render(
<OuiHeaderLinks
popoverBreakpoints={['xs', 's', 'm', 'l', 'xl']}
popoverBreakpoints={['xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl']}
popoverButtonProps={{
iconType: 'bolt',
className: 'customButtonClass',
Expand Down
2 changes: 1 addition & 1 deletion src/components/page/page_header/_page_header_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
margin-right: $ouiSize;
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiPageHeaderContent__rightSideItems {
flex-direction: row-reverse;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/page/page_side_bar/_page_side_bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiPageSideBar--sticky {
@include ouiScrollBar;
overflow-y: auto;
Expand Down
2 changes: 1 addition & 1 deletion src/components/page/page_template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const OuiPageTemplate: FunctionComponent<OuiPageTemplateProps> = ({
* Full height ~madness~ logic
*/
const canFullHeight =
useIsWithinBreakpoints(['m', 'l', 'xl']) &&
useIsWithinBreakpoints(['m', 'l', 'xl', 'xxl', 'xxxl']) &&
(template === 'default' || template === 'empty');
const fullHeightClass = { 'oui-fullHeight': fullHeight && canFullHeight };
const yScrollClass = { 'oui-yScroll': fullHeight && canFullHeight };
Expand Down
2 changes: 1 addition & 1 deletion src/components/search_bar/_search_bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
min-width: calc($ouiFormMaxWidth / 2);
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiSearchBar__filtersHolder {
// Helps with flex-wrapping
max-width: calc(100% - #{$ouiSize});
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/_responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiTableRowCell--hideForDesktop { // must come last to override any special cases
// sass-lint:disable-block no-important
display: none !important;
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/_table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

// Compressed styles not for mobile
@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiTable--compressed {
.ouiTableCellContent {
@include ouiFontSizeXS;
Expand Down
4 changes: 2 additions & 2 deletions src/global_styling/mixins/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
height: calc(100% - #{$headerHeight});
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand All @@ -47,7 +47,7 @@
height: calc(100% - #{$headerHeight});
}

@include euiBreakpoint('m', 'l', 'xl') {
@include euiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.euiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand Down
4 changes: 2 additions & 2 deletions src/themes/oui-next/global_styling/mixins/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
height: calc(100% - #{$headerHeight});
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand All @@ -47,7 +47,7 @@
height: calc(100% - #{$headerHeight});
}

@include euiBreakpoint('m', 'l', 'xl') {
@include euiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.euiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand Down
4 changes: 2 additions & 2 deletions src/themes/v9/global_styling/mixins/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
height: calc(100% - #{$headerHeight});
}

@include ouiBreakpoint('m', 'l', 'xl') {
@include ouiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.ouiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand All @@ -47,7 +47,7 @@
height: calc(100% - #{$headerHeight});
}

@include euiBreakpoint('m', 'l', 'xl') {
@include euiBreakpoint('m', 'l', 'xl', 'xxl', 'xxxl') {
.euiPageSideBar--sticky {
max-height: calc(100vh - #{$headerHeight});
top: #{$headerHeight};
Expand Down

0 comments on commit 3284bfe

Please sign in to comment.