- Notifications
You must be signed in to change notification settings - Fork1k
refactor(site): refactor DAU chart to avoid seat consumption focus#15307
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -22,9 +22,3 @@ export default meta; | ||
type Story = StoryObj<typeof ActiveUserChart>; | ||
export const Example: Story = {}; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -14,7 +14,6 @@ import { | ||
Tooltip, | ||
defaults, | ||
} from "chart.js"; | ||
import { | ||
HelpTooltip, | ||
HelpTooltipContent, | ||
@@ -36,21 +35,16 @@ ChartJS.register( | ||
Title, | ||
Tooltip, | ||
Legend, | ||
); | ||
export interface ActiveUserChartProps { | ||
data: readonly { date: string; amount: number }[]; | ||
interval: "day" | "week"; | ||
} | ||
export const ActiveUserChart: FC<ActiveUserChartProps> = ({ | ||
data, | ||
interval, | ||
}) => { | ||
const theme = useTheme(); | ||
@@ -64,24 +58,6 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({ | ||
responsive: true, | ||
animation: false, | ||
plugins: { | ||
legend: { | ||
display: false, | ||
}, | ||
@@ -103,7 +79,6 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({ | ||
precision: 0, | ||
}, | ||
}, | ||
x: { | ||
grid: { color: theme.palette.divider }, | ||
ticks: { | ||
@@ -138,32 +113,26 @@ export const ActiveUserChart: FC<ActiveUserChartProps> = ({ | ||
); | ||
}; | ||
type ActiveUsersTitleProps = { | ||
interval: "day" | "week"; | ||
}; | ||
export const ActiveUsersTitle: FC<ActiveUsersTitleProps> = ({ interval }) => { | ||
return ( | ||
<div css={{ display: "flex", alignItems: "center", gap: 8 }}> | ||
{interval === "day" ? "Daily" : "Weekly"}Active Users | ||
<HelpTooltip> | ||
<HelpTooltipTrigger size="small" /> | ||
<HelpTooltipContent> | ||
<HelpTooltipTitle>How do we calculate active users?</HelpTooltipTitle> | ||
<HelpTooltipText> | ||
When a connection is initiated to a user's workspace they are | ||
considered an active user. e.g. apps, web terminal, SSH. This is for | ||
measuring user activity and has no connection to license | ||
consumption. | ||
</HelpTooltipText> | ||
Comment on lines 128 to 133 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 am okay with the new messaging. 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 is great! | ||
</HelpTooltipContent> | ||
</HelpTooltip> | ||
</div> | ||
); | ||
}; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -868,11 +868,3 @@ export const Loaded: Story = { | ||
}, | ||
}, | ||
}; | ||
Uh oh!
There was an error while loading.Please reload this page.