-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Change scheme for fetch #1307
base: main
Are you sure you want to change the base?
Change scheme for fetch #1307
Conversation
✅ Deploy Preview for cyf-sdc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-curriculum canceled.
|
✅ Deploy Preview for cyf-launch ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-programming ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-common ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-tracks ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-piscine ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for cyf-itd ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
LGTM, a few suggestions :) Thanks!
1. Add an input event listener to the search box | ||
2. In the handler, get `value` of input element |
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.
1. Add an input event listener to the search box | |
2. In the handler, get `value` of input element | |
1. Add an input event listener to the search box. | |
2. In the handler, get the `value` of input element. |
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 block now feels a bit mis-named - it's really talking about synchronous execution by way of setting up the next block to talk about asynchronous execution? May be worth either renaming, or combining the blocks?
Also if we keep this as-is, I'd drop its time from 40 minutes down to 5-10 minutes.
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.
Let's bump this block's time to 20?
|
||
### Web Server Access: The HTTP Protocol | ||
|
||
The second approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [Node.js's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: |
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.
The second approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [Node.js's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: | |
Another approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [Node.js's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: |
|
||
### Web Server Access: The HTTP Protocol | ||
|
||
The second approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [Node.js's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: |
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.
The second approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [Node.js's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: | |
The second approach involves using a local development server. You can create one using tools like [Python's built-in server](https://realpython.com/python-http-server/) or [npm's http-server](https://www.npmjs.com/package/http-server). These tools create a web server on your computer that serves your files using the HTTP protocol. Your browser will then access the files through a URL like: |
1. 🗓️ we know that sending requests over a network takes time | ||
1. 🧵 we know that we should not stop our program to wait for data | ||
1. 🪃 we know that we can use callbacks to manage events | ||
The `http://` prefix shows that you're accessing the file through a proper web server, even though that server is running on your own computer. |
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.
The `http://` prefix shows that you're accessing the file through a proper web server, even though that server is running on your own computer. | |
The `http://` prefix shows that you're accessing the file through a proper web server, even though that server is running on your own computer. | |
You need to be using `http://` (or `https://`) _not_ `file://` in order to use `fetch`. |
|
||
searchBox.addEventListener("input", handleSearchInput); | ||
When we call `addEventListener`, it doesn't immediately execute the `handleInput` function. Instead, it sets up a listener that will run this function later. Event listeners are actually part of the Event API provided by web browsers - they aren't part of the core JavaScript language! When you create an event listener, you're essentially making a request to a Web API to handle this functionality for you. In this pattern, the callback function (`handleInput`) only executes when a user types. We're using functions as containers for code that needs to execute at a later time, specifically in response to user interactions. This approach lets us tell the browser exactly what actions to take once a particular event occurs. |
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.
essentially? functionality? Can you do a Hemingway pass? 🙏
|
||
**👉🏽 [Visualise the Event Loop](http://latentflip.com/loupe/?code=JC5vbignYnV0dG9uJywgJ2NsaWNrJywgZnVuY3Rpb24gb25DbGljaygpIHsKICAgIGNvbnNvbGUubG9nKCdZb3UgY2xpY2tlZCB0aGUgYnV0dG9uIScpOyAgICAKfSk7Cgpjb25zb2xlLmxvZygiSGkhIik7Cgpjb25zb2xlLmxvZygiV2VsY29tZSB0byB0aGUgZXZlbnQgbG9vcCIpOw%3D%3D!!!PGJ1dHRvbj5DbGljayBtZSE8L2J1dHRvbj4%3D)** | ||
|
||
### 🧠 Recap our concept map |
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.
You've removed the map - can I have it back? Not everyone thinks in the same way. We can have multiple ways of modelling ideas.
What does this change?
http://
schemeI think the explanation on using the
http
scheme makes most sense in data-flows/sprint-3 which is why I did a minor re-jig to make way for the explanation in data-flows/sprint-3Common Content?
n/a
Common Theme?
Issue number: #1107
Org Content?
Sprint
Checklist
Who needs to know about this?