Skip to content

Commit 12fecc4

Browse files
H-344: Implement "Settings" pages layout (#2884)
Co-authored-by: Ben Werner <42802102+benwerner01@users.noreply.github.com>
1 parent f190a08 commit 12fecc4

File tree

50 files changed

+933
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+933
-393
lines changed

apps/hash-api/src/integrations/linear/webhook.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export const linearWebhook: RequestHandler<{}, string, string> = async (
5454
}
5555

5656
if (
57-
tupleIncludes(["create", "update"] as const, payload.action) &&
58-
tupleIncludes(["Issue", "User"] as const, payload.type)
57+
tupleIncludes(["create", "update"], payload.action) &&
58+
tupleIncludes(["Issue", "User"], payload.type)
5959
) {
6060
if (!payload.data) {
6161
res

apps/hash-external-services/kratos/kratos.dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ selfservice:
8787

8888
settings:
8989
# Set through SELFSERVICE_FLOWS_SETTINGS_UI_URL
90-
ui_url: http://localhost:3000/settings
90+
ui_url: http://localhost:3000/change-password
9191

9292
log:
9393
level: debug

apps/hash-frontend/next.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,15 @@ module.exports = withSentryConfig(
7171
withTM(
7272
/** @type {import('next').NextConfig} */
7373
{
74+
redirects() {
75+
return [
76+
{
77+
source: "/settings/organizations/:shortname",
78+
destination: "/settings/organizations/:shortname/general",
79+
permanent: true,
80+
},
81+
];
82+
},
7483
async headers() {
7584
return [
7685
{

apps/hash-frontend/src/components/page-error-state.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Link } from "../shared/ui";
77
export const PageErrorState = () => {
88
return (
99
<Container>
10-
<Typography mt={10} variant="h1">
10+
<Typography pt={10} variant="h1">
1111
Error loading page
1212
</Typography>
1313

apps/hash-frontend/src/pages/[shortname]/[page-slug].page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ const Page: NextPageWithLayout<PageProps> = ({
626626
Page.getLayout = (page) =>
627627
getLayoutWithSidebar(page, {
628628
fullWidth: true,
629+
grayBackground: false,
629630
});
630631

631632
export default Page;

apps/hash-frontend/src/pages/[shortname]/entities/[entity-uuid].page/entity-page-wrapper/entity-page-header.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export const EntityPageHeader = ({
3737
crumbs={[
3838
{
3939
title: "Entities",
40-
href: `/@${shortname}/entities`,
4140
id: "entities",
4241
},
4342
{
@@ -52,7 +51,10 @@ export const EntityPageHeader = ({
5251

5352
{editBar}
5453

55-
<Box py={3.75}>
54+
<Box
55+
py={3.75}
56+
sx={({ palette }) => ({ background: palette.common.white })}
57+
>
5658
<Container>
5759
{chip}
5860
<Stack

apps/hash-frontend/src/pages/[shortname]/index.page.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,11 @@ const Page: NextPageWithLayout = () => {
9292
</Box>
9393
{profile ? (
9494
<Typography
95-
sx={{
96-
/** @todo: add this color to the MUI theme system */
97-
color: "#0775E3",
95+
sx={({ palette }) => ({
96+
color: palette.blue[70],
9897
fontSize: 20,
9998
fontWeight: 600,
100-
}}
99+
})}
101100
>
102101
@{profile.shortname}
103102
</Typography>

apps/hash-frontend/src/pages/[shortname]/types/entity-type/[...slug-maybe-version].page.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,10 @@ const Page: NextPageWithLayout = () => {
235235
crumbs={[
236236
{
237237
title: "Types",
238-
href: "#",
239238
id: "types",
240239
},
241240
{
242241
title: `${entityTypeIsLink ? "Link" : "Entity"} Types`,
243-
href: "#",
244242
id: "entity-types",
245243
},
246244
{

apps/hash-frontend/src/pages/_app.page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
} from "../lib/user-and-org";
3838
import { EntityTypesContextProvider } from "../shared/entity-types-context/provider";
3939
import { getPlainLayout, NextPageWithLayout } from "../shared/layout";
40+
import { SidebarContextProvider } from "../shared/layout/layout-with-sidebar/sidebar-context";
4041
import {
4142
RoutePageInfoProvider,
4243
RouteWorkspaceInfoProvider,
@@ -142,7 +143,9 @@ const App: FunctionComponent<AppProps> = ({
142143
<WorkspaceContextProvider>
143144
<SnackbarProvider maxSnack={3}>
144145
<EntityTypesContextProvider>
145-
{getLayout(<Component {...pageProps} />)}
146+
<SidebarContextProvider>
147+
{getLayout(<Component {...pageProps} />)}
148+
</SidebarContextProvider>
146149
</EntityTypesContextProvider>
147150
</SnackbarProvider>
148151
</WorkspaceContextProvider>

apps/hash-frontend/src/pages/account/workspaces/[shortname]/index.page.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)