-
Notifications
You must be signed in to change notification settings - Fork 239
Updating multiple lessons #390
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
Conversation
and [Part 1 / Bindings / Textarea inputs], as no explanation is needed there anymore, only a small reminder.
Added reference to the value "i" to explain, that the key block rebuilds when the following expression (after #key) changes, not just "an expression". This should provide more clarity.
README code didn't match the actual scripts, so I updated it to match them.
Reduced boilerplate code. Seriously, guys X) if you create an awesome tool, use it!
Used even more shorthand forms ( {src} ) and explained, that to src we don't have to bind.
@Benkex is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
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.
Thank you! I left a few comments with things I'd like to see reverted. In general it's easier most of the time to create separate PRs for separate exercises.
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.
Please revert the changes to this exercise (and the one where you removed the shorthand explanation). The shorthand is explained at the end of that chapter - we don't need to move it in front - and we'd like to keep the yes
name
@@ -2,9 +2,9 @@ | |||
title: Key blocks | |||
--- | |||
|
|||
Key blocks destroy and recreate their contents when the value of an expression changes. This is useful if you want an element to play its transition whenever a value changes instead of only when the element enters or leaves the DOM. | |||
Key blocks destroy and recreate their contents when the value of the following expression (in the example: `i`) changes. This is useful if you want an element to play its transition whenever a value changes instead of only when the element enters or leaves the DOM. |
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 find the previous sentence to be more readable, please revert this change. This is a general introductionary sentence to the key blocks.
@@ -4,13 +4,13 @@ title: Media elements | |||
|
|||
You can bind to properties of `<audio>` and `<video>` elements, making it easy to (for example) build custom player UI, like `AudioPlayer.svelte`. | |||
|
|||
First, add the `<audio>` element along with its bindings (we'll use the shorthand form for `duration` and `paused`): | |||
First, add the `<audio>` element along with its bindings (we'll use the shorthand form for `src`, `duration` and `paused`, and to `src` we don't have to bind): |
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.
First, add the `<audio>` element along with its bindings (we'll use the shorthand form for `src`, `duration` and `paused`, and to `src` we don't have to bind): | |
First, add the `<audio>` element along with its bindings (we'll use the shorthand form for `src`, `duration` and `paused`): |
<button on:click={select(7)}>7</button> | ||
<button on:click={select(8)}>8</button> | ||
<button on:click={select(9)}>9</button> | ||
{#each [1, 2, 3, 4, 5, 6, 7, 8, 9] as i} |
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.
While this is a clever way to write it, the previous version is more readable to novice Svelte devs because they don't have to understand #each
blocks while solving the exercise - therefore please revert this change.
No problem:) I'll do as you ask. I understand, why you want to revert the change with #each. But if that has to go, what about a small awareness-raising in the tutorial?
Also, I find the revert of changing |
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.
Thank you!
See my comments in the commits