Skip to content

Commit

Permalink
Merge branch 'main' into fix/streaming_json_types
Browse files Browse the repository at this point in the history
  • Loading branch information
codeincontext authored Nov 18, 2024
2 parents 11dc752 + a78bcd0 commit ea91efb
Show file tree
Hide file tree
Showing 48 changed files with 1,907 additions and 1,396 deletions.
16 changes: 16 additions & 0 deletions CHANGE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# [1.15.0](https://github.com/oaknational/oak-ai-lesson-assistant/compare/v1.14.2...v1.15.0) (2024-11-13)


### Features

* add additional materials button - AI-539 [migration] ([#255](https://github.com/oaknational/oak-ai-lesson-assistant/issues/255)) ([d0fe2d0](https://github.com/oaknational/oak-ai-lesson-assistant/commit/d0fe2d015865b89ea2287993652a6f8111f0ae4a))
* prisma health check - AI-625 ([#356](https://github.com/oaknational/oak-ai-lesson-assistant/issues/356)) ([854950d](https://github.com/oaknational/oak-ai-lesson-assistant/commit/854950d51524eb8d84a0ec9695c88b67f829fd8d))

## [1.14.2](https://github.com/oaknational/oak-ai-lesson-assistant/compare/v1.14.1...v1.14.2) (2024-11-12)


### Bug Fixes

* design-changes-to-footer ([#324](https://github.com/oaknational/oak-ai-lesson-assistant/issues/324)) ([273cfdc](https://github.com/oaknational/oak-ai-lesson-assistant/commit/273cfdc668ca45def0b8a68dc08b7301974e1def))
* only categorise initial user input once ([#348](https://github.com/oaknational/oak-ai-lesson-assistant/issues/348)) ([dd5bf71](https://github.com/oaknational/oak-ai-lesson-assistant/commit/dd5bf71a21421ac6e0beb60b4bab560cb159d877))

## [1.14.1](https://github.com/oaknational/oak-ai-lesson-assistant/compare/v1.14.0...v1.14.1) (2024-11-07)


Expand Down
11 changes: 0 additions & 11 deletions apps/nextjs/.storybook/MockClerkProvider.tsx

This file was deleted.

12 changes: 7 additions & 5 deletions apps/nextjs/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { Preview, Decorator } from "@storybook/react";

import { TooltipProvider } from "../src/components/AppComponents/Chat/ui/tooltip";
import { AnalyticsProvider } from "../src/mocks/analytics/provider";
import { ClerkDecorator } from "../src/mocks/clerk/ClerkDecorator";
import { TRPCReactProvider } from "../src/utils/trpc";
import { RadixThemeDecorator } from "./decorators/RadixThemeDecorator";
import "./preview.css";
Expand All @@ -28,25 +29,26 @@ const preview: Preview = {
};

// Providers not currently used
// - MockClerkProvider
// - CookieConsentProvider
// - DemoProvider
// - LessonPlanTrackingProvider
// - DialogProvider
// - OakThemeProvider
// - SidebarProvider
// - ChatModerationProvider

export const decorators: Decorator[] = [
RadixThemeDecorator,
ClerkDecorator,
(Story) => (
<>
{/* TODO: Mock tRPC calls with MSW */}
<TRPCReactProvider>
<AnalyticsProvider>
<TooltipProvider>
<Story />
</TooltipProvider>
<OakThemeProvider theme={oakDefaultTheme}>
<TooltipProvider>
<Story />
</TooltipProvider>
</OakThemeProvider>
</AnalyticsProvider>
</TRPCReactProvider>
</>
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/api/chat/errorHandling.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ describe("handleChatException", () => {
type: "error",
value: "Rate limit exceeded",
message:
"**Unfortunately you’ve exceeded your fair usage limit for today.** Please come back in 1 hour. If you require a higher limit, please [make a request](https://forms.gle/tHsYMZJR367zydsG8).",
"**Unfortunately you’ve exceeded your fair usage limit for today.** Please come back in 1 hour. If you require a higher limit, please [make a request](https://share.hsforms.com/118hyngR-QSS0J7vZEVlRSgbvumd).",
});
});
});
Expand Down
16 changes: 16 additions & 0 deletions apps/nextjs/src/app/faqs/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { Meta, StoryObj } from "@storybook/react";

import { FAQPageContent } from ".";

const meta: Meta<typeof FAQPageContent> = {
title: "Pages/FAQs",
component: FAQPageContent,
tags: ["autodocs"],
};

export default meta;
type Story = StoryObj<typeof FAQPageContent>;

export const Default: Story = {
args: {},
};
16 changes: 11 additions & 5 deletions apps/nextjs/src/app/faqs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import GetInTouchBox from "@/components/AppComponents/GetInTouchBox";
import Layout from "@/components/Layout";
import { OakBoxCustomMaxWidth } from "@/components/OakBoxCustomMaxWidth";

const FAQPage = () => {
export const FAQPageContent = () => {
const startingRef = useRef(null);
const featuresRef = useRef(null);
const supportRef = useRef(null);
Expand All @@ -36,7 +36,7 @@ const FAQPage = () => {
}
};
return (
<Layout>
<>
<OakMaxWidth>
<OakFlex $justifyContent="space-between">
<OakBox $display={["none", "block"]}>
Expand Down Expand Up @@ -722,7 +722,7 @@ const FAQPage = () => {
the volume of requests that can be made, lessons, and resources
that can be generated. If you&apos;re reaching these limits,
we&apos;d love to hear from you, and you can{" "}
<OakLink href="https://forms.gle/tHsYMZJR367zydsG8">
<OakLink href="https://share.hsforms.com/118hyngR-QSS0J7vZEVlRSgbvumd">
request a higher limit.
</OakLink>
</OakP>
Expand Down Expand Up @@ -849,8 +849,14 @@ const FAQPage = () => {
</OakBoxCustomMaxWidth>
</OakFlex>
</OakMaxWidth>
</Layout>
</>
);
};

export default FAQPage;
export default function FAQPage() {
return (
<Layout>
<FAQPageContent />
</Layout>
);
}
19 changes: 19 additions & 0 deletions apps/nextjs/src/app/home-page.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { Meta, StoryObj } from "@storybook/react";

import { HomePageContent } from "./home-page";

const meta: Meta<typeof HomePageContent> = {
title: "Pages/Homepage",
component: HomePageContent,
tags: ["autodocs"],
};

export default meta;
type Story = StoryObj<typeof HomePageContent>;

export const Default: Story = {
args: {
// NOTE: We're not including mux video links right now
pageData: null,
},
};
20 changes: 14 additions & 6 deletions apps/nextjs/src/app/home-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,25 @@ const OakFlexCustomMaxWidthWithHalfWidth = styled(OakFlexCustomMaxWidth)`
}
`;

export default function HomePage({
pageData,
}: {
type HomePageProps = {
pageData: HomePageQueryResult | null;
}) {
};

export default function HomePage(props: HomePageProps) {
return (
<Layout>
<HomePageContent {...props} />
</Layout>
);
}

export function HomePageContent({ pageData }: HomePageProps) {
const user = useUser();

const { track } = useAnalytics();

return (
<Layout>
<>
<HeroContainer>
<OakFlex
$flexDirection={["column", "row"]}
Expand Down Expand Up @@ -334,7 +342,7 @@ export default function HomePage({
as possible.
</OakP>
</OakFlexWithBackground>
</Layout>
</>
);
}

Expand Down
9 changes: 8 additions & 1 deletion apps/nextjs/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "@/app/theme-config.css";
import { Providers } from "@/components/AppComponents/Chat//providers";
import { AnalyticsProvider } from "@/components/ContextProviders/AnalyticsProvider";
import { CookieConsentProvider } from "@/components/ContextProviders/CookieConsentProvider";
import { FeatureFlagProvider } from "@/components/ContextProviders/FeatureFlagProvider";
import FontProvider from "@/components/ContextProviders/FontProvider";
import { GleapProvider } from "@/components/ContextProviders/GleapProvider";
import { WebDebuggerPosition } from "@/lib/avo/Avo";
Expand Down Expand Up @@ -118,7 +119,13 @@ export default async function RootLayout({
}}
bootstrappedFeatures={bootstrappedFeatures}
>
<GleapProvider>{children}</GleapProvider>
<GleapProvider>
<FeatureFlagProvider
bootstrappedFeatures={bootstrappedFeatures}
>
{children}
</FeatureFlagProvider>
</GleapProvider>
</AnalyticsProvider>
</CookieConsentProvider>
</Providers>
Expand Down
Loading

0 comments on commit ea91efb

Please sign in to comment.