-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: ui dark theme transition #12068
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -12,10 +12,13 @@ export interface LayoutProps { | |||||
isExtension?: boolean; | ||||||
} | ||||||
|
||||||
const getBGColor = (theme: string): string => (theme === 'light' ? '#dee6eb' : '#100f0f'); | ||||||
|
||||||
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. This could be simplified to one line. Also can we use existing colors for the new two colors? For example,
Suggested change
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. Solved, thanks Yi |
||||||
export const Layout = (props: LayoutProps) => ( | ||||||
<div className={props.pref.theme ? 'theme-' + props.pref.theme : 'theme-light'}> | ||||||
<div className={`cd-layout ${props.isExtension ? 'cd-layout--extension' : ''}`}> | ||||||
<Sidebar onVersionClick={props.onVersionClick} navItems={props.navItems} pref={props.pref} /> | ||||||
{props.pref.theme ? (document.body.style.background = getBGColor(props.pref.theme)) : null} | ||||||
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. |
||||||
<div className={`cd-layout__content ${props.pref.hideSidebar ? 'cd-layout__content--sb-collapsed' : 'cd-layout__content--sb-expanded'} custom-styles`}> | ||||||
{props.children} | ||||||
</div> | ||||||
|
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.
Question: does this apply for light mode only? (Or, maybe this should not be part of the fix?)
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.
Yeah, it is not related to transition, just a small fix related to compact diff menu
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.
It does relate to dark/light mode change
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.
Ok, the text was not showing.