-
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
[Bug] Fix Global Breadcrumb Styling in dark mode #2085
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -40,11 +40,13 @@ import './header_breadcrumbs.scss'; | |
interface Props { | ||
appTitle$: Observable<string>; | ||
breadcrumbs$: Observable<ChromeBreadcrumb[]>; | ||
isDarkMode?: boolean; | ||
} | ||
|
||
export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$ }: Props) { | ||
export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$, isDarkMode }: Props) { | ||
const appTitle = useObservable(appTitle$, 'OpenSearch Dashboards'); | ||
const breadcrumbs = useObservable(breadcrumbs$, []); | ||
const className = isDarkMode ? 'osdHeaderBreadcrumbs--dark' : 'osdHeaderBreadcrumbs'; | ||
let crumbs = breadcrumbs; | ||
|
||
if (breadcrumbs.length === 0 && appTitle) { | ||
|
@@ -67,7 +69,7 @@ export function HeaderBreadcrumbs({ appTitle$, breadcrumbs$ }: Props) { | |
breadcrumbs={crumbs} | ||
max={10} | ||
data-test-subj="breadcrumbs" | ||
className="osdHeaderBreadcrumbs" | ||
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. I can understand for the shape but looking at the original implementation could the theming being retrieved and applied by the shared ui dep package and applied as a prop to the existing bread crumb. That way the shape is handled in our repo but we rely on the theme from OUI? 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. We have not made any changes to OUI yet! this whole css/style issue will be part of OUI in future! we will have separate ticket for that 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. Yeah sorry about the confusion. What I mean is how come the bread crumb class that we've added has it's own dark mode css instead of pulling the theme from OUI (previously EUI) via the shared ui dep package? Seems like that is the standard within the repo. And then the only new CSS in this repo that we added was with the shape. 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. I thought these dark mode changes will be part of OUI theming in future but at the moment they are not. so we have diffs css! I will confirm with ux team once! Is it right @kgcreative ? 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. I'm probably not the best person to talk about CSS implementation details. I would follow whatever guidance we have from a system perspective. The long term plan is to fold these into the updated OUI theme, but we're a long way from that. |
||
className={className} | ||
/> | ||
); | ||
} |
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.
Was there a style guide approved color that we are using for this?
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.
most of these colors are not part of EUI/OUI. these are new colors and eventually will be part of OUI theming. we will be removing these colors once we start working on OUI and breadcrumb will be part of OUI