Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive URL shortenning page uscing SCSS, Flex, Gulp, API

#fetch#gulp#sass/scss#node
anas aliā€¢ 415

@anas-cd

Desktop design screenshot for the URL shortening API landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


always appreciate feedback, would love to get some pointers on how to make professional code

Community feedback

P
Daveā€¢ 5,245

@dwhenson

Posted

Hey Anas - lovely work on this challenge - it is quite a tricky one!! šŸ™Œ

I would suggest the following improvements could be made to your JS;

  • I would include some input validation to check the value entered is a URL. At the moment I can try and enter other values and I don't get an indication that this isn't allowed - this will provide some quick and instant feedback to the user
  • On successful return of the API call, I would also suggest reverting the input to an empty state - just a nice thing to do for users
  • In the API call, I would include a catch statement to collect any errors - these can then be shown to the user. This is in case the URL submitted was in the proper format, but for some reason, the response didn't work out.

If you check the response in the dev tools you can see that the response from this API has some useful error messages that can be shown to the user.

Hope this helps a little!

Cheers Dave

Marked as helpful

0

anas aliā€¢ 415

@anas-cd

Posted

@dwhenson thanks a lot for these improvements, I will implement them

0

Please log in to post a comment

Log in with GitHub
Discord logo

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