Wikipedia Viewer feedback very appreciated

I’ve finished this great challenge. I think that my project is functional, I did not find any major errors (I think…). But probably my code needs some meaningful and professional review. I’m not happy with my layout, but that’s something I will work next days.
So please take a look and give me a pinch of criticism :slight_smile:

I like it. No css/js libs, just your own code, responsive. You just forget to reset defaults for the body: margin: 0; padding: 0; Really good job. :+1:

1 Like

Hey, thanks a lot! I avoid bootstrap and jQuery if I can. I prefer to do everything ‘manually’ first :slight_smile:

dont forget in css to close proprties by semicolon ; like in the body here: font-size: 12px

Yes, thanks for this mention. I’ve corrected it.

Looks great. i know a clisse but a lot beetter than mine trully!!!

1 Like

Hey, i just finished this project too and i had a lot of issues finding the correct api endpoint.

  1. I noticed you used the opensearch property, and from what I read, it’s not really the property you are looking for. Source
    And here it says if you are not developping a browser, you should not use opensearch.
    You should use action=query list=search (or a generator)

  2. Why do you use this cors-anywhere.herokuapp.com prefix? I didn’t know that option and could come in handy i feel :slight_smile: (taking notes here)
    var wikiApiSite = "https://cors-anywhere.herokuapp.com/https://en.wikipedia.org/w/api.php?action=opensearch&format=json&search=";
    I also would like to mention that you won’t have CORS issues if you use &origin=* in your URL instead of the cors-anywhere stuff.

  3. And to be a complete jerk (just kidding):
    your search bar does not respond to a “enter” (keypress).

  4. I like the formatting of your results -> gonna look into this later and maybe change my output to something similar :slight_smile:

good job!

1 Like

Thanks for Your feedback and insights!

So let’s go:

  1. That’s something that I can obviously implement into my little App
  2. I use it because of an error (no access control allow origin in console) I get every time want to connect with API (any API, not only Wiki). Using this CORS prefix is popular workaround. I was trying to use the &origin=* but it did not work :frowning: .
  1. Yes, i forgot about adding enter to work the same like search button :slight_smile: , dummy oversight from my side.

So taking into account Your points, I will remove the opensearch, try not to use CORS prefix and add eventListener for the enter button.
Thank You again, every single code review is very precious for me, since I’m the very beginner in a Front-end dev world :slight_smile: