Update Highlights
- Smarter database requests - Instead of sending separate requests for each user one by one, they're now grouped into a single batch fetch. This reduces the overhead of repeated network/database round trips.
- Lazy loading for badges - This one has been in the to-do list for a while now, as I've noticed websites with large amounts of badges suffering from this.
Badges page:
The list of users who earned badges now only loads when clicked, and as you scroll down the pop-up, more content is loaded dynamically, making the page faster and easier to navigate.
After closing a pop-up, the list is destroyed to minimize nodes, while maintaining good performance.
Once a list of badges is fully loaded, meaning the scroll has reached the end, it will save the list temporarily in memory, so it wont fetch the same list again, in case you reopen it for that page visit.
- Better code organization - Organized files and created a “utils” file that holds common functions used throughout the site, making future updates simpler and more modular.
- Fresh new look for the Badges pop-up - The pop-up box on the Badges page has been redesigned for a cleaner, more user-friendly experience.
Download: GitHub
Live preview: Q2A Badges Live
