Skip to content

Commit 9883df7

Browse files
Move all non-live content behind the same flag (#534)
Temporarily loses us the sentence below the video but that's OK for now.
1 parent ac1a3e8 commit 9883df7

File tree

3 files changed

+35
-30
lines changed

3 files changed

+35
-30
lines changed

src/components/HelpMenuItems.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { userGuideUrl } from "../utils/external-links";
1717
import AboutDialog from "./AboutDialog";
1818
import ConnectFirstDialog from "./ConnectFirstDialog";
1919
import FeedbackForm from "./FeedbackForm";
20+
import { flags } from "../flags";
2021

2122
const HelpMenuItems = () => {
2223
const aboutDialogDisclosure = useDisclosure();
@@ -35,15 +36,17 @@ const HelpMenuItems = () => {
3536
onClose={feedbackDisclosure.onClose}
3637
finalFocusRef={menuButtonRef}
3738
/>
38-
<MenuItem
39-
as="a"
40-
href={userGuideUrl()}
41-
target="_blank"
42-
rel="noopener"
43-
icon={<RiExternalLinkLine />}
44-
>
45-
<FormattedMessage id="user-guide" />
46-
</MenuItem>
39+
{flags.websiteContent && (
40+
<MenuItem
41+
as="a"
42+
href={userGuideUrl()}
43+
target="_blank"
44+
rel="noopener"
45+
icon={<RiExternalLinkLine />}
46+
>
47+
<FormattedMessage id="user-guide" />
48+
</MenuItem>
49+
)}
4750
<TourMenuItem />
4851
{deployment.supportLinks.main && (
4952
<>

src/flags.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export type Flag =
2020
*/
2121
| "preReleaseNotice"
2222
/**
23-
* Flag to show the home page projects section which lacks content.
23+
* Flag to show links to website content for the CreateAI release.
2424
*/
25-
| "homePageProjects"
25+
| "websiteContent"
2626
/**
2727
* Example flags used for testing.
2828
*/
@@ -37,7 +37,7 @@ interface FlagMetadata {
3737
const allFlags: FlagMetadata[] = [
3838
// Alphabetical order.
3939
{ name: "devtools", defaultOnStages: ["local"] },
40-
{ name: "homePageProjects", defaultOnStages: ["local", "review", "staging"] },
40+
{ name: "websiteContent", defaultOnStages: ["local", "review", "staging"] },
4141
{
4242
name: "preReleaseNotice",
4343
defaultOnStages: ["production"],

src/pages/HomePage.tsx

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,23 +122,25 @@ const HomePage = () => {
122122
alt={intl.formatMessage({ id: "homepage-video-alt" })}
123123
/>
124124
</Box>
125-
<Text fontSize="md">
126-
<FormattedMessage
127-
id="homepage-how-it-works-paragraph"
128-
values={{
129-
appNameFull,
130-
link: (children) => (
131-
<Link
132-
color="brand.600"
133-
textDecoration="underline"
134-
href={userGuideUrl()}
135-
>
136-
{children}
137-
</Link>
138-
),
139-
}}
140-
/>
141-
</Text>
125+
{flags.websiteContent && (
126+
<Text fontSize="md">
127+
<FormattedMessage
128+
id="homepage-how-it-works-paragraph"
129+
values={{
130+
appNameFull,
131+
link: (children) => (
132+
<Link
133+
color="brand.600"
134+
textDecoration="underline"
135+
href={userGuideUrl()}
136+
>
137+
{children}
138+
</Link>
139+
),
140+
}}
141+
/>
142+
</Text>
143+
)}
142144
</VStack>
143145
<VStack gap={10}>
144146
<Heading as="h2" textAlign="center" variant="marketing">
@@ -152,7 +154,7 @@ const HomePage = () => {
152154
<StepByStepIllustration />
153155
</VStack>
154156
</VStack>
155-
{flags.homePageProjects && (
157+
{flags.websiteContent && (
156158
<VStack gap={10}>
157159
<Heading as="h2" textAlign="center" variant="marketing">
158160
<FormattedMessage id="homepage-projects" />

0 commit comments

Comments
 (0)