Repository navigation
v0.6.0
BCFCODE Release v0.6.0
Release Date: July 12, 2025
We’re thrilled to announce BCFCODE v0.6.0, a dynamic update that elevates the dashboard experience with real-time user tracking, enhanced performance, and a polished UI. This release introduces online user indicators, a new pulse animation, optimized data fetching, and significant code cleanup, all while maintaining our commitment to a seamless and engaging platform for coding enthusiasts. Below, we outline the key features, improvements, and fixes in this release.
🚀 What's New
1. Online Users Tracking and Visualization
Introduced real-time tracking of online users with a dedicated OnlineUsers component:
- OnlineUsers Component: Added
OnlineUsers.tsx, which displays anAvatarGroupof online users with tooltips showing user names, supporting up to thousands of users with a+Xksurplus indicator. - Query Key Addition: Added
onlineUserstousersQueryKeysinReactQuery/queryKeys/users.tsfor efficient cache management. - Leaderboard Integration: Updated
LeaderboardHeaderto display online user counts and avatars, enhancing community visibility.
File Additions:
app/(dashboard)/components/OnlineUsers.tsx
File Changes:ReactQuery/queryKeys/users.tsapp/(dashboard)/leaderboard/UsersTable/Header.tsx
Impact: Enhances community engagement by showcasing active users in real-time, improving the leaderboard’s interactivity.
2. Pulse Animation for User Status
Added a visually appealing PulseAnimation component to indicate user activity status:
- Pulse Effect: Implemented
PulseAnimation.tsxwith a soft pulse animation using MUI’skeyframesandstyledcomponents, displaying a blurred, scaling ring effect (yellow-green by default) around user status text. - Dynamic Status Display: Integrated into
AvatarCellto show "Online" or "Last active" with a timestamp, with opacity and font weight adjustments based on idle status. - Conditional Rendering: Pulse effect is disabled for active users, ensuring a clean UI.
File Addition:
app/(dashboard)/animations/Pulse.tsx
File Change:app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/Avatar/index.tsx
Impact: Adds a modern, engaging visual cue for user activity, improving the dashboard’s aesthetic and usability.
3. Optimized Gauge Data Processing
Enhanced the gauge system with performance optimizations using useMemo:
- Memoized Calculations: Wrapped
countsandpercentscalculations inuseGaugeData.tswithuseMemoto prevent unnecessary recalculations, improving rendering performance. - Dependency Management: Ensured memoization dependencies (
list,label) are correctly specified for optimal performance.
File Change:
app/(dashboard)/Stats/hooks/useGaugeData.ts
Impact: Improves dashboard performance by reducing redundant computations, ensuring a smoother user experience.
4. Improved Leaderboard Data Management
Refined leaderboard data fetching and state management for better reliability and performance:
- Pagination Enhancements: Updated
usePaginationQuery.tswith a shorterstaleTime(10 minutes),refetchOnMount: "always", and a customretrylogic that retries only on network errors. - Error Handling: Improved error messages in
usePaginationQuery.tsto include specific error details. - List Sorting and Merging: Added
useMemoinBody.tsxto sort and merge Codewars challenge lists, ensuring no duplicates and maintaining descending order by completion date.
File Changes:
app/(dashboard)/leaderboard/UsersTable/Pagination/usePaginationQuery.tsapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/index.tsx
Impact: Enhances leaderboard reliability, reduces stale data, and improves data consistency.
5. Codewars Diamonds Collection Optimization
Optimized the CollectDiamonds component for better performance and maintainability:
- Dynamic Icon Import: Replaced static
DiamondIconimport withdynamicimport from@mui/icons-materialto reduce bundle size. - Callback Optimization: Refactored
handleCollectDiamondsinto auseCallbackhook to prevent unnecessary re-renders. - Service Modularization: Added
services/index.tsto centralizeCodewarsAPIServiceandDiamondsServiceinstances, improving code organization. - Simplified Logic: Removed redundant
setIsDiamondIconDisabledandcollectButtonDispatchcalls inuseEffectfor cleaner state management.
File Additions:
app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/services/index.ts
File Changes:app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/index.tsx
Impact: Improves performance of the diamonds collection feature and enhances code maintainability.
6. Code Cleanup and File Removal
Removed deprecated and unused files to reduce technical debt:
- Deleted Files:
useIdleActivity.tsx: Replaced by server-side idle tracking logic.IconButton/index.tsx,Tooltip/Tooltips.tsx,Tooltip/styles.ts,Tooltips.tsx,CollectButton/components/styles.ts: Removed unused tooltip and button components.
- Code Reorganization: Reordered imports in
SingleRow/index.tsxfor consistency and removed commented-out code inCollectButton/index.tsx.
File Deletions:
app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/Avatar/hooks/useIdleActivity.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/components/IconButton/index.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/components/Tooltip/Tooltips.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/components/Tooltip/styles.tsapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/components/Tooltips.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/components/styles.ts
File Changes:app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/SingleRow/index.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/CollapseButton/CodewarsTable/Body/CollectButton/index.tsx
Impact: Reduces codebase bloat, improving maintainability and build times.
7. Minor UI and Type Enhancements
Made small but impactful UI and type improvements:
- Codewars Stats Margin: Added
marginTop: 10toCodewarsStatsFallback.tsxfor better spacing. - Role Badge Fix: Updated
RoleBadge/index.tsxto conditionally render the tooltip title based onUserRole.SuperAdmin, preventing empty tooltips. - Type Updates: Aligned
types/codewars.tswithschemaby importingCodewarsUserand uncommentedUserRole.Userintypes/users.tsfor consistency. - Leaderboard Header Labels: Changed
Member SincetoSinceandLast LogintoLast ActivityinHeader.tsxfor clarity.
File Changes:
app/(dashboard)/components/CodewarsStatsFallback.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/Avatar/RoleBadge/index.tsxtypes/codewars.tstypes/users.tsapp/(dashboard)/leaderboard/UsersTable/Header.tsx
Impact: Improves UI consistency, type safety, and user clarity.
8. Dependency Updates
Updated dependencies to ensure compatibility, security, and performance:
- Key Updates:
eslint:9.28.0→9.30.1@typescript-eslint/*:8.33.1→8.36.0next:15.3.3→15.3.5axios:1.9.0→1.10.0cypress:14.4.1→14.5.1mongoose:8.15.1→8.16.2zod:3.25.56→3.25.76unrs-resolver:1.7.11→1.11.0prettier:3.4.2→3.5.3- New:
hasha@5.2.2(dependency forcypress)
- Removed Dependencies: Removed unused dependencies like
vite,rollup, andbrowserslistto streamline the project.
File Change: package-lock.json
Impact: Ensures a secure and modern development environment with reduced bundle size.
🐛 Bug Fixes
- Loading UI Simplification: Simplified loading condition in
LeaderBoard.tsxto avoid redundant checks. - Idle Status Cleanup: Removed unnecessary whitespace in
OnlineIndicator.tsxand redundantuseEffectlogic inCollectDiamonds/index.tsx. - Type Consistency: Fixed commented-out
UserRole.Userintypes/users.tsand alignedCodewarsUsertype with schema.
🛠️ Technical Improvements
- Type Safety: Enhanced
types/users.tswithIdleSnapshotDataintegration andtypes/codewars.tswith schema alignment. - Performance: Optimized
CollectDiamondswith dynamic imports anduseCallback, and improved gauge calculations withuseMemo. - Code Organization: Centralized services in
CollectButton/services/index.tsand reordered imports for consistency. - Documentation: Removed commented-out code and unused files to improve codebase clarity.
📝 Upgrade Guide
To upgrade to v0.6.0, follow these steps:
-
Update Dependencies:
- Run
npm installoryarn installto updatepackage-lock.jsondependencies. - Verify new dependency
hasha@5.2.2and updated packages (e.g.,eslint@9.30.1,next@15.3.5).
- Run
-
Integrate New Components:
- Add
OnlineUsers.tsxto leaderboard routes and passlistandtotalUsersprops. - Integrate
PulseAnimation.tsxinAvatarCellfor user status display.
- Add
-
Update Query Keys:
- Ensure
usersQueryKeysincludesonlineUsersfor cache management. - Verify
useOnlineUsersQueryintegration inLeaderboardHeader.
- Ensure
-
Test Online Tracking:
- Check online user avatars and surplus rendering in
OnlineUsers. - Verify pulse animation behavior for idle vs. active users.
- Check online user avatars and surplus rendering in
-
Remove Deprecated Files:
- Delete
useIdleActivity.tsx,IconButton/index.tsx,Tooltip/Tooltips.tsx,Tooltip/styles.ts,Tooltips.tsx, andCollectButton/components/styles.ts. - Update import paths for
CollectDiamondsandSingleRow.
- Delete
-
Review UI Changes:
- Check
CodewarsStatsFallbackmargin and leaderboard header labels. - Apply pulse animation styling and verify responsiveness.
- Check
🙌 Contributing
Thank you to the BCFCODE community for your invaluable feedback and support! Special thanks to contributors who tested the online user tracking and pulse animation features. Want to contribute? Join us on GitHub Discussions.
📬 Feedback
We love hearing from you! Share your thoughts, report bugs, or suggest features in our GitHub Issues or on the BCFCODE community on X.
🤝 Get Involved
BCFCODE is a thriving community for coding enthusiasts. Join us to code, collaborate, and grow together.
Ready to make an impact? Join BCFCODE and start coding!
Our Developers:
Team Members:
- Morteza Bakhshandeh
- Adib Khaki