Repository navigation
v0.8.0
BCFCODE Release v0.8.0
Release Date: July 23, 2025
We’re thrilled to announce BCFCODE v0.8.0, a dazzling update that supercharges the dashboard with new cards, dynamic animations, and a refined user experience! This release introduces CodewarsCard and TargetCard, enhances the DiamondsCell with a loading animation, optimizes responsive layouts, and streamlines user validation flows. With centralized context providers, improved performance, and a polished UI that pairs perfectly with your Lucy-themed VS Code setup, this release makes your kata project shine brighter than ever. Below, we detail the key features, improvements, and fixes that make this version a game-changer for coding enthusiasts.
🚀 What's New
1. New CodewarsCard and TargetCard Components
Introduced two powerful dashboard cards to showcase Codewars progress and daily targets:
- CodewarsCard (
app/(dashboard)/components/Cards/CodewarsCard/index.tsx):- Displays total completed challenges with
SolvedCount, growth percentage withPercentVsLastDay, and a pie chart withCodewarsPieChart. - Uses
useCurrentUserQueryto fetch user data anduseMemoto computeranks(kyū distribution) andlastTwoDaysSolvedProblems. - Features a tooltip on the pie chart to clarify diamond challenge focus, styled with
KYU_COLORSfromtheme.tsand a clickable Codewars logo linking to the user’s profile. - Integrated into
page.tsxwith responsive grid sizing (xs: 24, sm: 24, md: 12, lg: 8).
- Displays total completed challenges with
- TargetCard (
app/(dashboard)/components/Cards/TargetCard/index.tsx):- Shows daily target metrics with
TargetInEachDay(animated withCountUp) andBottomInfo(displaying target titles). - Wraps content in
GaugeProviderfor context-driven styling, with responsivegaugeInnerTextSXandgaugeFooterTextSX. - Includes
DailyTargetwith hoverableTargetSelectorandTargetcomponents for interactive goal setting, enhanced withFadetransitions. - Integrated into
page.tsxwith full-width priority on smaller screens (xs: 24, sm: 24, md: 24, lg: 8).
- Shows daily target metrics with
File Additions:
app/(dashboard)/components/Cards/CodewarsCard/CodewarsPieChart.tsxapp/(dashboard)/components/Cards/CodewarsCard/PercentVsLastDay.tsxapp/(dashboard)/components/Cards/CodewarsCard/SolvedCount.tsxapp/(dashboard)/components/Cards/CodewarsCard/index.tsxapp/(dashboard)/components/Cards/TargetCard/BottomInfo.tsxapp/(dashboard)/components/Cards/TargetCard/TargetInEachDay.tsxapp/(dashboard)/components/Cards/TargetCard/index.tsx
File Moves:app/(dashboard)/Stats/DailyTarget/*→app/(dashboard)/components/Cards/TargetCard/DailyTarget/*
File Changes:app/(dashboard)/page.tsx
Impact: Elevates the dashboard with engaging, data-driven visualizations for Codewars progress and daily targets, enhancing user motivation and interaction.
2. Enhanced DiamondsCell with Loading Animation
Revamped the leaderboard’s DiamondsCell to include a dynamic loading state and animation:
- Loading State: Added
isLoadingstate withuseStateto track hover interactions, triggeringsetShowDiamondsCardonly whendiamondsSum > 0. - Wave Animation: Introduced a
wavekeyframe animation (opacity 1 to 0.5 to 1 over 500ms) for a “Loading...” indicator, usingTypographywithcounterStyles. - Conditional Rendering: Switches between the loading indicator and the
CountUp/DiamondIcondisplay based onisLoadinganddiamondsSum. - Hover Integration: Shows
DiamondsCardon hover with absolute positioning (right: -60, zIndex: 1), improving leaderboard interactivity. - Prop Update: Added
maxWidthprop toDiamondsCellfor better table alignment, passed viaCells/index.tsx.
File Changes:
app/(dashboard)/leaderboard/UsersTable/UserRow/Cells/DiamondsCell.tsxapp/(dashboard)/leaderboard/UsersTable/UserRow/Cells/index.tsxapp/(dashboard)/leaderboard/styles.ts
Impact: Adds a polished, interactive experience to the leaderboard, with clear feedback during data loading, aligning with the vibrant Lucy theme aesthetic.
3. Refined Responsive Dashboard Layout
Optimized the dashboard’s grid layout for seamless responsiveness:
- Dynamic Display: Updated
page.tsxto usedisplay: { xs: "flex", sm: "block", md: "flex" }forGridcomponents, ensuring proper stacking on small screens and centering on others. - Breakpoint Adjustments: Refined
sizeprops forTargetCard(xs: 24, sm: 24, md: 24, lg: 8) andDiamondsCard/CodewarsCard(xs: 24, sm: 24, md: 12, lg: 8) for balanced layouts. - Gauge Margins: Enhanced
SingleGauge.tsxwithusePathnameto conditionally apply negativemarginTopfor gauges (index > 1) only on the root path (/), with media queries (e.g.,-10pxat 200px,initialat 740px). - Pointer Events: Moved
pointerEvents: "none"tovalueTextandvalueArcinSingleGauge.tsxfor precise interaction control.
File Changes:
app/(dashboard)/page.tsxapp/(dashboard)/Stats/Gauges/GaugeView/SingleGauge.tsx
Impact: Creates a fluid, device-agnostic dashboard layout that enhances usability and visual appeal across screen sizes.
4. Streamlined User Validation Flow
Improved the Codewars reconnect process for a smoother user experience:
- ReconnectButton Enhancements (
Reconnect.tsx):- Replaced
LinkwithuseRouterfor programmatic navigation to/wars/validation/steps/1. - Added
disabledprop to prevent premature clicks, controlled byUserInfoCardstate. - Updated styling with
color: "error",px: 4,py: 1.5, andboxShadow: 3for a bold, clickable appearance.
- Replaced
- UserInfoCard Refactor (
UserInfoCard/index.tsx):- Split into
CodewarsInfoandInfocomponents for modular data display, with consistentTypographystyling. - Added
isMeandisDisabledstates to manage “That’s me”/“Not me” button logic, enabling/disablingReconnectButton. - Integrated
WarningMessagefor reconnect warnings, styled withwarning.mainand a centered⚠️ icon. - Moved
TipandReconnectButtonintoUserInfoCardfor a unified UI.
- Split into
- Message Removal: Commented out
Message.tsxand itsWarningcomponent, consolidating warnings intoUserInfoCardfor simplicity. - Step3 Updates: Simplified
UserInfoCardprops inSteps/3/index.tsxto pass explicit values (e.g.,codewarsUsername,codewarsHonor), improving type safety.
File Additions:
app/(dashboard)/wars/(codewars)/(user)/validation/steps/components/UserInfoCard/CodewarsInfo.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/components/UserInfoCard/Info.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/components/UserInfoCard/index.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/Reconnect/WarningMessage.tsx
File Deletions:app/(dashboard)/wars/(codewars)/(user)/validation/steps/components/UserInfoCard.tsx
File Changes:app/(dashboard)/wars/(codewars)/(user)/validation/steps/Reconnect/Buttons/Reconnect.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/Reconnect/Message.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/Reconnect/index.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/components/Steps/3/index.tsxapp/(dashboard)/wars/(codewars)/(user)/validation/steps/components/ui/LoadingPulseButton.tsx
Impact: Simplifies the reconnect process with clear feedback and modular components, enhancing user trust and interaction.
5. New EmailProvider for Context Management
Introduced a new context provider to streamline email prop passing:
- EmailProvider (
app/context/providers/EmailProvider.tsx):- Created
EmailContextto provideemailto components likeCodewarsCard, reducing prop drilling. - Used in
CodewarsCardto wrap content, ensuring consistent data access.
- Created
- Context Exports: Updated
contexts.tsto exportEmailContextandGaugeContextfor clarity and type safety.
File Additions:
app/context/providers/EmailProvider.tsx
File Changes:app/context/providers/contexts.ts
Impact: Improves code modularity and reduces repetitive prop passing, enhancing maintainability.
6. Dependency Addition: react-countup
Added react-countup for smooth number animations:
- New Dependency: Added
react-countup@6.5.3topackage.jsonand updatedpnpm-lock.yamlwithcountup.js@2.9.0. - Usage: Integrated in
DiamondsCell(CountUpfordiamondsSum),TargetInEachDay(CountUpforlabel), andPercentVsLastDayfor animated percentage displays.
File Changes:
package.jsonpnpm-lock.yaml
Impact: Enhances visual feedback with smooth number transitions, improving user engagement.
7. Code Organization and Cleanup
Streamlined the codebase for clarity and maintainability:
- File Renames: Moved
DiamondsPieChart,PercentVsLastWeek, andTotalDiamondsCounttoapp/(dashboard)/components/Cards/DiamondsCard/*, and renamedTotalDiamondsCounttoTotalValuefor clarity. - Component Removal: Commented out
DailyTargetinCodewarsStats/index.tsxandMessage.tsxinReconnect/index.tsx, pending future use. - Style Updates: Added
transition: 'opacity 1s ease'todiamondStylesandcounterStylesinleaderboard/styles.tsfor smooth visual effects. - Database Schema: Added
8: 0to diamond rank objects indb.tsanddata.tsto support 8 kyū challenges. - Commented Code: Removed unused
fontSizeproperties inuseGaugeDimensions.tsand commented-outGridsections inpage.tsxfor future cards.
File Moves:
app/(dashboard)/components/Card/*→app/(dashboard)/components/Cards/DiamondsCard/*
File Changes:app/(dashboard)/components/Cards/DiamondsCard/*app/(dashboard)/Stats/hooks/useGaugeDimensions.tsapp/seed/diamonds/data.tsapp/services/db.tsapp/components/CodewarsStats/index.tsx
Impact: Reduces technical debt, improves folder structure, and ensures schema consistency.
🐛 Bug Fixes
- DiamondsPieChart Index: Fixed rank indexing in
DiamondsPieChart.tsx(ranks[7 - i]instead ofranks[ranks.length - i]) for correct kyū mapping. - RoleBadge Styling: Replaced
royalGoldvariable with#FFD700inRoleBadgeandDiamondsPieChartfor consistent drop-shadow rendering. - Gauge Styling: Removed commented-out
backgroundColorandmaxHeightinSingleGauge.tsx, and cleaned unusedfontSizeinuseGaugeDimensions.ts. - Loading Height: Reduced
heightfrom100vhto70vhinloading.tsxfor better content visibility. - TargetSelector Icons: Increased icon sizes (
fontSize: 55inTargetSelector.tsx,fontSize: 110inTarget.tsx) and opacity (80%) for better visibility.
🛠️ Technical Improvements
- Performance: Increased
staleTimeto 1 minute inuseCurrentUserQuery.tsfor better caching, reducing redundant fetches. - Modularity: Exported
gaugeInnerTextSXBreakpointsandgaugeFooterTextSXBreakpointsinUserRow/index.tsxfor reuse inTargetCard. - Animation: Added
searchkeyframe animation inTargetInEachDay.tsxfor a dynamicSearchSharpIconon hover, enhancing interactivity. - Type Safety: Improved
UserInfoCardprops inSteps/3/index.tsxandReconnect/index.tsxwith explicit fields (e.g.,codewarsUsername), reducing reliance onsessionobject.
📝 Upgrade Guide
To upgrade to v0.8.0, follow these steps:
-
Update Dependencies:
- Run
pnpm installto includereact-countup@6.5.3and its transitive dependencies (countup.js@2.9.0). - Verify
package.jsonandpnpm-lock.yamlupdates.
- Run
-
Integrate New Cards:
- Add
CodewarsCardandTargetCardto dashboard routes withemail,label, andsxprops. - Ensure
CodewarsPieChart,PercentVsLastDay,SolvedCount,TargetInEachDay, andBottomInforeceive correct props.
- Add
-
Update DiamondsCell:
- Pass
maxWidthprop toDiamondsCellinCells/index.tsx. - Test hover interactions to verify loading animation and
DiamondsCarddisplay.
- Pass
-
Test Responsive Layout:
- Check
page.tsxgrid behavior across breakpoints (xs,sm,md,lg). - Verify
SingleGaugemargin adjustments on root path (/) and transitions.
- Check
-
Update Validation Flow:
- Replace
UserInfoCard.tsxwith newUserInfoCard/index.tsxand its subcomponents (CodewarsInfo,Info). - Test
ReconnectButtonwithdisabledprop anduseRouternavigation. - Remove references to
Message.tsxif unused.
- Replace
-
Verify Animations:
- Test
waveanimation inDiamondsCellandsearchanimation inTargetInEachDay. - Ensure
CountUpanimations render smoothly inDiamondsCell,TargetInEachDay, andPercentVsLastDay.
- Test
-
Update Database Schema:
- Add
8: 0to diamond rank objects indb.tsanddata.tsfor 8 kyū support. - Validate
calcDailySolvedProblemsGrowthinutils/dayjs.tsfor correct growth calculations.
- Add
-
Clean Up:
- Remove commented-out
DailyTargetinCodewarsStats/index.tsxandMessage.tsxinReconnect/index.tsxif not needed. - Delete old
UserInfoCard.tsxand update import paths for movedDiamondsCardcomponents.
- Remove commented-out
🙌 Contributing
A huge thank you to the BCFCODE community for your feedback and passion for coding katas! Special shoutout to contributors who helped shape the new cards and animations, making this release a true masterpiece. Want to join the fun? Dive into our 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 hub for coding enthusiasts. Join us to code, collaborate, and conquer katas together!
Ready to level up your coding game? Join BCFCODE and make your mark!
Our Developers:
Team Members:
- Morteza Bakhshandeh
- Adib Khaki