-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dwh-mentored-pair-programming
- Loading branch information
Showing
38 changed files
with
409 additions
and
234 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
common-content/en/module/how-our-curriculum-works/overview/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
+++ | ||
title="Overview" | ||
description="tl;dr How Our Curriculum Works" | ||
emoji="🦌" | ||
time=2 | ||
[objectives] | ||
1="Explain the structure of our curriculum" | ||
[build] | ||
render = 'never' | ||
list = 'local' | ||
publishResources = false | ||
|
||
+++ | ||
|
||
The course is divided into modules, each with a theme and learning objectives. Modules are divided into week-long sprints. Each sprint contains these activities in this order: | ||
|
||
##### 1. Start with the: **🧑🏾💻 Prep**, which explains the main concepts of the sprint. | ||
|
||
**Learners** complete prep before class. **Mentors** browse prep to know what learners are learning. | ||
|
||
##### 2. Then go to: **🏷️ Backlog**, a list of coursework assignments as issues. | ||
|
||
**Learners** clone issues to project boards and work on them. **Mentors** browse issues to know what learners are doing. | ||
|
||
##### 3. For class it's the: **🧑🏾🤝🧑🏾 Day Plan**, a timestamped agenda for class day. | ||
|
||
Usually a lively morning workshop and quieter afternoon study-group. **Everyone** should review the plan to prepare for class. | ||
|
||
##### 4. Review with: **✅ Success**, the learning objectives for the sprint. | ||
|
||
**Learners** check off goals. **Mentors** help us focus on the sprint goals. | ||
|
||
### Still lost? | ||
|
||
1. 🔍 Search: filter by module, sprint, and view. | ||
1. 🦉 [Overview](/overview): your high level map with themes. | ||
1. 📚 [How this works](/how-this-works): our programme in detail. |
45 changes: 45 additions & 0 deletions
45
common-content/en/module/js3/actually-re-rendering/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
+++ | ||
title = '🔁 Actually re-rendering' | ||
|
||
time = 30 | ||
facilitation = false | ||
emoji= '🔁' | ||
[objectives] | ||
1='Group UI components by whether they need to re-render' | ||
2='Control which UI components are re-rendered' | ||
[build] | ||
render = 'never' | ||
list = 'local' | ||
publishResources = false | ||
|
||
+++ | ||
|
||
We have seen that when we search, we're only _adding_ new elements, and not removing existing elements from the page. | ||
|
||
We previously identified our strategy of clearing old elements before adding new ones. But we are not doing this. | ||
|
||
We can clear out the existing children of an element by setting its `textContent` propery to the empty string: | ||
|
||
```js | ||
document.body.textContent = ""; | ||
``` | ||
|
||
Add this to your `render` function before you add new elements. Try using your page. Try searching for a particular film. | ||
|
||
Oh no, our search box is gone! | ||
|
||
{{<note type="exercise">}} | ||
Work out why our search box is gone. Remember what we just changed, and what we were trying to do by making that change. | ||
{{</note>}} | ||
|
||
We removed our search box from the page because we removed everything from the entire document body. | ||
|
||
This was not our intention - we only wanted to remove any films we had previously rendered. | ||
|
||
A way to solve this is to introduce a container element which our `render` function will re-fill every time it's called. | ||
|
||
We should identify which elements in our page should be re-drawn every time we render, and which should always be present. | ||
|
||
Introduce a new container, and keep any "always present" UI elements outside of it. Update your `render` function to clear and append to the container, not the whole body. | ||
|
||
Remember to use semantic HTML. Your container should be an appropriate tag for the contents it will have. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.