Skip to content

Conversation

i-hardy
Copy link
Contributor

@i-hardy i-hardy commented Aug 14, 2025

What does this change?

Introduces the Svelte-based A/B testing report page from the #13798 proof of concept PR, with some minor refactoring to handle changes to the A/B test data shape.

Duplicates the A/B test type and definition files from #14333

Why?

ComDev are introducing a new AB testing framework using Fastly's edge dictionaries rather than A/B test definitions existing solely in code and needing to be duplicated in both DCR and Frontend. Due to Frontend no longer having access to test definitions we need a replacement for the current reporting page on the Frontend Admin Tool which gives an overview of currently-running tests. This new implementation builds a tiny Svelte app into an HTML file which is then accessed and served in an iframe in the admin tool- see guardian/frontend#28000 for more details.

Screenshots

Screenshot 2025-08-14 at 15-48-25

Only real update from the initial implementation on the POC branch is a small paragraph explaining that the representation of audience segment allocation in the graphs may not correspond to MVT ID allocation, as we no longer explicitly define each test's audience offset.

@i-hardy i-hardy requested a review from a team as a code owner August 14, 2025 15:12
Copy link

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

Copy link

github-actions bot commented Aug 14, 2025

Copy link
Contributor

@deedeeh deedeeh left a comment

Choose a reason for hiding this comment

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

Great work @i-hardy 👏🏼 👏🏼 I left a few comments but they are small ones.


## Developing

Install dependencies with `deno install` (or `pnpm install`), then start a development server:
Copy link
Contributor

Choose a reason for hiding this comment

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

When I tried to run locally pnpm install it didn't really work for me and I was on the ab-testing/frontend directory level but the dependencies were installed by running deno install so maybe this requires updating?


## Building

The project is set up to build the entire Svelte application into a single HTML file. This can be run locally with `deno run build`, with the resulting file put into `/output`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the /output not in a .gitignore on purpose? I understand that will happen in the CI and for local testing we don't need to track changes in that directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be in the gitignore, I missed that when moving the code over from the POC branch! Thanks for spotting it!

Copy link

github-actions bot commented Aug 22, 2025

Copy link
Contributor

@deedeeh deedeeh left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the comments @i-hardy 👍🏼 I can see the build failed because of playwright 1 test which The Filter team fixed it so when you merge main into this branch it should pass.

@i-hardy i-hardy added the run_chromatic Runs chromatic when label is applied label Aug 27, 2025
@github-actions github-actions bot removed the run_chromatic Runs chromatic when label is applied label Aug 27, 2025
@i-hardy i-hardy merged commit b3ba16f into main Aug 27, 2025
34 checks passed
@i-hardy i-hardy deleted the ih/ab-testing-ui-branch branch August 27, 2025 13:33
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