Skip to content

Design bookmark search and filtering #15

Description

@DevOlabode

Current behavior

There is no search or filtering anywhere in Curate today:

  • GET /api/v1/bookmarks (controllers/api/bookmarks.js:list) returns every bookmark for the user, sorted by createdAt, with no query parameters.
  • GET /api/v1/collections (controllers/api/collections.js:list) is the same.
  • The popup (extension/popup/popup.js) renders whatever the API returns - no search box, no tag/category filter.

This is fine for a small library; it stops being fine once someone has a few hundred bookmarks.

This is a design issue - do not start implementation without agreement on scope

Define:

  • Search scope: title only, or title + URL + notes + tags? Client-side filtering of an already-fetched list, or a server-side query?
  • Filtering behavior: by tag, by category, by collection, some combination - and how those combine (AND vs OR)
  • Performance considerations: at what library size does client-side filtering (simplest) stop being acceptable, and does that ever realistically happen for a personal bookmark library? If server-side, what indexes does models/bookmark.js need?
  • UI placement: the popup is small and already has a composer, a collections section, and a bookmarks section - where does search fit without crowding it?
  • API implications: if server-side, what does the query parameter contract on GET /api/v1/bookmarks look like, and does it need pagination too?
  • Accessibility requirements: a search input needs a label, results need to be announced (e.g. aria-live) when they update from typing

Relevant files

  • controllers/api/bookmarks.js, routes/api/bookmarks.js
  • models/bookmark.js
  • extension/popup/popup.html, extension/popup/popup.js (renderBookmarkList)
  • docs/roadmap.md ("Considering" section already lists this)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextensionBrowser extension (popup, options, background)needs discussionDesign/approach must be agreed before implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions