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

GitHub user search app

CarvalhoVincent•500
@CarvalhoVincent
A solution to the GitHub user search app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Everything works, but some problems when users have long blog address or name, my layout is not optimal.

Your comments or suggestions are welcome to correct possible mistakes, or help me to progress!

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, CarvalhoVincent! 👋

    I guess I had the same problem as you. When the user has a long string in one of the values then an overflowing issue is happening. I managed to solve the problem by using three CSS properties, overlfow, text-overflow, and white-space properties. I had written how I did solve the problem in my README. I recommend reading it if you are interested to learn more about it and how to solve it.

    I also notice a .DS_Store file in the GitHub repo. I recommend removing it. 🙂

    Some more suggestions:

    • I recommend getting the HTML correct. For example, give type attribute to the input, wrap the input, label, and the button with a form element, etc. It is important to get the HTML right first before moving on to the CSS or even JavaScript.
    • Inline styling should be avoided. It has the highest specificity and is not reuseable. Put all the styling in the external stylesheet.
    • Never use the HTML event handler attributes. Here are the reasons.
      • It is never a good idea to mix up the HTML and the JavaScript. It's best to keep them separated so that, you can apply the JavaScript to multiple HTML documents.
      • It can make the HTML and JavaScript hard to maintain. If there are a lot of event handlers then the HTML starts looking messy.
      • It makes it hard to not break the functionality since both are mixed up together. So, whenever you want to refactor the HTML, there's a high chance that you need to break the functionality as well.
      • Reference: https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#other_event_listener_mechanisms
    • So, I recommend using addEventListener() to handle all the events. It is scalable and can register more than one event to an element.

    I would recommend doing HTML and CSS challenges first and then getting some feedback to get the fundamentals right first. This way, you can get better feedback and for sure you can advance your skills more easily since you already have good fundamentals.

    That's it! I hope this helps!

    Marked as helpful

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 1st-party linked stylesheets, and styles within <style> tags.

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.

Oops! 😬

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

Log in with GitHub