Skip to content

Commit

Permalink
H-344: Implement "Settings" pages layout (#2884)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Werner <[email protected]>
  • Loading branch information
CiaranMn and benwerner01 authored Aug 11, 2023
1 parent f190a08 commit 12fecc4
Show file tree
Hide file tree
Showing 50 changed files with 933 additions and 393 deletions.
4 changes: 2 additions & 2 deletions apps/hash-api/src/integrations/linear/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export const linearWebhook: RequestHandler<{}, string, string> = async (
}

if (
tupleIncludes(["create", "update"] as const, payload.action) &&
tupleIncludes(["Issue", "User"] as const, payload.type)
tupleIncludes(["create", "update"], payload.action) &&
tupleIncludes(["Issue", "User"], payload.type)
) {
if (!payload.data) {
res
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-external-services/kratos/kratos.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ selfservice:

settings:
# Set through SELFSERVICE_FLOWS_SETTINGS_UI_URL
ui_url: http://localhost:3000/settings
ui_url: http://localhost:3000/change-password

log:
level: debug
Expand Down
9 changes: 9 additions & 0 deletions apps/hash-frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ module.exports = withSentryConfig(
withTM(
/** @type {import('next').NextConfig} */
{
redirects() {
return [
{
source: "/settings/organizations/:shortname",
destination: "/settings/organizations/:shortname/general",
permanent: true,
},
];
},
async headers() {
return [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/hash-frontend/src/components/page-error-state.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Link } from "../shared/ui";
export const PageErrorState = () => {
return (
<Container>
<Typography mt={10} variant="h1">
<Typography pt={10} variant="h1">
Error loading page
</Typography>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ const Page: NextPageWithLayout<PageProps> = ({
Page.getLayout = (page) =>
getLayoutWithSidebar(page, {
fullWidth: true,
grayBackground: false,
});

export default Page;
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export const EntityPageHeader = ({
crumbs={[
{
title: "Entities",
href: `/@${shortname}/entities`,
id: "entities",
},
{
Expand All @@ -52,7 +51,10 @@ export const EntityPageHeader = ({

{editBar}

<Box py={3.75}>
<Box
py={3.75}
sx={({ palette }) => ({ background: palette.common.white })}
>
<Container>
{chip}
<Stack
Expand Down
7 changes: 3 additions & 4 deletions apps/hash-frontend/src/pages/[shortname]/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ const Page: NextPageWithLayout = () => {
</Box>
{profile ? (
<Typography
sx={{
/** @todo: add this color to the MUI theme system */
color: "#0775E3",
sx={({ palette }) => ({
color: palette.blue[70],
fontSize: 20,
fontWeight: 600,
}}
})}
>
@{profile.shortname}
</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,10 @@ const Page: NextPageWithLayout = () => {
crumbs={[
{
title: "Types",
href: "#",
id: "types",
},
{
title: `${entityTypeIsLink ? "Link" : "Entity"} Types`,
href: "#",
id: "entity-types",
},
{
Expand Down
5 changes: 4 additions & 1 deletion apps/hash-frontend/src/pages/_app.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import {
} from "../lib/user-and-org";
import { EntityTypesContextProvider } from "../shared/entity-types-context/provider";
import { getPlainLayout, NextPageWithLayout } from "../shared/layout";
import { SidebarContextProvider } from "../shared/layout/layout-with-sidebar/sidebar-context";
import {
RoutePageInfoProvider,
RouteWorkspaceInfoProvider,
Expand Down Expand Up @@ -142,7 +143,9 @@ const App: FunctionComponent<AppProps> = ({
<WorkspaceContextProvider>
<SnackbarProvider maxSnack={3}>
<EntityTypesContextProvider>
{getLayout(<Component {...pageProps} />)}
<SidebarContextProvider>
{getLayout(<Component {...pageProps} />)}
</SidebarContextProvider>
</EntityTypesContextProvider>
</SnackbarProvider>
</WorkspaceContextProvider>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 12fecc4

Please sign in to comment.