Skip to content

feat: project-wide bookmark manager with a -/bookmarks tab and home page section - #9863

Open
nishantmonu51 wants to merge 2 commits into
mainfrom
nishantmonu51/bookmarks-manager
Open

feat: project-wide bookmark manager with a -/bookmarks tab and home page section#9863
nishantmonu51 wants to merge 2 commits into
mainfrom
nishantmonu51/bookmarks-manager

Conversation

@nishantmonu51

Copy link
Copy Markdown
Collaborator

Bookmarks were only reachable from a single dashboard's dropdown, so there was no way to find a bookmark across dashboards or manage a long list of them. This adds a bookmark manager that follows the Dashboards listing UX.

  • The project home page gets a Bookmarks section under Dashboards: a 5-row preview, a sort dropdown in the heading (on its own bookmarks_sort URL param so it does not collide with the dashboards sort), and a "See all bookmarks" link. It is hidden for anonymous viewers of public projects.
  • A new -/bookmarks tab and page lists every bookmark the user can see across dashboards, with the shared table toolbar for search and sort.
  • Sort options: last used (tracked per browser, like dashboards), last updated, name and dashboard. Rows show the dashboard with its type badge, Managed / Home / Legacy chips, update and last-used times, and the description.
  • Clicking a row opens the bookmark on its dashboard. Owners and users with the manage bookmarks permission get hover actions to edit the name, description and category (BookmarkMetadataDialog) and to delete with a confirmation.
  • Backend: ListBookmarks now treats resource kind and name as optional filters, requires read access to the project, and returns rows ordered by name; UpdateBookmark bumps updated_on. Same response shape, so the existing dropdown callers are unchanged. Covered by admin/server/bookmarks_test.go.
  • All bookmark mutations invalidate every bookmark query so the dashboard dropdown and the manager stay in sync.
  • UrlParamsState.createStringParam is typed as non-nullable, which also removes pre-existing type errors in the dashboards listing.
  • Playwright coverage in web-admin/tests/bookmarks-manager.spec.ts; unit tests in bookmark-listing-utils.spec.ts.

Tags on bookmarks are a follow-up; the slot next to the sort dropdown is left for the tag filter.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Bookmarks were only reachable from a single dashboard's dropdown. This adds a
Bookmarks section on the project home page and a `-/bookmarks` tab that list
every bookmark the user can see across dashboards, with search, sorting and
open, edit and delete actions.

Backend:
- `ListBookmarks` treats resource kind and name as optional filters, so an
  empty request returns all bookmarks in the project visible to the caller.
- The handler now requires read access to the project and rejects a resource
  name without a kind.
- Rows are returned ordered by name, and `UpdateBookmark` bumps `updated_on`.

Frontend:
- Home page section mirrors the Dashboards section: 5-row preview, sort
  dropdown in the heading on its own `bookmarks_sort` URL param, and a
  "See all bookmarks" link. Hidden for anonymous viewers.
- New `-/bookmarks` page and tab with the shared table toolbar.
- Sort by last used (tracked per browser like dashboards), last updated, name
  or dashboard. Rows show dashboard, category chips, update and usage times.
- Owners and bookmark managers get hover edit (metadata dialog) and delete
  (with confirmation) actions.
- All bookmark mutations invalidate every bookmark query so the dropdown and
  the manager stay in sync.
- `UrlParamsState.createStringParam` is typed as non-nullable, which also
  removes pre-existing type errors in the dashboards listing.
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