Skip to content
This repository was archived by the owner on Apr 7, 2025. It is now read-only.

Commit 4398139

Browse files
committed
feat: Update theme to include A/B testing button
1 parent 5dbf35f commit 4398139

File tree

9 files changed

+778
-869
lines changed

9 files changed

+778
-869
lines changed

gatsby-config.js

+13
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ module.exports = {
7878
}),
7979
},
8080
},
81+
splitio: {
82+
// Mocked features only used when in localhost mode
83+
// https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#localhost-mode
84+
features: {
85+
free_account_button_color: {
86+
treatment: 'off',
87+
},
88+
},
89+
core: {
90+
authorizationKey: process.env.SPLITIO_AUTH_KEY || 'localhost',
91+
},
92+
debug: false,
93+
},
8194
},
8295
},
8396
{

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@emotion/styled": "^11.3.0",
1010
"@mdx-js/mdx": "^1.6.22",
1111
"@mdx-js/react": "^1.6.22",
12-
"@newrelic/gatsby-theme-newrelic": "^2.0.1",
12+
"@newrelic/gatsby-theme-newrelic": "2.2.0",
1313
"@splitsoftware/splitio-react": "^1.2.4",
1414
"date-fns": "^2.17.0",
1515
"feather-icons": "^4.28.0",

src/components/__tests__/__snapshots__/Header.spec.js.snap

+47-60
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
exports[`Header renders correctly 1`] = `
44
Array [
5-
.emotion-87 {
5+
@keyframes animation-0 {
6+
to {
7+
-webkit-transform: rotate(1turn);
8+
-moz-transform: rotate(1turn);
9+
-ms-transform: rotate(1turn);
10+
transform: rotate(1turn);
11+
}
12+
}
13+
14+
.emotion-86 {
615
background-color: var(--color-neutrals-100);
716
position: -webkit-sticky;
817
position: sticky;
@@ -11,20 +20,20 @@ Array [
1120
z-index: 700;
1221
}
1322
14-
.dark-mode .emotion-87 {
23+
.dark-mode .emotion-86 {
1524
background-color: var(--color-dark-100);
1625
}
1726
18-
.emotion-87 ul {
27+
.emotion-86 ul {
1928
line-height: 14px;
2029
font-size: 16px;
2130
}
2231
23-
.emotion-87 a {
32+
.emotion-86 a {
2433
border-bottom: none;
2534
}
2635
27-
.emotion-86 {
36+
.emotion-85 {
2837
height: var(--global-header-height);
2938
display: -webkit-box;
3039
display: -webkit-flex;
@@ -1763,7 +1772,7 @@ Array [
17631772
color: var(--color-dark-700);
17641773
}
17651774
1766-
.emotion-85 {
1775+
.emotion-84 {
17671776
margin: 0;
17681777
margin-left: 1rem;
17691778
padding: 0;
@@ -1781,18 +1790,18 @@ Array [
17811790
flex: 1;
17821791
}
17831792
1784-
.emotion-85 >li {
1793+
.emotion-84 >li {
17851794
-webkit-transition: all 0.2s ease-out;
17861795
transition: all 0.2s ease-out;
17871796
color: var(--secondary-text-color);
17881797
}
17891798
1790-
.emotion-85 >li:not(:first-of-type) {
1799+
.emotion-84 >li:not(:first-of-type) {
17911800
margin-left: 0.5rem;
17921801
}
17931802
17941803
@media screen and (max-width: 760px) {
1795-
.emotion-85 {
1804+
.emotion-84 {
17961805
-webkit-flex: unset;
17971806
-ms-flex: unset;
17981807
flex: unset;
@@ -2025,57 +2034,43 @@ Array [
20252034
}
20262035
}
20272036
2028-
.emotion-84 {
2037+
.emotion-83 {
20292038
display: -webkit-box;
20302039
display: -webkit-flex;
20312040
display: -ms-flexbox;
20322041
display: flex;
20332042
}
20342043
20352044
.emotion-82 {
2036-
display: -webkit-inline-box;
2037-
display: -webkit-inline-flex;
2038-
display: -ms-inline-flexbox;
2039-
display: inline-flex;
2040-
-webkit-align-items: center;
2041-
-webkit-box-align: center;
2042-
-ms-flex-align: center;
2043-
align-items: center;
2044-
-webkit-box-pack: center;
2045-
-ms-flex-pack: center;
2046-
-webkit-justify-content: center;
2047-
justify-content: center;
2048-
padding: 0.5rem 1rem;
2049-
font-size: 0.875rem;
2050-
font-weight: 600;
2051-
border-radius: 3px;
2052-
font-family: var(--primary-font-family);
2053-
line-height: 1;
2054-
cursor: pointer;
2055-
border: 1px solid transparent;
2056-
-webkit-transition: all 0.15s ease-out;
2057-
transition: all 0.15s ease-out;
2058-
white-space: nowrap;
2059-
-webkit-text-decoration: none;
2060-
text-decoration: none;
2061-
color: var(--color-white);
2062-
background-color: var(--color-brand-600);
2063-
font-size: 0.625rem;
2064-
padding: 0.375rem 0.625rem;
2065-
border-radius: 0.125rem;
2045+
--spinner-size: 1rem;
2046+
display: inline-block;
2047+
position: relative;
2048+
height: 100%;
2049+
width: 100%;
20662050
}
20672051
2068-
.emotion-82:hover {
2069-
color: var(--color-white);
2070-
background-color: var(--color-brand-500);
2052+
.emotion-82:after {
2053+
-webkit-animation: animation-0 0.5s linear infinite;
2054+
animation: animation-0 0.5s linear infinite;
2055+
border-radius: 50%;
2056+
border-right: 1px solid transparent;
2057+
border-top: 1px solid;
2058+
content: '';
2059+
left: calc(50% + 1px);
2060+
margin-left: calc(var(--spinner-size) / 2 * -1);
2061+
margin-top: calc(var(--spinner-size) / 2 * -1);
2062+
position: absolute;
2063+
top: calc(50% + 1px);
2064+
width: var(--spinner-size);
2065+
height: var(--spinner-size);
20712066
}
20722067
20732068
<div
2074-
className=" emotion-87"
2069+
className=" emotion-86"
20752070
data-swiftype-index={false}
20762071
>
20772072
<div
2078-
className="emotion-86"
2073+
className="emotion-85"
20792074
>
20802075
<div
20812076
className="emotion-28"
@@ -2355,7 +2350,7 @@ Array [
23552350
</ul>
23562351
</nav>
23572352
<ul
2358-
className="emotion-85"
2353+
className="emotion-84"
23592354
>
23602355
<li
23612356
className="emotion-75"
@@ -2470,21 +2465,13 @@ Array [
24702465
</a>
24712466
</li>
24722467
<li
2473-
className="emotion-84"
2468+
className="emotion-83"
24742469
>
2475-
<a
2476-
className="emotion-82 emotion-55"
2477-
href="https://newrelic.com/signup"
2478-
onClick={[Function]}
2479-
rel="noopener"
2480-
size="extraSmall"
2481-
target="_blank"
2482-
variant="primary"
2483-
>
2484-
<span>
2485-
Free account
2486-
</span>
2487-
</a>
2470+
<div
2471+
aria-busy={true}
2472+
aria-label="Loading"
2473+
className="emotion-82"
2474+
/>
24882475
</li>
24892476
</ul>
24902477
</div>

0 commit comments

Comments
 (0)