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

fix(ui): open in IDE and error styles #1039

Merged
merged 3 commits into from Mar 28, 2022
Merged

Conversation

userquin
Copy link
Member

@userquin userquin commented Mar 27, 2022

Moved the useCodeError logic to the ViewEditor.vue component from error.ts module, we would need to include @unocss-include on the error.ts module to style the elements created.

Anyway, on stackblitz I cannot make it working (missing links, it seems using oldest version), tested with 0.7.11 and 0.7.12 but still not working, it seems stackblitz doing strange things, for example: taze not showing vitest 0.7.12, I need to run taze major.

imagen

The repo I use with 0.7.12 with almost all core tests included: https://stackblitz.com/edit/vitejs-vite-nfjsbi

@netlify
Copy link

netlify bot commented Mar 27, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit ee3bbe7
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/62405ab76015160009ea9e82
😎 Deploy Preview https://deploy-preview-1039--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@userquin userquin changed the title fix(ui): open in IDE error styles fix(ui): open in IDE and error styles Mar 27, 2022
@patak-dev
Copy link
Member

When I tried locally on macOS, after making a test fail and pressing the Open in IDE I'm getting in the terminal (and no feedback in the app):

Could not open chainable.test.ts in the editor.
The editor process exited with an error: spawn code ENOENT.

Is there something else I need to setup so VS Code is picked up?

About the styles, could the icon color have more contrast so it is accessible?

image

We also have an Open in Editor button at the top-right, should both be called Open in Editor or Open in IDE?

@userquin
Copy link
Member Author

imagen

imagen

@userquin
Copy link
Member Author

@patak-dev the error comes from vite, vitest doesn't handle the /__open-in-editor?file= url, you can check the vite server middleware here: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/index.ts#L528

Vite is using this library https://github.com/yyx990803/launch-editor from Evan

@userquin
Copy link
Member Author

We don't need tooltip listeners, the floating tooltip lib works also with focus and blur events

@antfu antfu merged commit 088b2dd into main Mar 28, 2022
@antfu antfu deleted the userquin/fix-open-ide-on-error branch March 28, 2022 02:15
chaii3 pushed a commit to chaii3/vitest that referenced this pull request May 13, 2022
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.

None yet

3 participants