-
Notifications
You must be signed in to change notification settings - Fork 3.4k
2.0 Docs #319
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
Comments
Re using |
@yyx990803 👍 Updated the guidelines. |
I went over 2. Overview I think everything still holds for Vue 2.0. Examples work fine. One thing I'm not really sure is if Vue 2.0 is also supporting IE9 and above? If that's true then we might not need to change anything in |
@zigomir I just went through the Overview section and mostly just added more links, but it did indeed need very little change. 😃 |
@yyx990803 In writing some documentation for lifecycle hooks, it occurred to me that all of them are in pairs (e.g. |
In computed.md line 72, it should be |
@zkwolf Thanks!! Good catch. 😄 Just fixed it. |
@chrisvfritz And ... In list.md Object |
@zkwolf Woohoo! Fixed. 😃 Thanks again for your excellent eye. |
@yyx990803 Is there a way to add new keyCode aliases in 2.0? The only gettable directives seem to be |
@yyx990803 Also, it looks like |
@chrisvfritz yeah, overlooked the custom keyCodes usage. Implemented in vuejs/vue@4fe51a7. It is now exposed as Yes, transition no longer applies the automatic class. The user can either provide the always-on class themselves, or define the |
1.vue-server-renderer can solve 'seo' question? |
@MeiYuanChen Moving all the docs into a Vue app would take a lot of time to port and the advantages wouldn't be that significant at this point. Hexo is working for us just fine for now. 😃 |
In forms.md line185, it should be |
@zkwolf Another excellent catch! Fixed. |
Hi Vue team, two questions:
Regards |
Hi @cezaraugusto! Great questions. 😃
Let me know if that fully addresses your questions. |
Sure @chrisvfritz, thanks for clarifying. Great job so far 👌 , am following closely 👀 . |
Thank you so, so, so, so, so, so, so, so, so, so, so, SO very much for this. I teach Vue to people as an introduction to frontend JavaScript, often in programming communities with little to no culture of JS tooling, so this is huge for me. Thank you thank you thank you thank you thank you. |
@chrisvfritz, should I open a ticket about issues I found or comment them here first? |
@miljan-aleksic You can just comment here. Thanks for your help! |
All i can say after cloning and running this is wow! Absolutely awesome job on the new docs and Vue 2 overall and i've only read the new transition page so far.. |
I would like to point out two things in comparison docs...I hope this is right place for this. The second is the issue with if statements vs ternary statements in jsx. While this is definitely an issue, there is a solution on the horizon, in the form of do expressions. With do expressions, a if/else can be wrapped into one expression and used in JSX (or in array functions for that matter), which makes the syntax a tiny bit more palatable. For example:
There is still "syntax tax", but it's definitely nicer looking then hoisting or using ternaries. |
@blocka Thanks for taking a look at this! The comparisons section is definitely something the team will be discussing in more detail before the final release. Regarding those specific items: Production use of create-react-appWe're aware of this project, but even their documentation only recommends it for getting started with React. It's currently missing many features vital for non-trivial projects, most notably the lack of support for any testing, CSS preprocessors, ES7/2016 features such as the object spread operator and decorators (both are often used quite extensively within React projects), and hot module reloading. If I were starting a new React project today, I can't think of a scenario where I would use it - and even if I were forced to, I'd have to immediately eject and modify the build process before any significant work could begin. I think adding a note to let people know we are aware of this project would be good though. 👍 Do expressions for cleaner JSXI'm definitely excited about do expressions. They'll help a little, but they're currently at stage 0, which is a little more unstable than many projects are willing to work with at this point. I'll add a note about them nonetheless. |
This is not the case. It is explicitly labeled “production-ready”. Yes, it is currently catered more to beginners than to advanced users, but even advanced users find it useful: (This is from the post-eject survey.)
The support for testing has been merged, and while we may tweak a few things before releasing it officially, it is going to be added. I believe README explicitly says we intend to add testing.
You can run your existing preprocessors just fine if you want to, and import resulting
This is incorrect, spread operator has been supported from the very first release.
Decorators are currently not officially supported by Babel, have weird hard-to-diagnose issues, and the spec is still changing. In my experience many people get confused by decorators, and I’m not comfortable including them while they are so unstable in practice.
It’s enabled for CSS, but hot reloading for React components is currently too flaky. (I hope I qualify to speak about that 😄 .) We care about providing the complete cohesive experience, not just picking the latest popular things. So yes, we leave something out, but we do it on purpose, and not because the tool is half-baked. |
Thanks for the input @gaearon! This is definitely helpful in making sure we don't misrepresent the create-react-app project. 😃 Some quick notes:
Project GoalsI think this is a misconception that could be resolved by updates to the README. My understanding that it was mainly intended for onboarding came from the "Why Use This?" section, which starts with "If you’re getting started with React [...]" - the bolding is not mine. Testing SupportGlad to hear that it's on the way!
I didn't see any explicit mention of this. The section I think you may be referring to contains 3 qualifiers (italics are mine):
This doesn't convey a sense of inevitability to me, but a tweaking to the wording in the first clause might be helpful if you wish to - something like: "We're actively working on the features above and they will be added when [...]". Thanks Again 😄Thanks again for the feedback! As we revise this section a little more, I'll be sure to mention/tweet you so you can take another look. |
Thanks for the feedback. We’ll tweak messaging as we get to 1.0 and make this thing more official. |
Good,Good,But Where is The Chinese Docs ? ? ? @yyx990803 |
@AyaMeng As far as I know, translation to Chinese hasn't started yet. When it does, would you like to help? |
At https://rc.vuejs.org/guide/components.html#Form-Input-Components-using-Custom-Events please consider rewriting the last example from: template: '\
<div class="form-group">\
<label v-bind:for="randomId">{{ label }}:</label>\
<input v-bind:id="randomId" v-bind:value="value" v-on:input="onInput">\
</div>\
' and change it to a more readable: template:
'<div class="form-group">' +
'<label v-bind:for="randomId">{{ label }}:</label>' +
'<input v-bind:id="randomId" v-bind:value="value" v-on:input="onInput">' +
'</div>' Thanks |
Even better
unless for some reason es6 is avoided in the docs. |
Similar template readability complaint at https://rc.vuejs.org/guide/components.html#Components-and-v-for |
At https://rc.vuejs.org/guide/components.html#Async-Components do components accept a returned promise? It didn't indicate whether it did. |
Same template complaint at https://rc.vuejs.org/guide/components.html#Cheap-Static-Components-with-v-once as well. |
@blocka: we use ES5 in the guide (See the second bullet point in the OP), so no template strings. @smithb1994 Personally, I don't think your way of writing the template is nessessarily more readable, but we will see how he others feel about it. |
There is no lifecycle diagram at https://rc.vuejs.org/guide/instance.html#Lifecycle-Diagram |
|
Few lines under here (on list) tells Also for the lack of
|
Incorrect command in Guide: Coditional and Loops section: "In the console, enter |
@chay22 You're not missing anything - @hasssan Thanks! Fixed the typo. |
currently says
The first sentence is ok. The second sentence needs to be rephrased. (Sorry, I don't have a good suggestion. I would have made a PR if I had.) Thank you. |
@jbruni Thanks, fixed! |
We're locking this thread for now, as the discussion part of the docs is pretty much done now. We still welcome continued feedback in the form of new issues though! 😃 |
The core docs are now officially complete! We'll continue to improve them, but everything should have basic coverage. |
Guidelines for writing official Vue docs
These are not immutable dictates, but rather a place to consolidate our evolving consensus. If there's an item you strongly disagree with, please do discuss it below and this section will be updated to better explain and reflect the new consensus.
ferross/standard
in JavaScript examples.el: '#app'
in place ofel: 'body'
to encourage the thinking that you are able to limit Vue's scope on your page..vue
file syntax or JSX.https://unpkg.com/vue@next/dist/vue.js
to reference Vue 2.0 in all fiddles.!!TODO: ...
in place of the URL. The!!
prefix makes them distinguishable from todo list examples in a search. 😛Vue.js
in page titles andVue
for every subsequent mention.vue-router
rather thanVue Router
orVueRouter
).This list is incomplete and only represents the first pass we'll make in rewriting the docs for 2.0. It's very likely we'll want to remove/add/reorganize many pages and sections. As more issues become apparent in the process of writing docs, we can discuss them here in this issue.
@chrisvfritz
0. Installation@chrisvfritz
1. Getting Started@chrisvfritz
2. Overview@chrisvfritz
3. The Vue Instance@posva
4. Data Binding Syntax@chrisvfritz
5. Computed Properties@chrisvfritz
6. Class and Style Bindings@chrisvfritz
7. Conditional Rendering@chrisvfritz
8. List Rendering@chrisvfritz
9. Methods and Events Handling@chrisvfritz
10. Form Input Bindings@chrisvfritz
11. Transitions@chrisvfritz
12. Components@chrisvfritz
13. Reactivity@chrisvfritz
14. Custom Directives@chrisvfritz
15. Custom Filters@posva
16. Mixins@kazupon
17. Plugins@chrisvfritz
18. Building Large-Scale Apps. This is being split up into several sections:@chrisvfritz
19. Comparison with Other Frameworks@chrisvfritz
20. Join the Vue Community!@chrisvfritz
render
functionsVNode APImoved to API section@chrisvfritz
Server-Side RenderingIntegrating vue-router, vuex, and vue-server-rendererSSR docs link to documentation and examples for this@chrisvfritz
1.0 Migration GuideMisc topics that need better coverage
@chrisvfritz
v-once
@chrisvfritz
how to do<script type="text/x-template" id="foo">
withtemplate: '#foo'
not very frequently used, so probably fine to just be in API docv-cloak
not very frequently used, so probably fine to just be in API docv-pre
@chrisvfritz
ref
in non-v-for
contexts?Resources:
Sections:
@fadymak
Global Config@fadymak
Global API@fadymak
Data@fadymak
DOM@fadymak
Lifecycle Hooks@fadymak
Assets@fadymak
Misc@kazupon
Instance Properties@kazupon
Data@kazupon
Events@kazupon
DOM@kazupon
Lifecycle@kazupon
Directives@kazupon
Special Elements@yyx990803
Special Attributesjust point to vnode sourceunclaimed
VNodejust point to GitHubunclaimed
Server-Side RenderingThe text was updated successfully, but these errors were encountered: