Skip to content

Closes #315 (2) more prominent toolbar button#335

Merged
timgl merged 1 commit intomasterfrom
315-pt-2-more-prominent-toolbar-button
Mar 12, 2020
Merged

Closes #315 (2) more prominent toolbar button#335
timgl merged 1 commit intomasterfrom
315-pt-2-more-prominent-toolbar-button

Conversation

@timgl
Copy link
Copy Markdown
Collaborator

@timgl timgl commented Mar 11, 2020

image
image

Think this is a lot more obvious now, with clear links to docs

@Tannergoods Ready for QA. I touched everything to do with Actions and the toolbar so both of those need good QA :)

@timgl timgl temporarily deployed to posthog-315-pt-2-more-p-blridu March 11, 2020 23:57 Inactive
@Tannergoods
Copy link
Copy Markdown
Contributor

Thoughts: New Action button is much better, trying to pick holes, "Save action" is confusing as it's already saved but not that impactful.

I wasn't sure how to add a custom event in this deployment - this hasn't been QA'd

Apart from that I'm concerned I haven't found anything! It looks really good, and feels very intuitive

@timgl timgl merged commit 57b3d1e into master Mar 12, 2020
@timgl timgl deleted the 315-pt-2-more-prominent-toolbar-button branch March 12, 2020 16:51
@Tannergoods Tannergoods linked an issue Mar 13, 2020 that may be closed by this pull request
rafaeelaudibert pushed a commit that referenced this pull request Apr 21, 2026
## Problem

On an insight breakdown, if a user picks the SQL expression option and enters a non-trivial expression (e.g. `countIf(properties.$browser = 'Chrome')`), the raw expression is used verbatim as the column/series label. That's unreadable in charts and tables. Today, a user can work around this by aliasing the expression — either with `AS column_name` or with a trailing `-- column_name` comment — but there's no in-product hint that this is an option.

Context: [support ticket #335](https://posthog.slack.com/archives/C094MLV8SKX/p1775761471898039).

## Changes

- Added a `showBreakdownLabelHint` prop to `HogQLEditor`. When set, and the current buffered expression is longer than 20 characters and doesn't already end in an `AS <name>` alias or contain a `-- <name>` comment label, a small secondary-text tip is rendered directly under the editor hint:

  > Tip: add `AS column_name` or `-- column_name` to the end of your expression to use a readable label for this breakdown.

- Threaded the flag from `TaxonomicFilter` → `taxonomicFilterLogic` → the HogQL expression group's `componentProps` → `InlineHogQLEditor` → `HogQLEditor`, so the hint can be opted into per TaxonomicFilter usage.
- Set `hogQLExpressionShowBreakdownLabelHint` on the `TaxonomicFilter` rendered from `TaxonomicBreakdownPopover`, so the hint only appears in the insights breakdown flow (not in property filters, column selectors, etc., which also use the same editor).
- Combined the new prop with `hogQLGlobals` into a single `hogQLExpressionComponentProps` selector to stay within kea's `SelectorTuple` length limit on the `taxonomicGroups` selector.

## How did you test this code?

- `pnpm --filter=@posthog/frontend typescript:check` reports the same number of pre-existing errors before and after this change (no new TS errors introduced).
- `pnpm --filter=@posthog/frontend format` runs cleanly.
- No manual browser test performed in this agent environment — the dev server wasn't started, so the UI change itself has not been interactively verified. Reviewers should spot-check the breakdown popover with short (<= 20 char) expressions, long expressions, and long expressions that already use `AS` or `-- name`.

## Publish to changelog?

no

## 🤖 LLM context

Authored by PostHog Code based on a Slack request to surface the `AS column_name` / `-- column_name` workaround as an in-product hint on SQL breakdowns, gated on expression length > 20 characters.

---
*Created with [PostHog Code](https://posthog.com/code?ref=pr)*
thmsobrmlr pushed a commit that referenced this pull request Apr 21, 2026
## Problem

On an insight breakdown, if a user picks the SQL expression option and enters a non-trivial expression (e.g. `countIf(properties.$browser = 'Chrome')`), the raw expression is used verbatim as the column/series label. That's unreadable in charts and tables. Today, a user can work around this by aliasing the expression — either with `AS column_name` or with a trailing `-- column_name` comment — but there's no in-product hint that this is an option.

Context: [support ticket #335](https://posthog.slack.com/archives/C094MLV8SKX/p1775761471898039).

## Changes

- Added a `showBreakdownLabelHint` prop to `HogQLEditor`. When set, and the current buffered expression is longer than 20 characters and doesn't already end in an `AS <name>` alias or contain a `-- <name>` comment label, a small secondary-text tip is rendered directly under the editor hint:

  > Tip: add `AS column_name` or `-- column_name` to the end of your expression to use a readable label for this breakdown.

- Threaded the flag from `TaxonomicFilter` → `taxonomicFilterLogic` → the HogQL expression group's `componentProps` → `InlineHogQLEditor` → `HogQLEditor`, so the hint can be opted into per TaxonomicFilter usage.
- Set `hogQLExpressionShowBreakdownLabelHint` on the `TaxonomicFilter` rendered from `TaxonomicBreakdownPopover`, so the hint only appears in the insights breakdown flow (not in property filters, column selectors, etc., which also use the same editor).
- Combined the new prop with `hogQLGlobals` into a single `hogQLExpressionComponentProps` selector to stay within kea's `SelectorTuple` length limit on the `taxonomicGroups` selector.

## How did you test this code?

- `pnpm --filter=@posthog/frontend typescript:check` reports the same number of pre-existing errors before and after this change (no new TS errors introduced).
- `pnpm --filter=@posthog/frontend format` runs cleanly.
- No manual browser test performed in this agent environment — the dev server wasn't started, so the UI change itself has not been interactively verified. Reviewers should spot-check the breakdown popover with short (<= 20 char) expressions, long expressions, and long expressions that already use `AS` or `-- name`.

## Publish to changelog?

no

## 🤖 LLM context

Authored by PostHog Code based on a Slack request to surface the `AS column_name` / `-- column_name` workaround as an in-product hint on SQL breakdowns, gated on expression length > 20 characters.

---
*Created with [PostHog Code](https://posthog.com/code?ref=pr)*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create actions from the events page

2 participants