-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat(insights): trends hogql volume #15672
Conversation
…nto trends-aggregate-hogql
…nto trends-aggregate-hogql
…nto trends-aggregate-hogql
frontend/src/scenes/insights/filters/ActionFilter/ActionFilterRow/ActionFilterRow.tsx
Outdated
Show resolved
Hide resolved
fc1f048
to
1b6072e
Compare
…nds-aggregate-hogql
…Row/ActionFilterRow.tsx Co-authored-by: Michael Matloka <dev@twixes.com>
math?: BaseMathType | PropertyMathType | CountPerActorMathType | GroupMathType | HogQLMathType | ||
math_property?: string | ||
math_hogql?: string | ||
math_group_type_index?: 0 | 1 | 2 | 3 | 4 |
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.
In terms of data modeling, this should really be just one math
property, as it doesn't make sense for e.g math_hogql
to be set if math
is not HogQLMathType
– or vice versa.
Ideally this'd be like:
math: TrendsMath
and then TrendsMath
would be { type: HogQLMathType, expression: string } | { type: PropertyMathType, property: string } | ...
Not for this PR though I suppose.
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.
Looks good to me, just found one tricky UI issue with truncating the expression in legends
if (math === 'hogql') { | ||
return ( | ||
<Tag title={String(mathHogQL)}> | ||
{String(mathHogQL).length > 10 ? `${mathHogQL?.substring(0, 10)}...` : String(mathHogQL ?? '')} |
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.
The 10 character limit is a bit frustrating, having just played around with this. It's short enough that even something extremely trivial like sum(property.amount)
gets cut off, which makes those legends effectively useless. Can we relax this limit? Ideally relying on CSS
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.
📸 UI snapshots have been updated3 snapshot changes in total. 0 added, 3 modified, 0 deleted:
Triggered by this commit. |
…nto trends-aggregate-hogql
Problem
There are only a limited number of ways to display trends volume.
Changes
Adds HogQL expressions
How did you test this code?