feat: floating quick-access toolbar for sync commands - #49
Open
swapnilsubhashpatil wants to merge 4 commits into
Open
feat: floating quick-access toolbar for sync commands#49swapnilsubhashpatil wants to merge 4 commits into
swapnilsubhashpatil wants to merge 4 commits into
Conversation
Add an optional floating toolbar: a draggable button on the right edge that expands into a menu of sync actions (Push, Pull, Fix paths, Reset). The enable toggle and per-action toggles react live, at least one action must stay enabled, and the toolbar is torn down on unload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #48
Summary
Adds an optional floating toolbar for quick access to the sync commands
without opening the command palette. It's a single draggable button pinned to
the right edge of the app that expands into a menu of sync actions.
Disabled by default — fully opt-in.
Screenshots
What it does
Floating toolbar) shows/hides it live, no reload needed.press without movement opens/closes the menu.
The button shows the sync icon when collapsed and a cross when open.
so it never runs off-screen.
Toolbar actionssub-group (shown onlywhen the toolbar is enabled). At least one action must stay enabled; default is
Push.
push/pull/fixDrivePath/resethelpers andno-op while a sync is in progress.
Implementation notes
--interactive-normal,--background-secondary,--background-modifier-border, etc.),setIconforLucide icons, and
aria-labeltooltips.addIcon('ogd-sync', …)— a Luciderefresh-cwscaled to Obsidian's icon grid, so it recolors with the theme.touch-action: none).listener detached) — no leaks.
Tests
tests/floating_toolbar.test.tscovering action selection (only enabledactions returned, in order; icon/label mapping; empty when all disabled),
matching the existing test style.
npm test→ all passing.npm run buildandnpm run lintclean.Docs
Changes
main.ts— setting + toolbar create/drag/toggle/teardown, per-action toggles,at-least-one enforcement
styles.css— toolbar stylestests/floating_toolbar.test.ts— action-selection testsREADME.md— docs