Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all non-live content behind the same flag #534

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions src/components/HelpMenuItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { userGuideUrl } from "../utils/external-links";
import AboutDialog from "./AboutDialog";
import ConnectFirstDialog from "./ConnectFirstDialog";
import FeedbackForm from "./FeedbackForm";
import { flags } from "../flags";

const HelpMenuItems = () => {
const aboutDialogDisclosure = useDisclosure();
Expand All @@ -35,15 +36,17 @@ const HelpMenuItems = () => {
onClose={feedbackDisclosure.onClose}
finalFocusRef={menuButtonRef}
/>
<MenuItem
as="a"
href={userGuideUrl()}
target="_blank"
rel="noopener"
icon={<RiExternalLinkLine />}
>
<FormattedMessage id="user-guide" />
</MenuItem>
{flags.websiteContent && (
<MenuItem
as="a"
href={userGuideUrl()}
target="_blank"
rel="noopener"
icon={<RiExternalLinkLine />}
>
<FormattedMessage id="user-guide" />
</MenuItem>
)}
<TourMenuItem />
{deployment.supportLinks.main && (
<>
Expand Down
6 changes: 3 additions & 3 deletions src/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export type Flag =
*/
| "preReleaseNotice"
/**
* Flag to show the home page projects section which lacks content.
* Flag to show links to website content for the CreateAI release.
*/
| "homePageProjects"
| "websiteContent"
/**
* Example flags used for testing.
*/
Expand All @@ -37,7 +37,7 @@ interface FlagMetadata {
const allFlags: FlagMetadata[] = [
// Alphabetical order.
{ name: "devtools", defaultOnStages: ["local"] },
{ name: "homePageProjects", defaultOnStages: ["local", "review", "staging"] },
{ name: "websiteContent", defaultOnStages: ["local", "review", "staging"] },
{
name: "preReleaseNotice",
defaultOnStages: ["production"],
Expand Down
38 changes: 20 additions & 18 deletions src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,25 @@ const HomePage = () => {
alt={intl.formatMessage({ id: "homepage-video-alt" })}
/>
</Box>
<Text fontSize="md">
<FormattedMessage
id="homepage-how-it-works-paragraph"
values={{
appNameFull,
link: (children) => (
<Link
color="brand.600"
textDecoration="underline"
href={userGuideUrl()}
>
{children}
</Link>
),
}}
/>
</Text>
{flags.websiteContent && (

Choose a reason for hiding this comment

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

This loses us the whole of

Watch the video to get started. Learn more in the user guide.

... but not worth doing anything else at this point for the sake of < 24hrs.

<Text fontSize="md">
<FormattedMessage
id="homepage-how-it-works-paragraph"
values={{
appNameFull,
link: (children) => (
<Link
color="brand.600"
textDecoration="underline"
href={userGuideUrl()}
>
{children}
</Link>
),
}}
/>
</Text>
)}
</VStack>
<VStack gap={10}>
<Heading as="h2" textAlign="center" variant="marketing">
Expand All @@ -152,7 +154,7 @@ const HomePage = () => {
<StepByStepIllustration />
</VStack>
</VStack>
{flags.homePageProjects && (
{flags.websiteContent && (
<VStack gap={10}>
<Heading as="h2" textAlign="center" variant="marketing">
<FormattedMessage id="homepage-projects" />
Expand Down
Loading