Skip to content

Commit

Permalink
chore(3000): Dark mode improvements (#18784)
Browse files Browse the repository at this point in the history
* contrast secondary text from title

* removed unnecessary project home hr in 3000

* fixed dark border color

* Update UI snapshots for `chromium` (1)

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
corywatilo and github-actions[bot] authored Nov 21, 2023
1 parent 41f7799 commit 5e42266
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
Binary file modified frontend/__snapshots__/posthog-3000-navigation--navigation-3000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions frontend/src/lib/components/CompactList/CompactList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@
overflow: auto auto;
padding: 0 0.5rem 0.5rem;
}

.secondary-text {
color: var(--text-secondary);
}
}
7 changes: 6 additions & 1 deletion frontend/src/lib/components/PageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { LemonDivider } from 'lib/lemon-ui/LemonDivider'
import { createPortal } from 'react-dom'
import { DraggableToNotebook, DraggableToNotebookProps } from 'scenes/notebooks/AddToNotebook/DraggableToNotebook'
import { breadcrumbsLogic } from '~/layout/navigation/Breadcrumbs/breadcrumbsLogic'
import { featureFlagLogic } from 'lib/logic/featureFlagLogic'
import { FEATURE_FLAGS } from 'lib/constants'

interface PageHeaderProps {
title: string | JSX.Element
Expand All @@ -29,6 +31,9 @@ export function PageHeader({
}: PageHeaderProps): JSX.Element | null {
const is3000 = useFeatureFlag('POSTHOG_3000')
const { actionsContainer } = useValues(breadcrumbsLogic)
const { featureFlags } = useValues(featureFlagLogic)

const has3000 = featureFlags[FEATURE_FLAGS.POSTHOG_3000]

return (
<>
Expand All @@ -52,7 +57,7 @@ export function PageHeader({
{is3000 && buttons && actionsContainer && createPortal(buttons, actionsContainer)}

{caption && <div className={clsx('page-caption', tabbedPage && 'tabbed')}>{caption}</div>}
{delimited && <LemonDivider className="my-4" />}
{delimited && <LemonDivider className={has3000 ? 'hidden' : 'my-4'} />}
</>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ProjectHomePageCompactListItem({

<div className="truncate space-y-1 flex-1">
<div className="text-link font-semibold truncate">{title}</div>
<div className="truncate text-default font-normal">{subtitle}</div>
<div className="truncate text-default font-normal secondary-text">{subtitle}</div>
</div>

{suffix ? <span className="shrink-0">{suffix}</span> : null}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/styles/vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ $colors: (
'secondary-3000-hover-dark': #575d77,
'accent-3000-dark': #232429,
'bg-3000-dark': #1d1f27,
'border-3000-dark': #2b2c32,
'border-3000-dark': #4a4c52,
'border-bold-3000-dark': #3f4046,
'glass-bg-3000-dark': #1d1f27b3,
'glass-border-3000-dark': var(--border-3000-dark),
Expand Down

0 comments on commit 5e42266

Please sign in to comment.