Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 3 years ago

GitHub user search app- Flexbox, Vanilla JS, and API.

fetch
Eileen dangelo•1,600
@Eileenpk
A solution to the GitHub user search app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


This was a good project! I had a hard time figuring out how to change the input value if null so I could add the class onto the element displaying the text Not Available. Getting this one part right took 75% of the time I spent on the challenge : ). In the end, I finally figured out that you can use the || operator in template literals. The only link that I couldn't get to work was for the user's company, I'm not sure why. If anyone can figure it out let me know!! I also made it so that it brings up my GitHub profile on load so if you want to compare the design to the one I made go to the live site and search octocat.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Vanza Setia•27,715
    @vanzasetia
    Posted almost 3 years ago

    Hi, Eileen dangelo! 👋

    Congratulations on completing this challenge! 🎉

    I highly recommend getting the HTML right first.

    • Use interactive elements for anything that has interactivity. In this case, the theme switcher is using div at the moment. I recommend either using the checkbox or button. Also, I found that A Theme Switcher and Toggle Buttons articles help me to create an accessible theme switcher.
    • <lable> is not valid HTML tag. I am sure that it should be <label>. But, you need to fix this. Otherwise, it is not valid HTML.
    • Wrap all the input, label, and button with form element. After that, on JavaScript, grab the form element and then make it listen to the submit event.
    • The info-container should be a list. Also, the h4 inside the info-container should be replaced by span or p. The heading tag has a meaning which is like a title in a document. In this case, it can't be a title for a number below it.
    • The link-container also should be a list with four bullet points.
    • Location is not a link. It is just plain text.
    • There are more actually like bio should not be a section and h3, "Not available" links should not be link elements (it's just a plain text), etc. So, I suggest learning about web accessibility.

    I would recommend getting the HTML right first. It is important to get the page structure correct because it really impacts the accessibility of the website. Also, an accessible website can lead to more user engagement since almost everyone can access your website.

    That's it! I hope this helps! 😊

  • Jason Moody•300
    @MoodyJW
    Posted almost 3 years ago

    Hi Eileen, great job on the challenge! Your question about the company, I think I see what's wrong.

    You're using the company property on the user data, but the one you want is actually organizations_url. A bit confusing, but if you look at the data in your network tab you'll see company: null and that property is actually just a string for the user's company, company: "Company Name".

    A styling issue I noticed is that you haven't accounted for longer strings overflowing their container. Here's a screenshot of what I'm talking about. You can probably solve this pretty easily by adding a couple of styles to your <a>:

    text-overflow: ellipsis;
     overflow: hidden;
    

    That would likely solve it for all screen sizes.

    I also encourage you to take a look at your HTML report as you have quite a few issues there. For example, you typo'd on a <label> element.

    Hope this helps you out. Don't forget to be proud of all the things you did right!

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub