-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2296 from quantified-uncertainty/group-improvements
Group improvements
- Loading branch information
Showing
55 changed files
with
1,198 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@quri/ui": patch | ||
--- | ||
|
||
Improved Dropdown styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@quri/ui": patch | ||
--- | ||
|
||
`PlusIcon` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/hub/prisma/migrations/20230929014107_revision_author/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- AlterTable | ||
ALTER TABLE "ModelRevision" ADD COLUMN "authorId" TEXT; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "ModelRevision" ADD CONSTRAINT "ModelRevision_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
"use client"; | ||
import { clsx } from "clsx"; | ||
import { Session } from "next-auth"; | ||
import { useSession } from "next-auth/react"; | ||
import { usePathname } from "next/navigation"; | ||
import { FC, PropsWithChildren } from "react"; | ||
import { useLazyLoadQuery } from "react-relay"; | ||
import { graphql } from "relay-runtime"; | ||
|
||
import { RootLayoutQuery } from "@/__generated__/RootLayoutQuery.graphql"; | ||
import { isModelRoute, isModelSubroute } from "@/routes"; | ||
import { PageFooter } from "../components/layout/RootLayout/PageFooter"; | ||
import { PageMenu } from "../components/layout/RootLayout/PageMenu"; | ||
import { ClientApp } from "./ClientApp"; | ||
|
||
const InnerRootLayout: FC<PropsWithChildren> = ({ children }) => { | ||
const { data: session } = useSession(); | ||
const queryData = useLazyLoadQuery<RootLayoutQuery>( | ||
graphql` | ||
query RootLayoutQuery($signedIn: Boolean!) { | ||
...PageMenu @arguments(signedIn: $signedIn) | ||
} | ||
`, | ||
{ signedIn: !!session } | ||
); | ||
|
||
const pathname = usePathname(); | ||
|
||
const showFooter = !isModelRoute(pathname); | ||
const backgroundColor = isModelSubroute(pathname) ? "bg-white" : "bg-gray-50"; | ||
|
||
return ( | ||
<div className={clsx("min-h-screen flex flex-col", backgroundColor)}> | ||
<PageMenu queryRef={queryData} /> | ||
<div | ||
// This allows us to center children vertically if necessary, e.g. in `not-found.tsx`. | ||
// Note that setting `height: 100%` instead of `flex-1` on children won't work; | ||
// see https://stackoverflow.com/questions/8468066/child-inside-parent-with-min-height-100-not-inheriting-height for details. | ||
className="flex-1 flex flex-col" | ||
> | ||
{children} | ||
</div> | ||
{showFooter && <PageFooter />} | ||
</div> | ||
); | ||
}; | ||
|
||
export const RootLayout: FC< | ||
PropsWithChildren<{ | ||
session: Session | null; | ||
}> | ||
> = ({ session, children }) => { | ||
return ( | ||
<ClientApp session={session}> | ||
<InnerRootLayout>{children}</InnerRootLayout> | ||
</ClientApp> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
7f70aa7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
squiggle-components – ./packages/components
squiggle-components.vercel.app
squiggle-components-quantified-uncertainty.vercel.app
squiggle-components-git-main-quantified-uncertainty.vercel.app
preview-components.squiggle-language.com
components.squiggle-language.com
7f70aa7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
squiggle-website – ./packages/website
squiggle-website-git-main-quantified-uncertainty.vercel.app
www.squiggle-language.com
squiggle-website-quantified-uncertainty.vercel.app
preview.squiggle-language.com
squiggle-language.com
7f70aa7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
quri-ui – ./packages/ui
quri-ui-quantified-uncertainty.vercel.app
quri-ui.vercel.app
quri-ui-git-main-quantified-uncertainty.vercel.app
7f70aa7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
quri-hub – ./packages/hub
squiggle-hub.org
squigglehub.com
quri-hub-quantified-uncertainty.vercel.app
squiggle-hub.com
quri-hub-git-main-quantified-uncertainty.vercel.app
squigglehub.org
www.squiggle-hub.org
www.squigglehub.com
www.squiggle-hub.com
www.squigglehub.org