Skip to content

feat: add weekly goal setter widget to [SYS_TARGETS] card (#113)#233

Open
manjiri27 wants to merge 1 commit into
codepvg:mainfrom
manjiri27:feature/personal-goal-setter
Open

feat: add weekly goal setter widget to [SYS_TARGETS] card (#113)#233
manjiri27 wants to merge 1 commit into
codepvg:mainfrom
manjiri27:feature/personal-goal-setter

Conversation

@manjiri27

Copy link
Copy Markdown
Contributor

Description

Adds a weekly goal-setting widget to the [SYS_TARGETS] card on the user profile page. Users can set a weekly problem-solving target (by difficulty: Total / Easy / Medium / Hard), track their progress via a retro terminal-style progress bar, and reset their goal at any time. Goals persist across sessions via localStorage and auto-reset every Monday.

Linked Issue

Fixes #113

Changes Made

Populated the empty [SYS_TARGETS] card in frontend/user.html with goal setter UI (metric selector, number input, [SET] button)
Added progress display view showing [=====>..........] X% bar, current count, and a celebration message on goal completion
Created frontend/js/user/goal-setter.js to handle all goal logic: save/load/reset via localStorage, weekly auto-reset every Monday, live solved count fetched from /api/user/:username

Type of Change

  • Bug fix
  • New feature
  • UI/Visual update
  • Documentation update
  • Refactor

Testing

  • Tested locally
  • Tested on mobile viewport (if applicable)
  • No console errors introduced

Checklist

  • My code follows the project's coding style
  • I have formatted my code locally by running npx prettier --write . before submitting
  • I am submitting my PR from a dedicated feature/* branch, not the main branch
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have updated documentation if required
  • I have linked the relevant issue

Screenshots / Screen Recording

Goal setter (no goal set):
image

Progress bar (after setting goal):
image

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for submitting a pull request.

Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully.

Formatting and Branching

  • Please confirm you have formatted your code locally using npx prettier --write ., or you can simply comment /format on this PR to have our bot do it for you!
  • Ensure this PR is made from a feature/* branch and not main.

Note: This project is currently maintained by a solo maintainer, so reviews and responses may sometimes take a little time. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Requesr : Personal Goal Setter

1 participant