-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[APM] Adding stickTo on charts and adjusting search bar breakpoints (#…
…107433) (#107596) * adding stickTo prop to tooltip * adjusting search bar breakpoints * adjusting breakpoints * addressing pr comments * fixing ts issue * fixing comparison size Co-authored-by: Cauê Marcondes <[email protected]>
- Loading branch information
1 parent
7fef282
commit 53e92a1
Showing
10 changed files
with
192 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 153 additions & 0 deletions
153
x-pack/plugins/apm/public/hooks/use_break_points.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { getScreenSizes } from './use_break_points'; | ||
|
||
describe('use_break_points', () => { | ||
describe('getScreenSizes', () => { | ||
it('return xs when within 0px - 5740x', () => { | ||
expect(getScreenSizes(0)).toEqual({ | ||
isXSmall: true, | ||
isSmall: true, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(574)).toEqual({ | ||
isXSmall: true, | ||
isSmall: true, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return s when within 575px - 767px', () => { | ||
expect(getScreenSizes(575)).toEqual({ | ||
isXSmall: false, | ||
isSmall: true, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(767)).toEqual({ | ||
isXSmall: false, | ||
isSmall: true, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return m when within 768px - 991', () => { | ||
expect(getScreenSizes(768)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(991)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: true, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return l when within 992px - 1199px', () => { | ||
expect(getScreenSizes(992)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(1199)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: true, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return xl when within 1200px - 1599px', () => { | ||
expect(getScreenSizes(1200)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(1599)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: true, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return xxl when within 1600px - 1999px', () => { | ||
expect(getScreenSizes(1600)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: false, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
expect(getScreenSizes(1999)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: false, | ||
isXXL: true, | ||
isXXXL: false, | ||
}); | ||
}); | ||
it('return xxxl when greater than or equals to 2000px', () => { | ||
expect(getScreenSizes(2000)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: false, | ||
isXXL: false, | ||
isXXXL: true, | ||
}); | ||
expect(getScreenSizes(3000)).toEqual({ | ||
isXSmall: false, | ||
isSmall: false, | ||
isMedium: false, | ||
isLarge: false, | ||
isXl: false, | ||
isXXL: false, | ||
isXXXL: true, | ||
}); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters