Skip to content

Add/Edit Bookmark Dialog - #278

Open
F3l1x1vo wants to merge 61 commits into
mainfrom
feat/app-bookmark-dialog
Open

F3l1x1vo wants to merge 61 commits into
mainfrom
feat/app-bookmark-dialog

Conversation

@F3l1x1vo

@F3l1x1vo F3l1x1vo commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

This PR adds a bookmark modal for adding and editing bookmarks. Currently, they are saved in localStorage (not a database like we hoped. The database is a v1 feature of the S3 Storage Browser and not yet available on the parent branch). Migrating these bookmarks to the database is an issue for later (#277).

The bookmarks are currently shown in a section on the dashboard but we will change the display of these as well (#271)


Closes #270 #271 #275

@F3l1x1vo
F3l1x1vo requested a review from dklOrdix July 31, 2026 07:26
@F3l1x1vo F3l1x1vo self-assigned this Jul 31, 2026
@F3l1x1vo
F3l1x1vo changed the base branch from feat/iframe-modularization to main July 31, 2026 08:11
@F3l1x1vo
F3l1x1vo force-pushed the feat/app-bookmark-dialog branch from c622e28 to fbfa6e6 Compare July 31, 2026 08:17
@F3l1x1vo
F3l1x1vo force-pushed the feat/app-bookmark-dialog branch from 286a34a to 7a7d76c Compare September 2, 2026 05:23
@stackable-cla

stackable-cla Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@Bohreromir
Bohreromir self-requested a review September 11, 2026 07:41

@Bohreromir Bohreromir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless I do miss something the whole PinForEveryone does not work as its only stored in LocalStorage. Opa could then be removed too.

I havent yet read the whole thing, but I think this is enough for the meantime.

Feel free to ask for any clarifications.

Comment thread src/lib/components/layout/sidebar/Sidebar.svelte Outdated
Comment thread vite.config.ts
Comment thread .env.example
Comment thread .env.example Outdated
Comment thread src/lib/dashboard/bookmarks.svelte.ts Outdated
Comment thread src/routes/(app)/+page.svelte Outdated
Comment thread src/routes/(app)/+page.svelte Outdated
Comment thread src/lib/components/dashboard/AddBookmarkModal.svelte
Comment thread src/lib/components/dashboard/AddBookmarkModal.svelte Outdated
Comment thread src/lib/components/dashboard/AddBookmarkModal.svelte
@Bohreromir Bohreromir mentioned this pull request Sep 11, 2026
7 of 17 tasks
F3l1x1vo added a commit that referenced this pull request Sep 14, 2026
F3l1x1vo added a commit that referenced this pull request Sep 14, 2026
F3l1x1vo added a commit that referenced this pull request Sep 14, 2026
F3l1x1vo added a commit that referenced this pull request Sep 14, 2026
Comment thread src/lib/components/layout/sidebar/Sidebar.svelte Outdated
Comment thread src/app.d.ts Outdated
pinned,
// Only admins can set the "pin for everyone" flag; non-admins keep the
// existing value (e.g. when editing a bookmark pinned by an admin).
pinnedForEveryone: isAdmin ? pinnedForEveryone : (bookmark?.pinnedForEveryone ?? false)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I didn't knew that. So the way is forward is: merge this and s3-file-browser, then create a new pr in which its saved to the db?

Do we have an Issue for that?

Comment thread src/lib/server/opa.ts Outdated
Comment thread src/routes/(app)/+page.svelte Outdated
Comment thread src/lib/server/feature-flags.ts Outdated
Comment thread src/lib/components/dashboard/AddBookmarkModal.svelte Outdated
Comment thread src/routes/(app)/+page.svelte Outdated
Comment thread src/lib/dashboard/bookmarks.svelte.ts Outdated
Comment thread e2e/support/start-mock-opa.ts Outdated
@F3l1x1vo

Copy link
Copy Markdown
Collaborator Author

@Bohreromir #278 (comment)

I had hoped that the v1 PR (#208) would be merged already when this PR was ready for review. Thus we can either merge both and add a new issue or wait on the other PR to be merged since #275 speaks of a database being used. I would just wait on the other PR since this bookmark feature is not time sensitive.

F3l1x1vo added a commit that referenced this pull request Sep 14, 2026

@Bohreromir Bohreromir left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nearly done ;)

Comment thread src/lib/dashboard/types.ts Outdated
Comment thread .env.example Outdated
F3l1x1vo added a commit that referenced this pull request Sep 15, 2026
F3l1x1vo added a commit that referenced this pull request Sep 16, 2026
F3l1x1vo added a commit that referenced this pull request Sep 17, 2026
F3l1x1vo added a commit that referenced this pull request Sep 17, 2026
Comment thread src/lib/server/opa.ts Outdated
Comment thread e2e/support/start-mock-opa.ts Outdated
Comment thread .env.example Outdated
Comment thread src/lib/dashboard/types.ts Outdated
- add ProductIcon component; logo fallback via component state
- per-product badge text colour for WCAG AA contrast, guarded by a unit
test
- validate stored bookmarks per entry so one bad entry does not wipe all
- show name/URL errors on submit and URL blur instead of a silently
disabled button
- prefill the default product name; refill it after the name is cleared
- hide the duplicate dashboard icon link from assistive technology
- guard localStorage writes; reuse action_close instead of button_close
@Bohreromir
Bohreromir force-pushed the feat/app-bookmark-dialog branch from c46ebae to f4802ba Compare October 19, 2026 14:18
@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 64.84% 8688 / 13399
🔵 Statements 63.94% 11689 / 18281
🔵 Functions 66.16% 2783 / 4206
🔵 Branches 55.04% 4989 / 9064
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/client/local-storage.ts 88.23% 80% 100% 100% 9, 25
src/lib/components/dashboard/AddBookmarkModal.svelte 95.23% 81.13% 94.33% 97.01% 113, 180, 179, 247-250, 246, 190, 270
src/lib/components/dashboard/ProductIcon.svelte 100% 100% 100% 100%
src/lib/components/layout/NavigationProgress.svelte 0% 0% 0% 0% 8-38
src/lib/components/layout/sidebar/Sidebar.svelte 0% 0% 0% 0% 115-285
src/lib/components/layout/sidebar/nav-items.ts 0% 0% 0% 0% 14-42
src/lib/components/storage/explorer/FolderRow.svelte 71.6% 54.28% 78.94% 63.82% 35, 42-69
src/lib/components/storage/explorer/ObjectTable.svelte 52% 34.25% 66.66% 42.13% 22-23, 25, 55-58, 75-200, 288-291, 314
src/lib/dashboard/bookmarks.svelte.ts 40% 41.66% 40% 45.45% 34-53
src/lib/dashboard/products.ts 53.33% 100% 41.66% 50% 67-133
src/lib/dashboard/types.ts 100% 100% 100% 100%
src/lib/storage/bookmarks.svelte.ts 73.07% 53.44% 76.19% 84.33% 18, 53, 71, 101, 103, 111, 112, 119, 121, 123, 129, 143, 144, 147, 150-155, 159, 162-167
src/lib/storage/persistence.ts 100% 100% 100% 100%
src/routes/(app)/+page.svelte 34.45% 15.38% 33.33% 35.08% 18-24, 28, 51-52, 50, 58, 15-120
Generated in workflow #1116 for commit 5872e60 by the Vitest Coverage Report Action

Every write stores the whole list, so a tab with a stale list overwrote
bookmarks saved in another tab. Reload the list on storage events.
Move loadFromStorage/persistToStorage to $lib/client so the dashboard
bookmark store reuses them instead of duplicating them.
Unrelated to bookmarks; deriving the better-auth baseURL from the request host in dev is out of scope here.
wasOpen no longer needs to be reactive, and the bookmark is read untracked, so the effect depends on open only.
The form is initialised on every open, so resetting it before closing is not needed. The preview guard was always true and getDefaultName() only wrapped selectedProduct.defaultName.
Modal already applies the modal class, and the close button now sets open = false instead of relying on a method="dialog" form.
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.

Main Navigation Bookmarks and Pinning OPA Interface Dashboard showing External Services Dialog for adding external Services to the UI

3 participants