Skip to content

Button experiment flag test#74

Merged
LindseyB merged 6 commits intomainfrom
button-experiment-flag-test
Feb 1, 2026
Merged

Button experiment flag test#74
LindseyB merged 6 commits intomainfrom
button-experiment-flag-test

Conversation

@LindseyB
Copy link
Owner

@LindseyB LindseyB commented Feb 1, 2026

This pull request introduces an A/B experiment for the main call-to-action (CTA) button using LaunchDarkly, along with significant visual updates to button styles for both light and dark modes. The changes focus on enabling experiment-driven styling for the main CTA button, refactoring general button styles to use an outlined look by default, and ensuring dark mode compatibility.

Experiment integration and feature flagging:

  • Added a new ld-experiment.js script that initializes the LaunchDarkly SDK, checks the get-horoscope-main-button-experiment flag, and dynamically toggles the main-cta class on the main horoscope button based on the experiment variant.
  • Updated index.html to load the LaunchDarkly JS SDK and the new experiment script.

Button style refactoring:

  • Refactored default button styles in style.css to use an outlined appearance (transparent background, colored border, and text), with hover and active states providing subtle color changes. Box shadows and gradients were removed from standard buttons for a cleaner look. [1] [2] [3] [4] [5]

Main CTA and dark mode styling:

  • Added new CSS rules for .button-group button.main-cta to provide a prominent gradient background, larger font, and stronger box shadow, including hover/active states and dark mode variants.
  • Enhanced dark mode support for outlined buttons and the main CTA, ensuring appropriate color and contrast adjustments.

@LindseyB LindseyB requested a review from Copilot February 1, 2026 04:32
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 implements an A/B experiment for the main horoscope button using LaunchDarkly feature flags, while also refactoring the button styling system to use an outlined design by default with enhanced dark mode support.

Changes:

  • Integrated LaunchDarkly SDK with experiment logic to conditionally apply a main-cta class to the horoscope button
  • Refactored default button styles from gradient-filled to outlined (transparent background with colored border)
  • Added distinct styling for the experimental main CTA button variant with gradients and shadows, including dark mode variations

Reviewed changes

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

File Description
templates/index.html Added LaunchDarkly SDK and experiment script imports
static/js/ld-experiment.js Implements experiment logic to toggle main-cta class based on feature flag
static/css/style.css Refactored button styles to outlined design and added main CTA experiment variant styles

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

LindseyB and others added 3 commits January 31, 2026 20:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Feb 1, 2026

LaunchDarkly flag references

🔍 1 flag added or modified

Name Key Aliases found Info
Get horoscope, main button experiment get-horoscope-main-button-experiment

@LindseyB LindseyB merged commit d6d0f53 into main Feb 1, 2026
2 checks passed
@LindseyB LindseyB deleted the button-experiment-flag-test branch February 1, 2026 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant