Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeGraph Viewer V2 #3713

Merged
merged 71 commits into from
Jul 3, 2024
Merged

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Jul 1, 2024

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jul 1, 2024

All changed packages have been documented.

  • @typespec/html-program-viewer
  • @typespec/playground
Show changes

@typespec/react-components - internal ✏️

Initial

@typespec/playground - feature ✏️

Extract splitpane into separate package

@typespec/html-program-viewer - feature ✏️

Complete new dynamic UI to navigate the TypeSpec type graph

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3713/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3713/

Copy link
Member

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started commenting on some of the hooks in the react-components package - many of them seem to have an inexhaustive list of dependencies. In some cases I'm not sure if that's intended or not (e.g. useControllableValue has a useMemo with an empty dependency list - which means isControlled won't change if controlledValue changes to/from undefined.)

Might be worth updating the eslint rules to include the react-hooks rules from eslint-plugin-react-hooks:

export function getTypeScriptProjectRules(root) {
  return tsEslint.config({
    files: ["**/*.ts", "**/*.tsx"],
    ignores: ["packages/http-client-csharp/**/*"], // Ignore isolated modules
    plugins: {
      deprecation,
      "react-hooks": reactHooks,
    },
    languageOptions: {
      parserOptions: {
        project: "./tsconfig.json",
        tsconfigRootDir: root,
      },
    },
    rules: {
      // Only put rules here that need typescript project information
      "@typescript-eslint/no-floating-promises": "error",
      "deprecation/deprecation": ["warn"],
      "react-hooks/rules-of-hooks": "error",
      "react-hooks/exhaustive-deps": "warn",
    },
  });

packages/html-program-viewer/src/emitter.ts Show resolved Hide resolved
packages/html-program-viewer/src/index.ts Show resolved Hide resolved
packages/react-components/package.json Outdated Show resolved Hide resolved
packages/react-components/package.json Outdated Show resolved Hide resolved
packages/react-components/src/index.ts Show resolved Hide resolved
packages/react-components/src/tree/tree.tsx Outdated Show resolved Hide resolved
packages/react-components/src/tree/tree.tsx Outdated Show resolved Hide resolved
Copy link
Member

@chrisradek chrisradek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really like these UI updates!

@timotheeguerin timotheeguerin added this pull request to the merge queue Jul 3, 2024
Merged via the queue into microsoft:main with commit e54a7f8 Jul 3, 2024
21 checks passed
@timotheeguerin timotheeguerin deleted the typegraph-v2 branch July 3, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants