Skip to content

Commit 021f490

Browse files
authored
refactor: reorganize settings navigation labels (#5879)
1 parent 7e091c1 commit 021f490

File tree

22 files changed

+175
-248
lines changed

22 files changed

+175
-248
lines changed

packages/shared/src/components/profile/ProfileSettingsMenu.tsx

Lines changed: 106 additions & 182 deletions
Large diffs are not rendered by default.

packages/webapp/components/layouts/SettingsLayout/Security/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ function AccountSecurityDefault({
151151
};
152152

153153
return (
154-
<AccountPageContainer title="Account access">
154+
<AccountPageContainer title="Account & Security">
155155
<AccountContentSection
156156
className={{ heading: 'mt-0' }}
157157
title="Email"

packages/webapp/pages/settings/composition.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ import { getPageSeoTitles } from '../../components/layouts/utils';
1919

2020
const defaultWriteTabs: RadioItemProps[] = Object.keys(WriteFormTab).map(
2121
(key) => ({
22-
label: WriteFormTab[key],
22+
label: WriteFormTab[key as keyof typeof WriteFormTab],
2323
value: key,
2424
}),
2525
);
2626

27-
const AccountManageSubscriptionPage = (): ReactElement => {
27+
const PostingSettingsPage = (): ReactElement => {
2828
const { updateFlag, flags } = useSettingsContext();
2929

3030
return (
31-
<AccountPageContainer title="Composition">
31+
<AccountPageContainer title="Posting">
3232
<div id="compose" aria-hidden />
3333
<FlexCol className="gap-2">
3434
<Typography bold type={TypographyType.Subhead}>
@@ -38,7 +38,7 @@ const AccountManageSubscriptionPage = (): ReactElement => {
3838
<Radio
3939
name="default-write-tab"
4040
options={defaultWriteTabs}
41-
value={flags.defaultWriteTab}
41+
value={flags?.defaultWriteTab}
4242
onChange={(value) => {
4343
updateFlag('defaultWriteTab', value);
4444
}}
@@ -56,10 +56,10 @@ const AccountManageSubscriptionPage = (): ReactElement => {
5656

5757
const seo: NextSeoProps = {
5858
...defaultSeo,
59-
...getPageSeoTitles('Appearance'),
59+
...getPageSeoTitles('Posting'),
6060
};
6161

62-
AccountManageSubscriptionPage.getLayout = getSettingsLayout;
63-
AccountManageSubscriptionPage.layoutProps = { seo };
62+
PostingSettingsPage.getLayout = getSettingsLayout;
63+
PostingSettingsPage.layoutProps = { seo };
6464

65-
export default AccountManageSubscriptionPage;
65+
export default PostingSettingsPage;

packages/webapp/pages/settings/customization/devcard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const DevCardStep2 = dynamic(() =>
2626
).then((mod) => mod.DevCardStep2),
2727
);
2828

29-
const seoTitles = getPageSeoTitles('Grab your DevCard');
29+
const seoTitles = getPageSeoTitles('DevCard');
3030
const seo: NextSeoProps = {
3131
title: seoTitles.title,
3232
description:

packages/webapp/pages/settings/customization/gamification.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useConditionalFeature } from '@dailydotdev/shared/src/hooks';
77
import { questsFeature } from '@dailydotdev/shared/src/lib/featureManagement';
88
import {
99
Typography,
10-
TypographyColor,
1110
TypographyType,
1211
} from '@dailydotdev/shared/src/components/typography/Typography';
1312
import { AccountPageContainer } from '../../../components/layouts/SettingsLayout/AccountPageContainer';
@@ -42,7 +41,7 @@ const GamificationSettingsPage = (): ReactElement | null => {
4241
}
4342

4443
return (
45-
<AccountPageContainer title="Gamification">
44+
<AccountPageContainer title="Feature visibility">
4645
<div className="flex flex-col gap-6">
4746
<section className="flex flex-col gap-2">
4847
<Typography bold type={TypographyType.Subhead}>
@@ -61,25 +60,16 @@ const GamificationSettingsPage = (): ReactElement | null => {
6160
</section>
6261

6362
<section className="flex flex-col gap-2">
64-
<div className="flex flex-col gap-1">
65-
<Typography bold type={TypographyType.Subhead}>
66-
Show quests
67-
</Typography>
68-
69-
<Typography
70-
type={TypographyType.Callout}
71-
color={TypographyColor.Tertiary}
72-
>
73-
Turn quest UI on or off across the product.
74-
</Typography>
75-
</div>
63+
<Typography bold type={TypographyType.Subhead}>
64+
Show quests
65+
</Typography>
7666

7767
<SettingsSwitch
7868
name="quest-system"
7969
checked={!optOutQuestSystem}
8070
onToggle={toggleOptOutQuestSystem}
8171
>
82-
Toggle to display or hide the quest system UI.
72+
Toggle to display or hide the quest system UI across the product.
8373
</SettingsSwitch>
8474
</section>
8575
</div>
@@ -89,7 +79,7 @@ const GamificationSettingsPage = (): ReactElement | null => {
8979

9080
const seo: NextSeoProps = {
9181
...defaultSeo,
92-
title: getTemplatedTitle('Gamification'),
82+
title: getTemplatedTitle('Feature visibility'),
9383
};
9484

9585
GamificationSettingsPage.getLayout = getSettingsLayout;

packages/webapp/pages/settings/customization/integrations.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ReactElement } from 'react';
22
import React, { useCallback, useState } from 'react';
3+
import type { NextSeoProps } from 'next-seo';
34

45
import { useIntegrationsQuery } from '@dailydotdev/shared/src/hooks/integrations/useIntegrationsQuery';
56

@@ -16,6 +17,13 @@ import { useLogContext } from '@dailydotdev/shared/src/contexts/LogContext';
1617
import { LogEvent, Origin } from '@dailydotdev/shared/src/lib/log';
1718
import { getSettingsLayout } from '../../../components/layouts/SettingsLayout';
1819
import { AccountPageContainer } from '../../../components/layouts/SettingsLayout/AccountPageContainer';
20+
import { defaultSeo } from '../../../next-seo';
21+
import { getPageSeoTitles } from '../../../components/layouts/utils';
22+
23+
const seo: NextSeoProps = {
24+
...defaultSeo,
25+
...getPageSeoTitles('Integrations'),
26+
};
1927

2028
const AccountIntegrationsPage = (): ReactElement => {
2129
const [state, setState] = useState<{
@@ -84,5 +92,6 @@ const AccountIntegrationsPage = (): ReactElement => {
8492
};
8593

8694
AccountIntegrationsPage.getLayout = getSettingsLayout;
95+
AccountIntegrationsPage.layoutProps = { seo };
8796

8897
export default AccountIntegrationsPage;

packages/webapp/pages/settings/feed/ai.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AccountManageSubscriptionPage = (): ReactElement => {
1818
);
1919
};
2020

21-
const seoTitles = getPageSeoTitles('Edit AI superpowers');
21+
const seoTitles = getPageSeoTitles('AI superpowers');
2222
const seo: NextSeoProps = {
2323
title: seoTitles.title,
2424
openGraph: { ...seoTitles.openGraph, ...defaultOpenGraph },

packages/webapp/pages/settings/feed/blocked.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AccountManageSubscriptionPage = (): ReactElement => {
1818
);
1919
};
2020

21-
const seoTitles = getPageSeoTitles('Edit blocked content');
21+
const seoTitles = getPageSeoTitles('Blocked content');
2222
const seo: NextSeoProps = {
2323
title: seoTitles.title,
2424
openGraph: { ...seoTitles.openGraph, ...defaultOpenGraph },

packages/webapp/pages/settings/feed/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AccountManageSubscriptionPage = (): ReactElement => {
1818
);
1919
};
2020

21-
const seoTitles = getPageSeoTitles('Edit feed');
21+
const seoTitles = getPageSeoTitles('General');
2222
const seo: NextSeoProps = {
2323
title: seoTitles.title,
2424
openGraph: { ...seoTitles.openGraph, ...defaultOpenGraph },

packages/webapp/pages/settings/feed/preferences.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const AccountManageSubscriptionPage = (): ReactElement => {
1818
);
1919
};
2020

21-
const seoTitles = getPageSeoTitles('Edit content preferences');
21+
const seoTitles = getPageSeoTitles('Content preferences');
2222
const seo: NextSeoProps = {
2323
title: seoTitles.title,
2424
openGraph: { ...seoTitles.openGraph, ...defaultOpenGraph },

0 commit comments

Comments
 (0)