Skip to content

Commit

Permalink
Renaming "Experience" to "Appearance" (twentyhq#2776)
Browse files Browse the repository at this point in the history
* refining settings

* Delete .idea/workspace.xml

* Update .gitignore
  • Loading branch information
GsnMithra authored Nov 30, 2023
1 parent 1822370 commit c2131a2
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 20 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
**/**/.env
.DS_Store
.idea/workspace.xml
node_modules/
# yarn is the recommended package manager across the project
.package-lock.json
.package-lock.json
6 changes: 3 additions & 3 deletions front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { SettingsObjects } from '~/pages/settings/data-model/SettingsObjects';
import { SettingsDevelopersApiKeyDetail } from '~/pages/settings/developers/api-keys/SettingsDevelopersApiKeyDetail';
import { SettingsDevelopersApiKeys } from '~/pages/settings/developers/api-keys/SettingsDevelopersApiKeys';
import { SettingsDevelopersApiKeysNew } from '~/pages/settings/developers/api-keys/SettingsDevelopersApiKeysNew';
import { SettingsExperience } from '~/pages/settings/SettingsExperience';
import { SettingsAppearance } from '~/pages/settings/SettingsAppearance';
import { SettingsProfile } from '~/pages/settings/SettingsProfile';
import { SettingsWorkspace } from '~/pages/settings/SettingsWorkspace';
import { SettingsWorkspaceMembers } from '~/pages/settings/SettingsWorkspaceMembers';
Expand Down Expand Up @@ -66,8 +66,8 @@ export const App = () => {
element={<SettingsProfile />}
/>
<Route
path={SettingsPath.Experience}
element={<SettingsExperience />}
path={SettingsPath.Appearance}
element={<SettingsAppearance />}
/>
<Route
path={SettingsPath.WorkspaceMembersPage}
Expand Down
6 changes: 3 additions & 3 deletions front/src/modules/settings/components/SettingsNavbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ export const SettingsNavbar = () => {
}
/>
<NavItem
label="Experience"
to="/settings/profile/experience"
label="Appearance"
to="/settings/profile/appearance"
Icon={IconColorSwatch}
active={
!!useMatch({
path: useResolvedPath('/settings/profile/experience').pathname,
path: useResolvedPath('/settings/profile/appearance').pathname,
end: true,
})
}
Expand Down
2 changes: 1 addition & 1 deletion front/src/modules/types/SettingsPath.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum SettingsPath {
ProfilePage = 'profile',
Experience = 'profile/experience',
Appearance = 'profile/appearance',
Objects = 'objects',
ObjectDetail = 'objects/:objectSlug',
ObjectEdit = 'objects/:objectSlug/edit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ const navItems = (
active
/>
<NavItem
label="Experience"
to="/settings/profile/experience"
label="Appearance"
to="/settings/profile/appearance"
Icon={IconColorSwatch}
/>
<NavTitle label="Workspace" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const StyledH1Title = styled(H1Title)`
margin-bottom: 0;
`;

export const SettingsExperience = () => {
export const SettingsAppearance = () => {
const { colorScheme, setColorScheme } = useColorScheme();

return (
<SubMenuTopBarContainer Icon={IconSettings} title="Settings">
<SettingsPageContainer>
<StyledH1Title title="Experience" />
<StyledH1Title title="Appearance" />
<Section>
<H2Title title="Appearance" />
<H2Title title="Theme" />
<ColorSchemePicker value={colorScheme} onChange={setColorScheme} />
</Section>
</SettingsPageContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import {
} from '~/testing/decorators/PageDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';

import { SettingsExperience } from '../SettingsExperience';
import { SettingsAppearance } from '../SettingsAppearance';

const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/SettingsExperience',
component: SettingsExperience,
title: 'Pages/Settings/SettingsAppearance',
component: SettingsAppearance,
decorators: [PageDecorator],
args: { routePath: '/settings/experience' },
args: { routePath: '/settings/appearance' },
parameters: {
msw: graphqlMocks,
},
};

export default meta;

export type Story = StoryObj<typeof SettingsExperience>;
export type Story = StoryObj<typeof SettingsAppearance>;

export const Default: Story = {};
4 changes: 2 additions & 2 deletions front/src/utils/title-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export const getPageTitleFromPath = (pathname: string): string => {
return 'Opportunities';
case `${AppBasePath.Settings}/${SettingsPath.ProfilePage}`:
return 'Profile';
case `${AppBasePath.Settings}/${SettingsPath.Experience}`:
return 'Experience';
case `${AppBasePath.Settings}/${SettingsPath.Appearance}`:
return 'Appearance';
case `${AppBasePath.Settings}/${SettingsPath.WorkspaceMembersPage}`:
return 'Workspace Members';
case `${AppBasePath.Settings}/${SettingsPath.Workspace}`:
Expand Down

0 comments on commit c2131a2

Please sign in to comment.