Skip to content

Commit

Permalink
fix(nx-dev): make sure graph height works and render mode is nx-docs (#…
Browse files Browse the repository at this point in the history
…27776)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
Graphs in nx.dev not working

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->
Graphs in nx.dev works

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
nartc authored Sep 4, 2024
1 parent eb7ac2c commit 6a4a510
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
23 changes: 13 additions & 10 deletions nx-dev/ui-markdoc/src/lib/tags/graph.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,19 @@ export function Graph({
{title}
</div>
{type === 'project' ? (
<NxProjectGraphViz
height={height}
groupByFolder={false}
theme={theme}
projects={parsedProps.projects}
workspaceLayout={parsedProps.workspaceLayout}
dependencies={parsedProps.dependencies}
affectedProjectIds={parsedProps.affectedProjectIds}
enableTooltips={parsedProps.enableTooltips}
/>
<div style={{ height }}>
<NxProjectGraphViz
renderMode="nx-docs"
groupByFolder={false}
theme={theme}
projects={parsedProps.projects}
fileMap={{}}
workspaceLayout={parsedProps.workspaceLayout}
dependencies={parsedProps.dependencies}
affectedProjectIds={parsedProps.affectedProjectIds}
enableTooltips={parsedProps.enableTooltips}
/>
</div>
) : (
<NxTaskGraphViz
height={height}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
"@markdoc/markdoc": "0.2.2",
"@monaco-editor/react": "^4.4.6",
"@napi-rs/canvas": "^0.1.52",
"@nx/graph": "0.0.1-alpha.13",
"@nx/graph": "0.0.1-alpha.15",
"@react-spring/three": "^9.7.3",
"@react-three/drei": "^9.108.3",
"@react-three/fiber": "^8.16.8",
Expand Down
10 changes: 5 additions & 5 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 6a4a510

Please sign in to comment.