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

[🐞] Option-click not working to open source - DX #7135

Open
srapport opened this issue Dec 6, 2024 · 6 comments · May be fixed by #7180
Open

[🐞] Option-click not working to open source - DX #7135

srapport opened this issue Dec 6, 2024 · 6 comments · May be fixed by #7180
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working

Comments

@srapport
Copy link
Contributor

srapport commented Dec 6, 2024

Which component is affected?

Qwik Runtime

Describe the bug

Option-click in dev mode is not working to automatically open the source which makes the DX difficult to quickly navigate. There appears to be a leading slash (/) that prevents VSCode from opening to the file. Manually removing this %2F resolves auto-open.

http://localhost:5173/__open-in-editor?file=%2Fsrc%2Froutes%2Ffoo%2Fbar.tsx%3A307%3A9

Reproduction

qwik.new

Steps to reproduce

Build project, option-click on a DIV.

System Info

System:
    OS: macOS 15.1.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 1.87 GB / 128.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm
    pnpm: 9.8.0 - ~/Library/pnpm/pnpm
    bun: 1.1.33 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 131.0.6778.109
    Edge: 131.0.2903.86
    Safari: 18.1.1

Additional Information

Cc: @wmertens - per conversation regarding DX, capturing issue here.

@srapport srapport added STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working labels Dec 6, 2024
@gioboa
Copy link
Member

gioboa commented Dec 6, 2024

Hi @srapport I tested "open source" feature on my Mac and Linux and in both cases it's doing an HTTP call with the full path (from the root of my system) 🤔

@wmertens
Copy link
Member

wmertens commented Dec 7, 2024

@gioboa look in the html source to check that all components have a full path for their data-qwik-inspector attribute. I'm looking at a codebase where that's not the case 🤔

@wmertens
Copy link
Member

wmertens commented Dec 7, 2024

ok what's happening is that the qwikVite plugin is passing a relative path like src/root.tsx to the optimizer and the optimizer adds a / in front. That path is used for the click-to-component so it doesn't find it.

I'll see if I can remove that processing.

@gioboa
Copy link
Member

gioboa commented Dec 7, 2024

@wmertens I tried with the starter and the path used was a full path. Let me know if you need more info

@srapport
Copy link
Contributor Author

srapport commented Dec 7, 2024

Thank you @gioboa & @wmertens. Wout, ping me if you don't see this on the dev build.

@wmertens
Copy link
Member

wmertens commented Dec 7, 2024

I found the issue and an looking at ways to fix it

@wmertens wmertens linked a pull request Dec 19, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATUS-1: needs triage New issue which needs to be triaged TYPE: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants