Giter Club home page Giter Club logo

cgko-week-4's People

Contributors

frannyfra avatar gminova avatar tonylomax avatar xirusux avatar

Stargazers

 avatar

Watchers

 avatar

cgko-week-4's Issues

Mobile

Well done on using flexbox!
Maybe, adding a @media query for mobile / applicable for device under 320px to have something more centered?

Capture d’écran 2019-07-26 à 10 44 32

Commented out code

Saw a couple of commented out code, it would be good to remove them once you no longer need them as well as some console logs you may not need anymore to keep your code from getting cluttered 👍

Refactoring handle.js 'extension'

I think, this can be a simple one :)
It would be interesting to see if it's possible to refactor the code of your handler.js file when you re-adjusting the variable 'extension'/'extensionType'. For e.g.: Taking it out of the handlePublic function, to put it in your global scope, so you can use it everywhere (have a look in our code, maybe it can help if what I say isn't super clear ^^)

Accessibility

Just run the Audit in the console and that's what I found:

Capture d’écran 2019-07-26 à 10 39 23

Maybe focusing on these which seems to be the most important?

  1. Background and foreground colors do not have a sufficient contrast ratio.
  2. Form elements do not have associated labels

404 Page not handled

Currently any incorrect url path is displaying your postcode.json file and not your 404 message. You may want to look at how you are determining any "wrong" paths in your router and possibly how you are handling errors in your handler.js file

test.js

No tests in the test.js folder, but i guess you know this already!

Great picture in README: frontend vs backend

I'm learning with metaphors and this one is really helpul:
Backend is what you don't see unless you peek (but don't need to use the product), it's often more messy and complex. Frontend is what matters to the user and needs to be pretty!

queryString is not being encoded before being sent as get request

in your index.js file(client side)

queryString is being defined as

let queryString = input.value;

and its directly sent to the server in a get request

xhr.open("GET", queryString, true);

the problem here is that urls only allow certain characters.
forbidden characters must be encoded into their hex equivalents.
(refer to week4 research, I have mentioned url encoding)

there is a convenient method encodeURIComponent() that will take your queryString and encode it in the correct format.

let queryString=encodeURIComponent(input.value)

Placeholder placement

Just a lil thing I saw in your html file is that you put your placeholder text within your datalist node I think you may have meant to put it in the input node so that it will show up in the input box. Alternatively I saw you had a label node for your input but it was empty, it's always good to include some text to help the user know what is to be expected of them to do for that input box.

Good job team CGKO! 🤟🏼

Well done this week! You've gotten through it!

I know from my experience from this week is that it was definiately a learning curve. It has scarred me.

If you do find time to add more post codes that'll be cool (feeling a lil left out here in SE 🥺)

Datalist repitition

Good job using the datalist element!

But you may want to look into clearing it once the input is updated so that it does't keep adding results from previous inputs

Server running message is showed before it starts

server.listen(port);
console.log(`server up and running on port: ${port}`);

At the moment what it does it starts binding the port, then you outputs the message, then it starts the server, which can throw an error, so the message is premature.
Easy fix is to put the message inside the callback:

server.listen(port,()=>{
 console.log(`server up and running on port: ${port}`);
});

package.json test script has wrong path

It's a simple omission I presume: tape will look in the main dir of the project, but should look in test dir. Even if test.js is empty you might want to just add src/ in front of you tape path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.