Skip to content

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

Merged
merged 11 commits into from
May 15, 2023
Merged

Updating multiple lessons #390

merged 11 commits into from
May 15, 2023

Conversation

Benkex
Copy link
Contributor

@Benkex Benkex commented May 11, 2023

See my comments in the commits

Benkex added 7 commits May 10, 2023 17:26
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.
@vercel
Copy link

vercel bot commented May 11, 2023

@Benkex is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@dummdidumm dummdidumm left a 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.

Copy link
Member

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.
Copy link
Member

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):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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}
Copy link
Member

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.

@Benkex
Copy link
Contributor Author

Benkex commented May 11, 2023

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?

In Keypad.svelte we've hidden some repetitive code, that can be reduced with Svelte syntax. Can you find and solve it?

Also, I find the revert of changing yes to checked sad, as yes is a "synonym" of true, which is a value, and as such, not ideal for the name of a variable in my opinion.
I will revert all requested changes tomorrow, and let you think again.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@dummdidumm dummdidumm merged commit 7ea6eed into sveltejs:main May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants