-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Cookbook] Add Electron + Vue cookbook #1681
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
base: master
Are you sure you want to change the base?
Conversation
Thanks! I'll take a look soon |
Hi @sdras , would you be able to review the cookbook? If not, no worries (I totally understand if you're time is better spent elsewhere!) |
I know you've waited a bit and apologize on the delay! but I'm still on honeymoon until later this week. I will get back to you next week at the latest. Thanks for the ping. |
Thanks! Enjoy your honeymoon! |
Hi there @konaraddi! I'm back. So, this is incredibly promising and well written. I think it will be a great addition. However, the Vue CLI was upgraded a little bit ago- I tested it out and this version is only compatible with the older version of the CLI, not 3. Could you please work on it so that it will work with that version? https://cli.vuejs.org/ Once that is done, I'll give it a more thorough review. Thanks for your work on it! |
package.json
Outdated
@@ -2,7 +2,7 @@ | |||
"name": "vuejs.org", | |||
"private": true, | |||
"hexo": { | |||
"version": "3.7.0" | |||
"version": "3.7.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change necessary for the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I bumped it back down in 28d53af. I don't remember specifically wanting to bump up the version of hexo (I haven't use hexo elsewhere); might be from running npm install
. Anyways, I'll be sure to commit only the necessary files next time. Thanks!
</template> | ||
|
||
<script> | ||
export default { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this code example is a bit too long, which makes it harder for 1) readers to follow and 2) maintainers to sync between the markdown and the raw scripts. Can we use something shorter e.g. (OTOMH) the todo app?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered the todo app but went with the timer because building a timer
- is quick to build and easy to understand what the code is doing
- is a small amount of code (and less code than results for todo lists built with Vue on GitHub)
A timer lets us focus on the Electron part of the cookbook. I think with a todo list I'd be spending most of the tutorial on how to build a todo list in Vue, and many existing tutorials for Vue involve building todo lists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still maintain that the current code is too long for a cookbook. I personally find it hard to follow, and would like to think that defeats the purpose.
Btw (and I missed this before), it would be far better IMHO if we don't need to rely on a third party boilerplate (simulatedgreg/electron-vue) for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @phanan, I think this cookbook entry is valuable but it strays from the point sometimes. In this cookbook you probably shouldn't be explaining computed properties and refactoring. It would be better to show a bit of the code, and have the full thing hosted elsewhere, and then build on that by only what's changed with one line for context and an ellipsis [...] to convey there's more
Otherwise, you would have to go the other route with a much smaller example. You can make a really small Vue to do that's more immediately legible than the timer.
Should I copy and paste the |
|
||
Next, let's add buttons for setting the timer's default value. We'll need to add variables for the default minutes and seconds too. When we click the Reset button, our timer will set itself to the default minutes and seconds variables. Make the changes indicated in the comments below. | ||
|
||
```vue<template> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be on a separate line, like:
... vue
<template>
(can't put backticks in because it would break, but hopefully you get the drift)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really nice start but we do need to refactor the examples a bit to make it read a little more seamlessly. Perhaps try to imagine that you're someone with great proficiency with Vue but isn't aware of how it works with electron, what's the smallest and most concise amount of information you'd need to get the point across? Thanks for your contribution!
</template> | ||
|
||
<script> | ||
export default { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @phanan, I think this cookbook entry is valuable but it strays from the point sometimes. In this cookbook you probably shouldn't be explaining computed properties and refactoring. It would be better to show a bit of the code, and have the full thing hosted elsewhere, and then build on that by only what's changed with one line for context and an ellipsis [...] to convey there's more
Otherwise, you would have to go the other route with a much smaller example. You can make a really small Vue to do that's more immediately legible than the timer.
--- | ||
title: Building Desktop Apps with Electron and Vue | ||
type: cookbook | ||
order: 13 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we're past 13 now, this should be updated
Any news on this one? Would you like some help getting it done? In the future, we'll be using Google Docs for all these changes so it can go a little faster. |
Hi Sarah, thanks for following up! Currently busy with school work and other commitments but I can work on a rewrite in June. Does that work? |
Yep, that works! Thank you for the update @konaraddi :) |
Closes #1573 and improves upon #1611
For the Base Example section, I had to deviate from the guidelines a bit to provide enough steps for the reader to follow. Please let me know if and what changes need to be made. Thanks!