docs
docs copied to clipboard
feat: update API/SFC preference using shortcuts
Description of Problem
Easy the switch without using mouse and keep focus on content
Proposed Solution
Add keyup event listener for API and SFC preference.
Ctrl+(Alt/Option)+A: toggle Options/Composition API
Ctrl+(Alt/Option)+T: toggle template (SFC or HTML)
Additional Information
Externalize logic into a composable
✔️ Deploy Preview for vue-docs-preview ready!
🔨 Explore the source changes: 91136840625bf846f83782498b72edb39c1e0b33
🔍 Inspect the deploy log: https://app.netlify.com/sites/vue-docs-preview/deploys/61f1291fc3d6000007ca34a6
😎 Browse the preview: https://deploy-preview-1449--vue-docs-preview.netlify.app
@skirtles-code, this one!
Can we get rid of the dotted underline? It looks a bit out of place. We can mention the shortcut at the end of the "Introduction - API Styles" section .
Can we get rid of the dotted underline? It looks a bit out of place. We can mention the shortcut at the end of the "Introduction - API Styles" section .
Yes, I'll do that
I just tried on OSX, and shortcut doesn't work for an unknown reason..
I just tried on OSX, and shortcut doesn't work for an unknown reason..
Fixed!
@edimitchel Great 👍
Deploy Preview for vuejs ready!
Name | Link |
---|---|
Latest commit | 8ff55a7487cf15666db7a88b0b125b9a7acc6989 |
Latest deploy log | https://app.netlify.com/sites/vuejs/deploys/6317e09f41ec890008030dc7 |
Deploy Preview | https://deploy-preview-1449--vuejs.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
I use keyCode as key doesn't result to a
or t
but Dead and a cross symbol.
Any news here @yyx990803 ?
@NataliaTepluhina can we bring this into Vue docs?
@edimitchel will take a look this week when I am back from the conference! @skirtles-code do you have any comments on this one?
Preview URL: https://deploy-preview-1449--vuejs.netlify.app/ Netlify url in the comment above is not good
I'd also note that I'm on Ubuntu, which uses Ctrl+Alt+T to launch a terminal window, so I can't actually use that shortcut to toggle the API. But I'm not sure whether that's worth addressing for the relatively smaller number of people affected.
Decided to remove the SFC Preference shortcut which don't making sense, unlink the API Preference shortcut
@edimitchel I'd like to get this over the line. Could you take a look at my latest comments above? There are also merge conflicts with the current main
branch. Thanks.
Closing this PR as it's not adding as much functionality as I thought