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

Vscode intellisense autocompletion not getting Tres components props #785

Closed
5 tasks done
alvarosabu opened this issue Jul 18, 2024 · 10 comments · Fixed by #809
Closed
5 tasks done

Vscode intellisense autocompletion not getting Tres components props #785

alvarosabu opened this issue Jul 18, 2024 · 10 comments · Fixed by #809
Labels
dx help wanted Extra attention is needed p4-important-bug Violate documented behavior or significantly improve performance (priority) PR welcome types

Comments

@alvarosabu
Copy link
Member

Describe the bug

Vscode intellisense autocompletion tooltip is not working for custom render components.

TresPerspectiveCamera (custom renderer):

Screenshot 2024-07-18 at 09 09 59

TresCanvas (actual vue component):

Screenshot 2024-07-18 at 09 10 37

Reproduction

https://stackblitz.com/~/edit/tresjs-minimal-reproduction?file=package.json

Steps to reproduce

No response

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 62.16 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
    bun: 1.0.2 - ~/.bun/bin/bun
  Browsers:
    Brave Browser: 120.1.61.116
    Chrome: 126.0.6478.128
    Safari: 17.5
  npmPackages:
    @tresjs/cientos: 3.9.0 => 3.9.0 
    @tresjs/core: workspace:^ => 4.2.1 
    @tresjs/leches: 0.15.0-next.3 => 0.15.0-next.3

Used Package Manager

pnpm

Code of Conduct

@alvarosabu alvarosabu added help wanted Extra attention is needed dx types PR welcome p4-important-bug Violate documented behavior or significantly improve performance (priority) labels Jul 18, 2024
@devick
Copy link

devick commented Aug 30, 2024

When can this bug be fixed?

@alvarosabu
Copy link
Member Author

Hi @devick, unfortunately, we don't know, something changed in vue language tools and we still need to figure out what it is and how to fix it.

@devick
Copy link

devick commented Sep 4, 2024

I found that after uninstalling the latest version and installing version 3.8.1, this feature becomes available

@alvarosabu
Copy link
Member Author

Hi @devick does it work for https://github.com/Tresjs/tres/releases/tag/3.9.0 ?

It makes no sense if it doesn't work there since we didn't make any change from 3.8.1 to 3.9.0 that would affect types

@alvarosabu
Copy link
Member Author

alvarosabu commented Sep 4, 2024

Screenshot 2024-09-04 at 13 12 11

Checking both versions (3.8.1 and 3.9.0) package.json the only thing I see different is the vue version and the vite-plugin-dts

There was a breaking change on vue 3.4 for JSX global types, bout that should be affecting us since we don't use JSX https://github.com/vuejs/core/blob/main/changelogs/CHANGELOG-3.4.md#340-slam-dunk-2023-12-29

@gangsthub
Copy link

What TypeScript version are you using? It could be something related with the language tools package.

@devick
Copy link

devick commented Sep 5, 2024

Hi @devick does it work for https://github.com/Tresjs/tres/releases/tag/3.9.0 ?

It makes no sense if it doesn't work there since we didn't make any change from 3.8.1 to 3.9.0 that would affect types

It also works on 3.9.0。

my package.json:

{
  "name": "mytresjs",
  "version": "0.0.0",
  "private": true,
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "run-p type-check \"build-only {@}\" --",
    "preview": "vite preview",
    "build-only": "vite build",
    "type-check": "vue-tsc --build --force"
  },
  "dependencies": {
    "@tresjs/cientos": "3.8.0",
    "@tresjs/core": "3.9.0",
    "three": "^0.167.1",
    "tweakpane": "^4.0.4",
    "vue": "^3.4.29"
  },
  "devDependencies": {
    "@tsconfig/node20": "^20.1.4",
    "@types/node": "^20.14.5",
    "@types/three": "^0.167.2",
    "@vitejs/plugin-vue": "^5.0.5",
    "@vue/tsconfig": "^0.5.1",
    "npm-run-all2": "^6.2.0",
    "typescript": "~5.4.0",
    "vite": "^5.3.1",
    "vue-tsc": "^2.0.21"
  }
}

@devick
Copy link

devick commented Sep 5, 2024

@

What TypeScript version are you using? It could be something related with the language tools package.

is 5.4.5

@alvarosabu
Copy link
Member Author

Hi all @devick after a long debugging session, I managed to figure out the issue, there was an unwanted overwrite on the InstanceProps setting all props to any. In the end had nothing to do with vue/language-tools at all even if the reproduction was similar.

Please update to v4.2.10

@devick
Copy link

devick commented Sep 6, 2024

Hi all @devick after a long debugging session, I managed to figure out the issue, there was an unwanted overwrite on the InstanceProps setting all props to any. In the end had nothing to do with vue/language-tools at all even if the reproduction was similar.

Please update to v4.2.10

This is great, thank you for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx help wanted Extra attention is needed p4-important-bug Violate documented behavior or significantly improve performance (priority) PR welcome types
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants