CodingGarden / seedling-school-01-frontend-project

For your first project, you will build a frontend website with HTML, CSS and JavaScript. The website will communicate and integrate with a 3rd party Web API.
MIT License
106 stars 14 forks source link

Fortnite Tracker Submission #4

Open ProxN opened 5 years ago

ProxN commented 5 years ago

Project Name / Title

FortTrack

Your Name / Title

ProxN

Project Description

An application where users can look on their fortnite stats, Leaderboards.

What 3rd Party Web API do you plan to use?

Which of the following describes you:

w3cj commented 5 years ago

Looks good, but I'd like you to add a little bit more under the How will users interact with your web site? section.

Not much, but just something like:

  1. User will be presented with a landing page
  2. The user will enter their fortnite username and click submit.

You can take a look at some of the other open issues to get an idea what other people have done.

Update that and you're ready to start coding!

w3cj commented 5 years ago

How are things so far? Any updates to share?

ProxN commented 5 years ago

Almost done. I'm working on rendering user stats

ProxN commented 5 years ago

here my app: https://fortstats.netlify.com, fortnite user to try : gz_proxn still, need some fixes

mahendrjy commented 5 years ago

I like it. Statistics page looks amazing. I don't think that statistics bar thing is working. Is it ?

You should do

w3cj commented 5 years ago

Looks great! Would you like some UI / UX feedback or a code review?

ProxN commented 5 years ago

Thank you jakepintu, I did change font size and added a loader. w3cj Yes please if you can review both my design and code and thank you.

mahendrjy commented 5 years ago

Your welcome ProxN

w3cj commented 4 years ago

UI Review

Things I like

Checklist

w3cj commented 4 years ago

Code Review Checklist

README

HTML

JavaScript

CSS

Code Suggestions

I didn't have time to look through everything, but here are few suggestions:

elements.searchForm.addEventListener('submit', e => {
  e.preventDefault();
  const query = searchView.getInput();
  ControlSearch(query);
});
elements.searchNav.addEventListener('submit', e => {
  e.preventDefault();
  const query = searchView.getNavInput();
  ControlSearch(query);
});

Can be cleaned up by making a reusable function:

const addSearchSubmitHandler = (element, getQuery) => {
  element.addEventListener('submit', (e) => {
    e.preventDefault();
    const query = getQuery();
    ControlSearch(query);
  });
};

addSearchSubmitHandler(elements.searchForm, searchView.getInput);
addSearchSubmitHandler(elements.searchNav, searchView.getNavInput);
const topStats = {
  Wins: true,
  Score: true,
  Kills: true,
};

const renderOverviewStats = (key, value) => {
  let subtitle = 'Total';
  let title = key;
  if (key === 'K/d') {
    title = 'kills';
    subtitle = 'Per Death';
  } else if (key === 'Win%') {
    subtitle = 'Average';
    title = 'Win Rate';
  } else if (!(key in topStats)) {
    title = 'Matches';
    subtitle = 'Played';
  }
  //... more codes here...
};
ProxN commented 4 years ago

Thanks for review.