Submitted 7 days agoA solution to the Article preview component challenge
Article Preview Component Solution - Challenge #10
bem
P
@fraserjubb

Solution retrospective
What are you most proud of, and what would you do differently next time?
- This was my first time working on a JavaScript project that was not part of a video course where I follow tutorials. It felt good. I also gave myself an extension goal of making the share options disappear when either 1) The button is clicked again or 2) Anywhere else outside the share menu is clicked.
- I greatly improved my understanding of
stopPropagation()
and how it prevents the event from moving up the DOM tree to parent elements and triggering their event listeners. Particularly useful for pop-up menus (in this case it was the simple share menu). - This was also my first time using AI (ChatGPT) to assist when I was troubleshooting my code. I was careful to 1) Not include any actual code from my project and 2) Treat it similarly to MDN documentation where I try to break down the problem and understand it so I can then apply it to the code myself. I do not intend to have ChatGPT to write my code at any point (other than very basic boilerplates) or to read my own code as this could lead to problems - both in the code itself and its origin.
- In this project, I was having issues with my 'hidden' class when I moved it toward the top of the code. Ensuring Utility Classes are at the bottom of my CSS file (or for future projects, in a separate 'utilities' file that is loaded last) makes sure that it is not overwritten.
- This was my first time properly writing my own JavaScript code. How does it look?
- Any other feedback is welcome.
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Fraser Jubb's solution.
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