-
Notifications
You must be signed in to change notification settings - Fork 915
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
[UX] Restyle global breadcrumbs #1954
Changes from all commits
6b16239
09f1982
39015bc
70762c0
dcf3971
a383431
a7284d9
37275cc
9436afa
06f8a42
3e0fa88
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
@import "@elastic/eui/src/global_styling/variables/header"; | ||
|
||
$osdHeaderOffset: $euiHeaderHeightCompensation; | ||
$osdHeaderBreadcrumbBlueBackground: #b9d9eb; | ||
$osdHeaderBreadcrumbGrayBackground: #d9e1e2; | ||
$osdHeaderBreadcrumbCollapsedLink: #002a3a; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@import "../../../../public/variables"; | ||
|
||
$firstBreadcrumbPolygon: polygon( | ||
0% 0%, | ||
100% 0%, | ||
calc(100% - #{$euiSizeS}) 100%, | ||
0% 100% | ||
); | ||
$breadcrumbPolygon: polygon( | ||
$euiSizeS 0%, | ||
100% 0%, | ||
calc(100% - #{$euiSizeS}) 100%, | ||
0% 100% | ||
); | ||
|
||
.osdHeaderBreadcrumbs { | ||
/* | ||
filter defines a custom filter effect by grouping atomic filter primitives! | ||
here we are using Gaussian filter with stdDeviation for applying | ||
border-radius on clipped background. | ||
*/ | ||
|
||
filter: url("../../public/assets/round_filter.svg#round"); | ||
|
||
.osdBreadcrumbs { | ||
clip-path: $breadcrumbPolygon; | ||
background-color: $osdHeaderBreadcrumbGrayBackground; | ||
padding: $euiSizeXS - 2.5 $euiSizeL - $euiSizeXS; | ||
|
||
&:first-child { | ||
clip-path: $firstBreadcrumbPolygon; | ||
} | ||
|
||
&:last-child { | ||
background-color: $osdHeaderBreadcrumbBlueBackground; | ||
} | ||
} | ||
|
||
.euiBreadcrumbSeparator { | ||
display: none; | ||
} | ||
|
||
.euiBreadcrumb__collapsedLink { | ||
color: $osdHeaderBreadcrumbCollapsedLink; | ||
background: $euiColorEmptyShade; | ||
} | ||
|
||
.euiPopover__anchor { | ||
padding: 0 $euiSizeS; | ||
} | ||
|
||
.euiBreadcrumb:not(.euiBreadcrumb:last-child) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just overriding the already existing css! so going with what they already have! |
||
margin-right: 0; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,8 @@ import useObservable from 'react-use/lib/useObservable'; | |
import { Observable } from 'rxjs'; | ||
import { ChromeBreadcrumb } from '../../chrome_service'; | ||
|
||
import './header_breadcrumbs.scss'; | ||
|
||
interface Props { | ||
appTitle$: Observable<string>; | ||
breadcrumbs$: Observable<ChromeBreadcrumb[]>; | ||
|
@@ -57,7 +59,15 @@ export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$ }: Props) { | |
i === 0 && 'first', | ||
i === breadcrumbs.length - 1 && 'last' | ||
Comment on lines
59
to
60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are these still needed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes! this is from data-test-subj! this part we are not touching! |
||
), | ||
className: classNames('osdBreadcrumbs'), | ||
})); | ||
|
||
return <EuiHeaderBreadcrumbs breadcrumbs={crumbs} max={10} data-test-subj="breadcrumbs" />; | ||
return ( | ||
<EuiHeaderBreadcrumbs | ||
breadcrumbs={crumbs} | ||
max={10} | ||
data-test-subj="breadcrumbs" | ||
className="osdHeaderBreadcrumbs" | ||
/> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 2.5 $euiSizeL
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
padding:
top and bottom paddings are $euiSizeXS - 2.5 => 1.5px
right and left paddings are $euiSizeL - $euiSizeXS => 20px