Skip to content

Add Bookmarks / Save for Later feature - #98

Open
AbhishekAvasthi wants to merge 6 commits into
vicharanashala:mainfrom
AbhishekAvasthi:feature/bookmarks
Open

Add Bookmarks / Save for Later feature#98
AbhishekAvasthi wants to merge 6 commits into
vicharanashala:mainfrom
AbhishekAvasthi:feature/bookmarks

Conversation

@AbhishekAvasthi

Copy link
Copy Markdown

Lets learners save scenarios from the Scenario Browser and view them later in a new Saved tab. Adds a bookmarks collection and REST endpoints (list/add/remove) on the backend, and a bookmark toggle plus Browse/Saved tabs on the frontend, following the existing project conventions.

What changed

  • Backend: new bookmarks collection in db.json, listBookmarks/addBookmark/removeBookmark in store.js, and a new routes/bookmarks.js with GET/POST /api/bookmarks and DELETE /api/bookmarks/:id
  • Frontend: bookmark icon on each scenario card, and a Browse/Saved tab toggle in the sidebar (no router added — reuses the app's existing state-driven view pattern)
  • No auth exists in this app, so bookmarks are stored globally rather than per-user, consistent with the rest of the prototype

Testing

  • Verified all endpoints directly via curl (POST 201, GET 200, DELETE 204)
  • Verified in-browser: bookmarking updates the Saved count/icon immediately
  • Verified persistence across a hard refresh
  • Verified the Saved tab correctly filters to bookmarked scenarios only

See PRODUCT.md for a fuller write-up.

Lets learners save scenarios from the Scenario Browser and view them later in a new Saved tab. Adds a bookmarks collection and REST endpoints (list/add/remove) on the backend, and a bookmark toggle plus Browse/Saved tabs on the frontend, following the existing project conventions.
Improves the Saved tab empty state with an icon and Browse button, adds a Saved count to the hero stats, and shows a brief toast when a scenario is saved or removed.
Reuses the existing level/concept/search filters so they also narrow down the Saved tab, not just Browse.
Adds a second, more visible bookmark toggle next to the scenario title in the workspace panel, in sync with the sidebar icon.
Lets users attach a short personal note to each saved scenario, editable inline in the Saved tab. Adds a PATCH /api/bookmarks/:id endpoint and updateBookmarkNote in store.js.
Lets users attach a short personal note to each saved scenario, editable inline in the Saved tab. Adds a PATCH /api/bookmarks/:id endpoint and updateBookmarkNote in store.js.
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.

2 participants