-
Notifications
You must be signed in to change notification settings - Fork 25
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 #2335 from quantified-uncertainty/imports
Imports in Hub
- Loading branch information
Showing
63 changed files
with
1,454 additions
and
1,168 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
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
25 changes: 25 additions & 0 deletions
25
...components/src/components/SquigglePlayground/LeftPlaygroundPanel/DependencyGraphModal.tsx
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,25 @@ | ||
import { FC, lazy } from "react"; | ||
|
||
import { SqProject } from "@quri/squiggle-lang"; | ||
|
||
const Mermaid = lazy(() => import("../../ui/Mermaid.js")); | ||
|
||
export const DependencyGraphModal: FC<{ | ||
project: SqProject; | ||
}> = ({ project }) => { | ||
const sourceIds = project.getSourceIds(); | ||
|
||
let diagram = "graph TD\n"; | ||
for (const sourceId of sourceIds) { | ||
diagram += `${sourceId}\n`; // for sources that don't have any dependencies | ||
for (const dependencyId of project.getDependencies(sourceId)) { | ||
diagram += `${sourceId} --> ${dependencyId}\n`; | ||
} | ||
} | ||
|
||
return ( | ||
<div className="flex flex-col items-center"> | ||
<Mermaid>{diagram}</Mermaid> | ||
</div> | ||
); | ||
}; |
17 changes: 0 additions & 17 deletions
17
...ges/components/src/components/SquigglePlayground/LeftPlaygroundPanel/SettingsMenuItem.tsx
This file was deleted.
Oops, something went wrong.
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.