Skip to content

Commit

Permalink
Remove TROUBLESHOOTING_COLLECTIONS_ENABLED flag
Browse files Browse the repository at this point in the history
- Open this project up for initial testing
- Set `robots: RestrictRobots.RESTRICT_ALL` until we're ready
  • Loading branch information
ianrohde committed Jan 20, 2024
1 parent 5256649 commit 51a1afe
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 19 deletions.
1 change: 0 additions & 1 deletion frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ NEXT_PUBLIC_DEFAULT_STORE_CODE=test
# Flags
NEXT_PUBLIC_FLAG__PRODUCT_PAGE_ENABLED=true
NEXT_PUBLIC_FLAG__STORE_HOME_PAGE_ENABLED=true
NEXT_PUBLIC_FLAG__TROUBLESHOOTING_COLLECTIONS_ENABLED=true
NEXT_PUBLIC_FLAG__APP_ROUTER_PRODUCT_PAGE_ENABLED=true
2 changes: 0 additions & 2 deletions frontend/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ NEXT_PUBLIC_GTAG_ID=G-5ZXNWJ73GK
NEXT_PUBLIC_ALGOLIA_PRODUCT_INDEX_NAME=dev_product_group_en
NEXT_PUBLIC_DEFAULT_STORE_CODE=us
NEXT_PUBLIC_POLYFILL_DOMAIN=https://www.ifixit.com
# flags
NEXT_PUBLIC_FLAG__TROUBLESHOOTING_COLLECTIONS_ENABLED=false
3 changes: 1 addition & 2 deletions frontend/.env.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ STRAPI_IMAGE_DOMAIN=ifixit-dev-strapi-uploads.s3.us-west-1.amazonaws.com
NEXT_PUBLIC_ALGOLIA_PRODUCT_INDEX_NAME=dev_product_group_en
NEXT_PUBLIC_DEFAULT_STORE_CODE=test
NEXT_PUBLIC_FLAG__PRODUCT_PAGE_ENABLED=true
NEXT_PUBLIC_FLAG__TROUBLESHOOTING_COLLECTIONS_ENABLED=true
NODE_OPTIONS="--dns-result-order ipv4first"
NEXT_PUBLIC_DEV_API_AUTH_TOKEN=
NEXT_PUBLIC_FLAG__APP_ROUTER_PRODUCT_PAGE_ENABLED=true
NEXT_PUBLIC_FLAG__APP_ROUTER_PRODUCT_PAGE_ENABLED=true
12 changes: 1 addition & 11 deletions frontend/app/(defaultLayout)/Troubleshooting/[device]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export type PageProps = {
};

export default async function Page({ params, searchParams }: PageProps) {
ensureFlag();

const pageProps = await getPageProps({
params,
searchParams,
Expand All @@ -37,12 +35,6 @@ export default async function Page({ params, searchParams }: PageProps) {
return <TroubleshootingProblems {...pageProps} />;
}

function ensureFlag() {
if (!flags.TROUBLESHOOTING_COLLECTIONS_ENABLED) {
notFound();
}
}

async function getPageProps({
params,
searchParams: _searchParams,
Expand Down Expand Up @@ -93,9 +85,7 @@ export async function generateMetadata({
alternates: {
canonical: canonicalUrl,
},
robots: flags.TROUBLESHOOTING_COLLECTIONS_ENABLED
? RestrictRobots.ALLOW_ALL
: RestrictRobots.RESTRICT_ALL,
robots: RestrictRobots.RESTRICT_ALL,
title: metaTitle,
description: metaDescription,
openGraph: {
Expand Down
3 changes: 0 additions & 3 deletions frontend/config/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ export const flags = {
process.env.NEXT_PUBLIC_FLAG__PRODUCT_PAGE_ENABLED === 'true',
STORE_HOME_PAGE_ENABLED:
process.env.NEXT_PUBLIC_FLAG__STORE_HOME_PAGE_ENABLED === 'true',
TROUBLESHOOTING_COLLECTIONS_ENABLED:
process.env.NEXT_PUBLIC_FLAG__TROUBLESHOOTING_COLLECTIONS_ENABLED ===
'true',
APP_ROUTER_PRODUCT_PAGE_ENABLED:
process.env.NEXT_PUBLIC_FLAG__APP_ROUTER_PRODUCT_PAGE_ENABLED === 'true',
};

0 comments on commit 51a1afe

Please sign in to comment.