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
Generate web-types for @ionic/vue package #19522
Comments
Thanks for the issue! We recently released an all new Ionic Vue beta that should fix most of the issues reported. Can you try out the latest Ionic Vue beta and let me know if this is still an issue? Getting Started with the latest Ionic Vue beta The new Ionic Vue beta is built for Vue 3. Moving forward, we are not going to support Vue 2. For information on how to get started with the latest beta, check out our Ionic Vue Getting Started Guide. At this time, we do not have a migration path from Ionic Vue built for Vue 2 to Ionic Vue built for Vue 3, but the Ionic Framework differences should be minimal. Feel free to check out our Ionic Vue Beta Announcement blog post for more details on this release. Help! The reported issue still happens in the latest Ionic Vue beta. Please follow up here with the issue reproduced in an Ionic starter application running the latest Ionic Vue beta. Also include any revised steps to reproduce the issue. Issues that do not have a GitHub repo with the issue reproduced in an Ionic starter app will be closed. My issue is resolved/My issue is no longer relevant. You can either close the issue yourself, or do nothing. If there is no response within 14 days, this thread will be automatically closed. I have a new issue. Please create a new issue. Be sure to reproduce the issue in an Ionic starter application running the latest Ionic Vue beta and include a link to the repo. Be sure to search for your issue first, as the issue you are running into may have already been reported. We are excited to get closer to the Ionic Vue release and look forward to welcoming new Vue developers to the Ionic community. Please let me know if there are any questions. Thanks! |
@liamdebeasi It looks like the issue is still valid. Vue 3 doesn't provide good framework for documenting components, directives and filters provided by the library for use in templates. |
Thanks for checking! To clarify, this is just for WebStorm, correct? |
@liamdebeasi At this point yes, but web-types (https://github.com/JetBrains/web-types) are open standard and we hope other editors will also support it. There is FR for VSCode Vetur plugin vuejs/vetur#2090 to support web-types. Vetur is currently using it's own format, which is very limited and doesn't support component slots, directives, filters etc. I can contribute web-types generation. All I need is for someone familiar with the build system, to show me where to plug-in, so that I can access Ionic documentation and generate the file. |
Thanks! We would love to have a contribution for this. In terms of the build system, proxies.ts has all the Ionic components that are auto generated from the components/ has additional components that wrap the regular Ionic components to provide additional features (such as router integration) The build system is fairly straightforward: https://github.com/ionic-team/ionic-framework/blob/ionic-vue/packages/vue/package.json#L5-L12 We aren't really doing anything to fancy here. Is there any other information that would be helpful? |
This issue has been labeled as If you'd like to work on this issue, please comment here letting us know that you would like to submit a pull request for it. This helps us to keep track of the pull request and make sure there isn't duplicated effort. For a guide on how to create a pull request and test this project locally to see your changes, see our contributing documentation. Thank you! |
@liamdebeasi Thanks for the pointers! What I am missing here is the access to the actual documentation for the elements and attributes, not just the list of them. E.g. docs here https://ionicframework.com/docs/api/back-button have detailed description for |
Sure thing - so that will all be found in the core directory: https://github.com/ionic-team/ionic-framework/tree/master/core/src All components have their documentation autogenerated into the following files:
Taking
|
Thanks! Looks like I should be able to take it from here :) |
Great! Happy to answer any additional questions if they come up 👍 We appreciate you taking a look at this! |
If you like to use Vetur then you can try this simple plugin that adds autocompletion for tags and attributes to your Ionic Vue project: https://www.npmjs.com/package/@modus/ionic-vetur Just add it to the project and it will work automatically (given that you already have Vetur installed) npm i modus/ionic-vetur -D |
Hey there @piotrtomiak, Wanted to check in and see if you were able to make any progress. Now that Ionic Vue has shipped, I have some additional time to help out if you need it. |
@liamdebeasi Sorry, I wasn't able to start it yet, I need to fix various Vue-related bugs for upcoming WebStorm release and I'll be able to work on this afterwards, probably within 2-3 weeks. |
No problem! Let me know if I can help with anything. |
@liamdebeasi I've created a PR with the changes. Please review :) The generation code places |
Thanks for the issue. This has been resolved via #22428, and a fix will be available in an upcoming release of Ionic Framework. Thank you for all your help! |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Feature Request
Ionic version:
[x] @ionic/vue 0.0.x
Feature Request
This is a feature request to include
web-types
metadata information with@ionic/vue
library to provide users of WebStorm (and possibly other IDEs in the future) with precise code completion, inspections and documentation for Ionic components.Preferred Solution
The best solution would be to generate the file based on existing Ionic documentation JSONs during the build process and ship it with the library. This solution has been implemented in
quasar
library and are being worked on invuetify
andbootstrap-vue
. I've looked at some of the JSONs generated by ionic documentation and it should be relatively straightforward to transform information to a slightly different format.I can work on the transformation code itself, but it would be pretty difficult for me to hook into the build process in the correct place, so I need some help from your side, before I can create a PR for this.
Alternatives
It's difficult for an IDE to analyze contents of compiled Vue library and the quality of code completion, inspection and documentation is pretty poor.
web-types
offer excellent opportunity to provide consumers of your library with precise information. It is especially useful for new users of the library as it allows to avoid constant looking into documentation on the web.Related Code
Here is an example PR from Quasar - quasarframework/quasar#4749
Additional Context
The feature has been requested by one of our users on Twitter: https://twitter.com/leereichardt/status/1165554297225891841
The text was updated successfully, but these errors were encountered: