Feature/bookmarking system#1212
Conversation
|
@riyanshigupta890-cloud is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel. A member of the Team first needs to authorize it. |
komalharshita
left a comment
There was a problem hiding this comment.
Thank you for your contribution to DevPath and for the time and effort you've invested in implementing this feature!
I reviewed the PR, and the bookmarking functionality is a useful addition. However, I can't approve it in its current state for the following reasons:
Requested Changes
-
Resolve merge conflicts
- This PR currently has merge conflicts with the latest
mainbranch. Please rebase or merge the latest changes and resolve all conflicts before requesting another review.
- This PR currently has merge conflicts with the latest
-
Large changes require clearer explanation
- The implementation modifies multiple files, including core frontend logic (
script.js), styles, templates, and configuration. Please expand the PR description to explain:- Why each file needed to change.
- How the bookmarking flow works.
- Any design decisions made.
- The implementation modifies multiple files, including core frontend logic (
-
Unrelated configuration changes
- I noticed changes to
config/recommendation_weights.json. If these modifications are not required for the bookmarking feature, please remove them from this PR to keep the scope focused.
- I noticed changes to
-
Testing information
- Please include screenshots or a short demo GIF showing:
- Saving a project.
- Removing a bookmark.
- Persistence after page refresh.
- Behavior when no bookmarks exist.
- Please include screenshots or a short demo GIF showing:
-
Follow the GSSoC PR template
- Please ensure the PR description fully follows the project's GSSoC PR template, including implementation details, testing performed, and expected behavior.
Thank you again for contributing to DevPath! Once these items are addressed and the merge conflicts are resolved, I'd be happy to review the updated PR.
…#1087) Signed-off-by: Riyanshi Gupta <riyanshigupta890@gmail.com>
fcf2718 to
7fa920f
Compare
|
@komalharshita Ready for re-review!
All requested changes from previous review have been addressed. |
Summary
Implemented a client-side project bookmarking system that allows users to save favorite projects using localStorage. Users can click a "Save Project" button on project cards to bookmark them instantly. A "Saved Projects" panel displays all bookmarks and persists across browser sessions.
Why This Matters
Technical Implementation
Files Changed & Why
static/bookmarks.js(NEW FILE)DevPathBookmarksnamespacedevpathSavedProjects(compatible with existing code)static/bookmarks.css(NEW FILE)static/script.js(MODIFIED)buildProjectCard()function to include save buttonDevPathBookmarks.toggle(projectObj, saveBtn)templates/index.html(MODIFIED)<script src="/static/bookmarks.js">tag before main script.js (ensures DevPathBookmarks loads first)Bookmarking Flow Diagram
User Click "Save Project"
↓
toggleBookmark(projectId, projectTitle)
↓
Check if already saved via isBookmarked()
↓
Save to localStorage["devpathSavedProjects"] ← Persist data
↓
Update button UI (fill star icon) ← Visual feedback
↓
renderSavedProjectsPanel() ← Update panel immediately
↓
User sees project in "Saved Projects" panel
localStorage Data Structure
{ "devpathSavedProjects": { "1": { "id": 1, "title": "Personal Expense Tracker", "level": "Beginner", "time": "Low", "skills": ["Python"] }, "2": { "id": 2, "title": "Weather Dashboard", "level": "Beginner", "time": "Low", "skills": ["JavaScript", "HTML", "CSS"] } } }Design Decisions
Why localStorage?
Why separate bookmarks.js?
Why use existing storage key?
Testing Performed
Manual Tests ✅
Console Test Results ✅
Result: ✅ All tests passed, no errors
Screenshots
1. Save Button on Project Card
Shows the "Save Project" button on a project result card with outline star icon.
2. Saved Projects Panel with Bookmarks
Shows 2-3 projects listed in the "Saved Projects" panel below results with remove buttons.
3. Persistence After Page Refresh
After pressing F5, the same projects are still in the "Saved Projects" panel, proving localStorage persistence works.
4. Empty State (No Bookmarks)
After removing all bookmarks, the panel is hidden, showing proper empty state behavior.
5. Dark Mode Support
Same functionality in dark theme, showing CSS variables adapt properly.
Expected Behavior After Merge
✅ Every project result card displays a "Save Project" button
✅ Clicking saves project instantly to localStorage (no API call needed)
✅ "Saved Projects" panel appears below results when ≥1 project is bookmarked
✅ Panel is hidden when empty
✅ Bookmarks survive page refreshes and browser restarts
✅ Feature works across all browsers supporting localStorage (99%+ coverage)
✅ No performance impact (localStorage operations are instant)
✅ Fully responsive on mobile and desktop
✅ Works seamlessly with light and dark themes
How to Test This PR
git checkout feature/bookmarking-systempython src/app.pyBrowser Console Test
Open DevTools (F12) → Console and run:
Checklist