Skip to content

Bookmark System Functionality#59

Merged
ovsky merged 7 commits into
devfrom
feature/bookmark-system-functionality
Dec 5, 2025
Merged

Bookmark System Functionality#59
ovsky merged 7 commits into
devfrom
feature/bookmark-system-functionality

Conversation

@ovsky
Copy link
Copy Markdown
Owner

@ovsky ovsky commented Dec 5, 2025

This pull request introduces bookmark management features to the browser, including a bookmark bar UI, bookmark storage, and integration between the frontend and backend. The changes add a new BookmarkStore system for storing bookmarks, update the UI to display and toggle bookmarks, and implement communication bridges between JavaScript and C++ for bookmark operations.

Bookmark System Implementation

  • Added new files BookmarkStore.h and BookmarkStore.cpp to implement a bookmark storage system that saves bookmarks as JSON and provides methods for adding, removing, updating, and querying bookmarks. [1] [2]
  • Integrated BookmarkStore into the UI initialization in UI.cpp to ensure bookmarks are loaded and available throughout the application. [1] [2]

Frontend Bookmark Bar and UI Enhancements

  • Implemented a bookmark bar in google-static.html with styles, dynamic bookmark rendering, and removal functionality. The bar updates based on stored bookmarks and interacts with backend via JS bridge functions. [1] [2]
  • Added bookmark toggle button (star icon) to the browser UI in ui.html, with visual state changes for bookmarked pages and keyboard accessibility. Updated CSS for coloring and highlighting the button. [1] [2] [3]

Backend/Frontend Bridge Functions

  • Added JavaScript bridge functions in Tab.cpp and Tab.h for bookmark operations: get bookmarks, add/remove bookmarks, check if a page is bookmarked, and toggle bookmark status. These are exposed to the frontend for direct interaction. [1] [2] [3]
  • Registered the bridge functions in UI.cpp and Tab.cpp to enable communication between the UI and backend logic. [1] [2]

UI Logic and State Synchronization

  • Added logic to update the bookmark button state based on whether the current page is bookmarked, ensuring UI reflects backend state and allowing users to toggle bookmarks with clicks or keyboard shortcuts. [1] [2]

ovsky added 7 commits December 5, 2025 22:38
Introduces BookmarkStore to the UI, initializes it, and exposes bookmark management callbacks to JavaScript. Updates the bookmark button state based on the active tab and tab URL changes, enabling add, remove, toggle, and update operations for bookmarks.
Introduces JavaScript bridge functions in Tab for bookmark management, including getting bookmarks, adding, removing, checking, and toggling bookmarks. Implements corresponding C++ methods and exposes them to the JS context for UI integration.
Introduces BookmarkStore class with methods to add, remove, update, and query bookmarks, storing them as JSON in a specified directory. Includes basic JSON serialization/deserialization, normalization of URLs, and support for bookmark bar items.
Included BookmarkStore.h and BookmarkStore.cpp in the SOURCES list to ensure they are compiled as part of the project.
Introduces a bookmark button next to the address bar, with visual states for bookmarked and unbookmarked pages. Includes SVG icons, CSS styling for state transitions, and JavaScript handlers for toggling and updating the bookmark state.
Introduces a bookmark bar at the top of the page with styles and JavaScript for displaying, removing, and managing bookmarks. The bar interacts with external bookmark functions and updates dynamically, enhancing user navigation and customization.
Adjusted the background color and border of the header for improved visual appearance and consistency.
@ovsky ovsky merged commit a5e0239 into dev Dec 5, 2025
7 checks passed
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.

1 participant