Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Dev mode - allow testing a user not being included in an experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
jdorn committed Apr 8, 2021
1 parent 65708b8 commit 4477ba1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"typescript": "^4.2.3"
},
"dependencies": {
"@growthbook/growthbook": "^0.9.1"
"@growthbook/growthbook": "^0.9.2"
},
"description": "Powerful A/B testing for React Apps",
"repository": {
Expand Down
12 changes: 11 additions & 1 deletion src/dev/VariationSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default function VariationSwitcher({
background: ${COLORS.bg};
border: 2px solid ${COLORS.text};
text-align: center;
line-height: 26px;
line-height: 20px;
box-sizing: border-box;
font-size: 24px;
box-shadow: 0 0 6px 2px ${COLORS.shadow};
Expand Down Expand Up @@ -289,6 +289,16 @@ export default function VariationSwitcher({
</h5>
<table>
<tbody>
<tr
className={assigned === -1 ? 'current' : ''}
onClick={(e) => {
e.preventDefault();
forceVariation(key, -1);
}}
>
<th>-1</th>
<td><em>not in experiment</em></td>
</tr>
{possible.map((value, i) => (
<tr
key={i}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -881,10 +881,10 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@growthbook/growthbook@^0.9.1":
version "0.9.1"
resolved "https://registry.yarnpkg.com/@growthbook/growthbook/-/growthbook-0.9.1.tgz#86471e94d5031acf975ab8de2dac7c30a907c516"
integrity sha512-iLw7fsF2qSJ1jT63SHqs9+QfafUDXJsSoV6r8YvtuywLnfw428H7TgdAAMwtTXWTSwHCaIwBnoVxFB6ktRJy4A==
"@growthbook/growthbook@^0.9.2":
version "0.9.2"
resolved "https://registry.yarnpkg.com/@growthbook/growthbook/-/growthbook-0.9.2.tgz#080f2f1d2f83d462e26cda7aa972cf9fdbd6f39d"
integrity sha512-TQXUhIfuA8TAuUrXOWpJOQNCxXI08F9Y33J02plFjSXGm82b35UVcJWmc45DTXiNGnU8ZDu66wjPgT/tgnf/yQ==

"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
Expand Down

0 comments on commit 4477ba1

Please sign in to comment.