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

inlay hints display wrong suggestions - toString! toLocaleString! #2443

Closed
beljand opened this issue Feb 22, 2023 · 6 comments
Closed

inlay hints display wrong suggestions - toString! toLocaleString! #2443

beljand opened this issue Feb 22, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@beljand
Copy link

beljand commented Feb 22, 2023

I've noticed that inlay hint is displayed but the prop(s) does not exist on the component.

toString!
toLocaleString!

image

minimal repro repo

@johnsoncodehk
Copy link
Member

I can't reproduce with the component code, can you provide minimal reproduction?

@beljand
Copy link
Author

beljand commented Feb 22, 2023

I can't reproduce with the component code, can you provide minimal reproduction?

Will try

@beljand
Copy link
Author

beljand commented Feb 22, 2023

@johnsoncodehk managed to reproduce it on a brand new Vue 2.x project, but not on 3.x https://github.com/beljand/volar-inlay-hints-repro

Screenshot 2023-02-22 at 12 40 38

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Feb 22, 2023
@johnsoncodehk
Copy link
Member

Thanks for the repro case!

@mythz
Copy link

mythz commented Feb 26, 2023

I have a similar but worse problem where it lists all string members and goes completely off the screen:

image

Seems to be an issue with the <label> and <select> elements as when I replace it with <span> and <textarea> the problem goes away:

<div class="sm:hidden">
    <span :for="id" class="sr-only">Select a tab</span>
    <textarea :id="id" :name="id" class="block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500" @change="select(($event.target as HTMLSelectElement)?.value)">
        <option :key="tab" v-for="tab in tabNames" :value="tab">{{ label(tab) }}</option>
    </textarea>
</div>

disabling the extension also fixes it

Strange thing is that the library uses <label> in several other places already but it's only happening with the new Tabs.vue component

Repro:

  1. Clone https://github.com/ServiceStack/servicestack-vue
  2. Open Tabs.vue in VS Code

@beljand
Copy link
Author

beljand commented Feb 27, 2023

@johnsoncodehk v1.2.0 does not solve the problem for me :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants