Skip to content

Commit

Permalink
refactor(examples/ai-collab): Clean up imports (microsoft#22824)
Browse files Browse the repository at this point in the history
## Description

Cleans up imports in example app so it imports everything it can from
`fluid-framework` instead of individual packages. It still needs to
import from `@fluid-experimental/ai-collab` and `@fluidframework/tree`
for `@alpha` APIs.
  • Loading branch information
alexvy86 authored Oct 16, 2024
1 parent 8785821 commit 693dcf2
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 14 deletions.
1 change: 0 additions & 1 deletion examples/apps/ai-collab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"@fluidframework/build-tools": "^0.49.0",
"@fluidframework/devtools": "workspace:~",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/fluid-static": "workspace:~",
"@fluidframework/odsp-client": "workspace:~",
"@fluidframework/tinylicious-client": "workspace:~",
"@fluidframework/tree": "workspace:~",
Expand Down
3 changes: 1 addition & 2 deletions examples/apps/ai-collab/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

"use client";

import type { IFluidContainer } from "@fluidframework/fluid-static";
import { type TreeView } from "@fluidframework/tree";
import {
Box,
Button,
Expand All @@ -17,6 +15,7 @@ import {
Tabs,
Typography,
} from "@mui/material";
import type { IFluidContainer, TreeView } from "fluid-framework";
import React, { useEffect, useState } from "react";

import { TaskGroup } from "@/components/TaskGroup";
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/app/spe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import type { ContainerSchema, IFluidContainer } from "@fluidframework/fluid-static";
import type { ContainerSchema, IFluidContainer } from "fluid-framework";

import { start } from "@/infra/authHelper"; // eslint-disable-line import/no-internal-modules

Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/app/tinylicious.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License.
*/

import { IFluidContainer, type ContainerSchema } from "@fluidframework/fluid-static";
import { TinyliciousClient } from "@fluidframework/tinylicious-client";
import { IFluidContainer, type ContainerSchema } from "fluid-framework";

const tinyliciousClient = new TinyliciousClient({});

Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/components/TaskCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
type DifferenceMove,
SharedTreeBranchManager,
} from "@fluid-experimental/ai-collab";
import { type TreeView } from "@fluidframework/tree";
import { Icon } from "@iconify/react";
import { LoadingButton } from "@mui/lab";
import {
Expand All @@ -30,6 +29,7 @@ import {
Tooltip,
Typography,
} from "@mui/material";
import { type TreeView } from "fluid-framework";
import { useSnackbar } from "notistack";
import React, { useState, type ReactNode, type SetStateAction } from "react";

Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/components/TaskGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import { type Difference, SharedTreeBranchManager } from "@fluid-experimental/ai-collab";
import { type TreeView } from "@fluidframework/tree";
import { type TreeBranch, type TreeBranchFork } from "@fluidframework/tree/alpha";
import { Icon } from "@iconify/react";
import { LoadingButton } from "@mui/lab";
Expand All @@ -19,6 +18,7 @@ import {
TextField,
Typography,
} from "@mui/material";
import { type TreeView } from "fluid-framework";
import { useSnackbar } from "notistack";
import React, { useState } from "react";

Expand Down
3 changes: 1 addition & 2 deletions examples/apps/ai-collab/src/types/sharedTreeAppSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
* Licensed under the MIT License.
*/

import { SchemaFactory, TreeViewConfiguration } from "@fluidframework/tree";
import { SharedTree } from "fluid-framework";
import { SharedTree, SchemaFactory, TreeViewConfiguration } from "fluid-framework";

import type { Engineer, Task, TaskGroup } from "./task";

Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/useFluidContainerNextjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

"use client";

import { IFluidContainer, type ContainerSchema } from "@fluidframework/fluid-static";
import { IFluidContainer, type ContainerSchema } from "fluid-framework";
import { useEffect, useState } from "react";

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/apps/ai-collab/src/useSharedTreeRerender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { Tree, TreeNode } from "@fluidframework/tree";
import { Tree, TreeNode } from "fluid-framework";
import { useEffect, useState } from "react";

/**
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 693dcf2

Please sign in to comment.