posthog icon indicating copy to clipboard operation
posthog copied to clipboard

fix(hogql): element tag name only if no selector

Open mariusandra opened this issue 1 year ago â€ĸ 5 comments

Problem

Turns out we save a tag_name when creating an action, and later use that field in the HogQL elements chain regex. The problem is we never show this field to users, and if you clone an action, you have no way of changing this field. It might be wrong.

Changes

Stop using the tag name in HogQL powered elements queries. We should only use the selector.

The right fix is to stop populating that field. This is just band aid in restoring old behaviour and ignoring the tag name.

How did you test this code?

Updated the relevant test, also a snapshot was changed.

mariusandra avatar Apr 19 '24 14:04 mariusandra

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 26 '24 08:04 posthog-bot

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

  • chromium: 0 added, 2 modified, 0 deleted (diff for shard 1)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar Apr 26 '24 08:04 posthog-bot

Size Change: 0 B

Total Size: 1.05 MB

â„šī¸ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.05 MB

compressed-size-action

github-actions[bot] avatar Apr 26 '24 09:04 github-actions[bot]

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 06 '24 07:05 posthog-bot

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

posthog-bot avatar May 14 '24 07:05 posthog-bot

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar May 20 '24 20:05 posthog-bot

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

  • chromium: 0 added, 1 modified, 0 deleted (diff for shard 2)
  • webkit: 0 added, 0 modified, 0 deleted

Triggered by this commit.

👉 Review this PR's diff of snapshots.

posthog-bot avatar May 20 '24 20:05 posthog-bot