Skip to content

feat: add bookmarking rooms functionality#808

Open
Cfla446 wants to merge 8 commits into
devfrom
709-Bookmark-Room
Open

feat: add bookmarking rooms functionality#808
Cfla446 wants to merge 8 commits into
devfrom
709-Bookmark-Room

Conversation

@Cfla446

@Cfla446 Cfla446 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

What

  1. Added room bookmarking functionality using persistent localStorage
  2. Added useBookmarks hook using useSyncExternalStore for reactive state sync (avoiding syncing local storage via useEffect)
  3. Updated individual room page UI with dynamic bookmark button/icon

Why

Bookmarks functionality was required to solve the issue of users wanting to find rooms they like or frequent quickly without having to search for it each time. Preferred rooms that are bookmarked are saved locally and can be retrieved or removed from localStorage.

How

Created useBookmarks hook using useSyncExternalStore (avoiding useEffect) to sync bookmark state of a room with localStorage. Bookmarks are treated as a JSONified array of room IDs, saved under the localStorage key 'bookmarks'.

The room page uses the useBookmarks hook to read the current bookmark state of the roomId, handling toggling of bookmarks (add/remove from array) on icon clicking (and updating visually), and persisting updates to localStorage.

Key checks:

  • 🚩Attached screenshot or recording of the changes in related tickets
  • Code comments where needed
  • No new warnings

Automated tests:

  • [] 🚩Unit tests added

Screenshot / Recording

image image image

@Cfla446 Cfla446 requested a review from a team as a code owner June 6, 2026 11:21
@Cfla446 Cfla446 linked an issue Jun 6, 2026 that may be closed by this pull request
@Cfla446 Cfla446 changed the title Add bookmarking rooms functionality feat: add bookmarking rooms functionality Jun 6, 2026
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.

STORY#1-2: Bookmark Room

1 participant