Commit Graph

1283 Commits

Author SHA1 Message Date
scheinriese
33dcefaa06 Decompose customize dialog, fix reset conflict race, and auto-close popup
Extract key handler and conflict resolution logic from the ~390-line
customize-shortcut-dialog-inner into testable top-level defn- functions:
- customize-key-handler: key event state machine (~70 lines)
- compute-override-plan: pure conflict resolution for reassign
- compute-reset-plan: pure conflict resolution for reset-to-default
- matches-default-binding?: canonical default-binding comparison

Add persist-user-shortcuts-batch! to core.cljs to atomically persist
multiple binding changes in a single config read-modify-write cycle,
fixing a race condition where sequential persist-user-shortcut! calls
clobbered each other (config-handler/set-config! updates state async
via save-file! promise chain, so the second call reads stale data).

Fix reset-fn! to strip conflicting bindings before restoring defaults,
preventing error notifications from goog.ui.KeyboardShortcutHandler
duplicate key registration. Auto-close the customize popup 300ms after
reset so it doesn't float over a now-empty filtered list.

Clear user overrides (persist nil) when conflict stripping leaves a
binding that matches the action's default, so actions correctly
disappear from the "Custom" filter tab.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
ed0d6f0142 Address pr-review findings: accessibility, dead code, and consistency fixes
- Add ARIA live regions to feedback banners (role=alert/status)
- Add role=dialog and aria-label to customize popover
- Add aria-pressed to filter pill buttons
- Remove disabled rows from tab order
- Return focus to trigger on popover close
- Add shortcut-badge-in to prefers-reduced-motion
- Remove dead shortcut-conflicts-display component
- Replace js/console.warn with lambdaisland.glogi
- Merge duplicate cond branches in key handler
- Add missing :shortcut-id to left sidebar

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
3359396c3d Suppress shortcut actions on keymap settings page (animate-only mode)
When browsing Settings > Keymap, shortcut keypresses now trigger the
visual animation but skip action execution, preventing overlays like
the command palette from opening on top of the settings modal.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
82d699fc22 Fix plain key recording, conflict detection precision, and quote formatting
- Remove preventDefault from bubble-phase blocker so goog.events.KeyHandler
  can resolve character keys via keypress — fixes plain letter key recording
- Add handlers-co-active? predicate to distinguish editing-only vs
  non-editing-only handler groups, preventing false blocking conflicts
  between mutually exclusive runtime contexts
- Restrict cross-handler conflicts to exact key matches only — chord prefix
  matches (e.g., mod+c vs mod+c mod+s) live on separate handler instances
- Exclude internal-only :shortcut.handler/misc from conflict detection
- Quote each conflicting shortcut name individually in feedback banners

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
eb3c141f66 Fix conflict detection across global handler groups and binding comparison
- Add :group-global? true to get-conflicts-by-keys call so conflicts
  from other global handlers (undo, redo) are detected when recording
- Add canonicalize-binding utility for order-independent binding comparison
- Fix name-with-meta modifier order to produce canonical ctrl+alt+meta+shift
- Fix override-fn! to use canonicalized comparison when removing conflicting
  bindings, preventing silent failures from modifier order mismatches

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
88f16edf96 Simplify conflicts list rendering and keyname function
Flatten nested for-loops in conflicts list into a single binding form
and add missing React key on section elements. Simplify keyname to
single-arity by treating esc as a modifier-like key to always ignore.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
972cd1385c Address remaining should-fix items from pr-review
- Extract use-scoped-key-handler hook to deduplicate KeyHandler lifecycle
  boilerplate between filter and customize popovers
- Add bubble-phase event blocker to prevent modifier combos (Cmd+K, Cmd+C)
  from triggering global actions during shortcut recording
