Skip to content

Add posthog testing to header buttons#198

Merged
LZylstra merged 5 commits intomainfrom
header-testing
Sep 3, 2025
Merged

Add posthog testing to header buttons#198
LZylstra merged 5 commits intomainfrom
header-testing

Conversation

@LZylstra
Copy link
Contributor

@LZylstra LZylstra commented Jul 21, 2025

Add posthog AB testing to Button Groups

Works with flow [PostHog] Create Variants to set up button groups with a posthog experiement and create variants

@LZylstra LZylstra self-assigned this Jul 21, 2025
@netlify
Copy link

netlify bot commented Jul 21, 2025

Deploy Preview for directus-website ready!

Name Link
🔨 Latest commit dc2f8b1
🔍 Latest deploy log https://app.netlify.com/projects/directus-website/deploys/68b878cb7f11fc00088352bc
😎 Deploy Preview https://deploy-preview-198--directus-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds PostHog A/B testing capabilities to button groups, allowing for experimentation with different header button configurations. The implementation extends the existing button group functionality to support experiment variants that can be dynamically selected based on PostHog feature flags.

  • Adds experiment-related fields to button group schemas and types
  • Implements A/B testing logic in the ButtonGroup component using PostHog feature flags
  • Updates the header component to support the new experiment-enabled button groups

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
types/schema/schema.ts Adds HeaderButtonVariant type import and schema definition
types/schema/meta/globals.ts Defines HeaderButtonVariant interface and adds it to Globals
types/schema/blocks/block-button-group.ts Extends BlockButtonGroup with experiment fields and adds ButtonGroupWithExperiment interface
components/Nav/Header.vue Updates data fetching variable names for consistency
components/Block/ButtonGroup.vue Implements A/B testing logic using PostHog feature flags

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Member

@bryantgillespie bryantgillespie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@LZylstra LZylstra merged commit 5934915 into main Sep 3, 2025
6 checks passed
@LZylstra LZylstra deleted the header-testing branch September 3, 2025 17:34
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.

2 participants

Comments