Skip to content
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

chore(editor-3001): fix icon sizing and add beta tag #26977

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/src/layout/navigation-3000/Navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,15 @@
&:hover {
background: var(--border-3000);
}

.SidebarListItem__icon {
flex-shrink: 0;
}

.SidebarListItem__name {
overflow: hidden;
text-overflow: ellipsis;
}
}

.SidebarListItem__rename {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ function SidebarListItem({ item, validateName, active, style }: SidebarListItemP
if (isItemClickable(item)) {
content = (
<li className="SidebarListItem__button" onClick={item.onClick}>
{item.icon}
<h5>{item.name}</h5>
{item.icon && <div className="SidebarListItem__icon">{item.icon}</div>}
<h5 className="SidebarListItem__name">{item.name}</h5>
</li>
)
} else if (!save || (!isItemTentative(item) && newName === null)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LemonButton, Tooltip } from '@posthog/lemon-ui'
import { LemonButton, LemonTag, Tooltip } from '@posthog/lemon-ui'
import { useActions, useValues } from 'kea'
import { LemonTable } from 'lib/lemon-ui/LemonTable'
import { humanFriendlyDetailedTime } from 'lib/utils'
Expand All @@ -18,7 +18,10 @@ export function InfoTab({ codeEditorKey }: InfoTabProps): JSX.Element {
return (
<div className="flex flex-col flex-1 m-4 gap-4">
<div>
<h3>Materialization</h3>
<div className="flex flex-row items-center gap-2">
<h3 className="mb-0">Materialization</h3>
<LemonTag type="warning">BETA</LemonTag>
</div>
<div>
{isEditingMaterializedView ? (
<div>
Expand All @@ -38,19 +41,25 @@ export function InfoTab({ codeEditorKey }: InfoTabProps): JSX.Element {
</LemonButton>
</div>
) : (
<LemonButton
onClick={() => editingView && runDataWarehouseSavedQuery(editingView.id)}
type="primary"
disabledReason={editingView ? undefined : 'You must save the view first'}
>
Materialize
</LemonButton>
<div>
<p>
Materialized views are a way to pre-compute data in your data warehouse. This allows you
to run queries faster and more efficiently.
</p>
<LemonButton
onClick={() => editingView && runDataWarehouseSavedQuery(editingView.id)}
type="primary"
disabledReason={editingView ? undefined : 'You must save the view first'}
>
Materialize
</LemonButton>
</div>
)}
</div>
</div>
<div>
<h3>Dependencies</h3>
<p className="text-muted">
<p>
Dependencies are tables that this query uses. See when a source or materialized table was last run.
</p>
</div>
Expand Down
Loading