- Clamp global-listener-refcount to zero on cleanup for React strict mode
- Log shortcut-press animation errors instead of silently swallowing them
- Remove 5 orphaned i18n keys from old UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
a9478e7583 Polish keymap list rendering and filter inactive platform shortcuts
Replace old <code> tag shortcut rendering with proper shui/shortcut key
badges, add flex-wrap layout for multiple bindings, styled status labels
for "Custom:" and "Unset", and filter platform-inactive shortcuts from
the data layer to prevent empty rows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
def3dfb233 Implement V3 shortcut customization popover with two-tier conflict detection
Rewrite the shortcut customization UI from a modal dialog to an inline
popover with a state machine (idle → recording → accepted/conflict).
Add cross-context conflict awareness with amber warnings for non-blocking
conflicts across handler groups, while keeping red blocking conflicts for
same-context collisions. Redesign Esc/Backspace semantics for consistency:
Esc always closes, Backspace always removes. Add Radix tooltip on Reassign
button and polish spacing, animations, and feedback banners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
scheinriese
7f8c11680a Polish shortcut redesign: remove interactive prop, wire up press animations
- Remove unused `interactive?` prop from shortcut component and all call sites
- Trigger `shortcut-press!` animation when shortcuts are invoked
- Update shortcut settings UI to use `shui/shortcut` instead of raw `<code>` elements
- Fix shortcut key min-width (fit-content → 20px) for consistent sizing
- Pass raw-binding through `render-keyboard-shortcut` for data attribute matching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 20:45:58 +08:00
megayu
adbaf10abc chore: tech stack upgrade (#12448)
* fix(lint): make worker/frontend separation lint work on Windows

* chore: update cljs:electron-watch script to include test flag

* chore: remove dead root dependencies

* chore(deps): converge better-sqlite3 to 12.6.2 across deps packages

* chore(deps): converge fs-extra to ^11.3.0 across package roots

* fix(test): correct parameters for create-if-not-exists function

* chore(deps): converge cljs-bean to 1.9.0 across deps roots

* fix(tests): escape regex in cljs:run-test script

* chore: pin root packageManager to yarn 1.22.22

* chore(build): replace del with fs.rmSync in gulp clean

* chore(build): replace npm-run-all with npm-run-all2

* chore(security): upgrade dompurify and unify sanitizer path

* chore(observability): upgrade web sentry to 8.x

* chore: remove unused react-draggable dependencies

* chore(ci): fix windows release artifact collection

* fix(build): create static dir before gulp clean scans it

* fix: update nbb-logseq dependency to version feat-db-v33

* fix(test): move start-time initialization after clone repo

* fix(deps): update nbb dependencies and adjust test script paths to compatible with windows path delimiter

* chore(deps): remove dead meander dependency

---------

Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
2026-03-13 13:20:49 +08:00
Tienson Qin
daf7fc1475 enhance: p r to add emoji reaction 2026-02-12 23:03:28 +08:00
Tienson Qin
05be455371 feat: reactions 2026-02-01 21:45:31 +08:00
Gabriel Horner
d117bed029 chore: remove unused file graph tx-meta options 2026-01-22 13:19:58 -05:00
Gabriel Horner
a6c3569ea3 fix: remove most file-graph references from frontend and electron
- Remove references to old files under logseq/ e.g.
  logseq/version-files
- Remove flashcard commands and translations that applied to file graph flashcards
- Remove unused electron and frontend events
- Remove timetracking config which was for file graphs
2026-01-22 13:19:58 -05:00
Gabriel Horner
37af8f690e fix: remove remaining uses of file graph specific attributes
Removed all file graph uses of :block/namespace, :block/file, :block/type and
:block/properties except for graph-parser which still uses them for db
importer.
Removed all uses of :block/format except for graph-parser and
src/main/frontend
2026-01-22 13:19:58 -05:00
Gabriel Horner
6312f8236a fix: remove file graph :block/file and dependent code
Also remove all file graph references in publishing and
add back publishing.db tests with db graph.
Also remove file graph behavior for cmd-k and files
2026-01-22 13:19:57 -05:00
Tienson Qin
74d8308a62 chore: remove git commit command 2026-01-03 22:23:15 +08:00
Tienson Qin
15585f1481 mod+m to publish 2025-12-31 23:28:16 +08:00
Tienson Qin
bcc478b5f7 refactor: separate og and db version (#12276)
separate og and new version apps

remove file sync, tldraw, excalidraw and zotero
2025-12-29 15:39:32 +08:00
Tienson Qin
30068f882e chore: remove command fix broken graph 2025-12-16 08:24:33 +08:00
Tienson Qin
d867bf603a fix: don't delete asset file when deleting its block 2025-12-05 15:16:33 +08:00
Tienson Qin
de4c4bdcb5 fix(mobile): delete block doesn't focus on the prev one 2025-11-27 23:11:34 +08:00
Tienson Qin
900e845b92 fix: navigate back to previous route after deleting a page 2025-11-26 17:29:44 +08:00
Tienson Qin
085f9093c3 fix: use alt+shift+i for go/search-themes on windows/linux 2025-11-07 03:57:27 +08:00
Tienson Qin
75e49b22db Merge branch 'master' into refactor/plugin-api-properties 2025-10-20 18:27:21 +08:00
Gabriel Horner
b649887b15 enhance: add batch-import-edn op to make import-edn undo-able WIP 2025-10-16 09:43:32 -04:00
Tienson Qin
999618a406 refactor: compute pipeline tx-data before d/transact! 2025-10-15 15:31:42 +08:00
Tienson Qin
ff6f2ca754 fix: lint 2025-09-24 15:20:04 +08:00
Tienson Qin
c1b0c583e7 fix: reuse core.async promise-chan to await transact
Because the worker db may not be updated from thread-api calls.
2025-09-24 15:12:00 +08:00
Tienson Qin
98418bb57d fix: ensure ui db updated when remote transact promise returns 2025-09-24 13:57:46 +08:00
Tienson Qin
7a9fc2ccb7 remove ns frontend.db.transact 2025-09-23 20:44:18 +08:00
Tienson Qin
f137da94f6 fix: share text or picture doesn't work if the app has been closed 2025-09-09 14:15:52 +08:00
Tienson Qin
a64fae7c3a fix: circle dep 2025-09-08 15:02:44 +08:00
Tienson Qin
aba80a4564 enhance(ux): add hidden properties area in sidebar and main page 2025-09-07 18:40:22 +08:00
Tienson Qin
cee1572acd fix: posthog init 2025-09-02 18:58:50 +08:00
Gabriel Horner
0722097df1 enhance: export cmd reuses existing namespaces 2025-08-26 11:27:34 -04:00
Tienson Qin
3888559b9d fix: navigate to parent or home page after deleting focused node
fixes https://github.com/logseq/db-test/issues/435
2025-08-25 13:52:21 +08:00
Tienson Qin
78a054eec7 fix: posthog not defined in release mode 2025-08-05 20:08:42 +08:00
Tienson Qin
d84d3f9652 enhance(ux): set/unset #Page to convert between page and block (#11970)
* enhance(ux): add/remove #Page to toggle page/block

* enhance(ux): "p t" to set tags for selected blocks

Updated "p a" to toggle displaying all properties including hidden ones.

* feat: cmd+k move blocks

* fix: block could be converted to page and create invalid nodes

Pages with block namespace parents is nonsensical and pages in
property values led to multiple validation errors. Also guard
against class and property pages as namespace parents

* fix: warn on failed cut+paste or indent/outdent of page blocks. Better to warn than silent failure which leaves user confused on
what happened. 

---------

Co-authored-by: Gabriel Horner <gabriel@logseq.com>
2025-08-05 17:45:57 +08:00
Tienson Qin
5d7f56361a downgrade shadow-cljs 2025-07-23 14:36:38 +08:00
Tienson Qin
bf3af0fedd perf: skip refresh ui for embedding data transactions 2025-07-21 17:21:20 +08:00
Tienson Qin
2d50ca5ce2 Merge branch 'master' into feat/hnswlib+transformer-js 2025-07-11 18:15:33 +08:00
Gabriel Horner
101fa65012 fix: disable nonsensical things for publishing
Disable graph creation and more ways to alter blocks in publishing
2025-07-08 15:52:38 -04:00
Tienson Qin
122b6b7a45 Merge branch 'master' into feat/capacitor-new 2025-07-07 16:20:19 +08:00
Tienson Qin
e259be0c51 feat: quick add (#11986)
* feat: quick add

* enhance(ux): auto open block for editing for quick add

* enhance(ux): show notification after quick add

* add migration for quick add page
2025-07-07 16:18:53 +08:00
Tienson Qin
3c52bced5c Merge branch 'master' into feat/capacitor-new 2025-06-22 21:39:37 +08:00
Tienson Qin
5d6f5ad8dd fix: a few bugs on sentry 2025-06-19 14:33:22 +08:00
Tienson Qin
3b718f70c8 enhance(ux): render blocks by their orders (#11948)
* enhance: render nested children when rendering its parent

except that for long pages (500+ blocks).

* refactor: rename :block.temp/fully-loaded? to :block.temp/load-status

* fix: tests

* enhance: define keyword :block.temp/load-status

* update to :self

* chore: remove buggy parent cycle detect

* enhance(ux): don't delay rendering block properties

---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2025-06-17 19:41:13 +08:00
Tienson Qin
c74abbb7a3 Merge branch 'master' into feat/capacitor-new 2025-06-06 10:28:24 +08:00