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

refactor(hogql): remove display from stickiness insights #17854

Closed
wants to merge 1 commit into from
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ describe('filtersToQueryNode', () => {
compare: true,
show_legend: true,
hidden_legend_indexes: [0, 10],
display: ChartDisplayType.ActionsLineGraph,
},
}
expect(result).toEqual(query)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ export const filtersToQueryNode = (filters: Partial<FilterType>): InsightQueryNo
// stickiness filter
if (isStickinessFilter(filters) && isStickinessQuery(query)) {
query.stickinessFilter = objectCleanWithEmpty({
display: filters.display,
compare: filters.compare,
show_legend: filters.show_legend,
hidden_legend_indexes: cleanHiddenLegendIndexes(filters.hidden_legend_keys),
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/queries/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2030,9 +2030,6 @@
"compare": {
"type": "boolean"
},
"display": {
"$ref": "#/definitions/ChartDisplayType"
},
"hidden_legend_indexes": {
"items": {
"type": "number"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/queries/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ export interface PathsQuery extends InsightsQueryBase {
* and `hidden_legend_keys` replaced by `hidden_legend_indexes` */
export type StickinessFilter = Omit<
StickinessFilterType & { hidden_legend_indexes?: number[] },
keyof FilterType | 'hidden_legend_keys' | 'stickiness_days' | 'shown_as'
keyof FilterType | 'hidden_legend_keys' | 'stickiness_days' | 'shown_as' | 'display'
>
export interface StickinessQuery extends InsightsQueryBase {
kind: NodeKind.StickinessQuery
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/scenes/insights/insightVizDataLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const insightVizDataLogic = kea<insightVizDataLogicType>([
isStickiness: [(s) => [s.querySource], (q) => isStickinessQuery(q)],
isLifecycle: [(s) => [s.querySource], (q) => isLifecycleQuery(q)],
isTrendsLike: [(s) => [s.querySource], (q) => isTrendsQuery(q) || isLifecycleQuery(q) || isStickinessQuery(q)],
supportsDisplay: [(s) => [s.querySource], (q) => isTrendsQuery(q) || isStickinessQuery(q)],
supportsDisplay: [(s) => [s.querySource], (q) => isTrendsQuery(q)],
supportsCompare: [(s) => [s.querySource], (q) => isTrendsQuery(q) || isStickinessQuery(q)],
supportsPercentStackView: [
(s) => [s.querySource, s.display],
Expand Down
1 change: 0 additions & 1 deletion posthog/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ class StickinessFilter(BaseModel):
extra="forbid",
)
compare: Optional[bool] = None
display: Optional[ChartDisplayType] = None
hidden_legend_indexes: Optional[List[float]] = None
show_legend: Optional[bool] = None
show_values_on_series: Optional[bool] = None
Expand Down
Loading