logseq/tldraw
Konstantinos caf1d9d1e3
Enhance: Left sidebar (#9880)
* wip: right sidebar

* fix: graph height

* re-enable scrolling on list

* style: indentation

* fix: always expand block when added to sidebar

* fix: show close button on mobile

* wip: right sidebar

* support default and custom icons

* fix whiteboard icon

* fix: header overflow

* remove unneeded dependency

* fix graph icon

* add middle click action and context menu

* add more context menu actions

* add reordering support

* fix dropdown visibility

* dnd fixes and initial state

* varous fixes

* fix event propagation

* enhance accesibility

* area expanded fix

* add translations

* refactoring

* enhance performance

* enhance text overflow

* fix page link

* drag enter fix

* add rounded corners and transition

* add keyboard shortcuts icon

* revert left sidebar change

* left sidebar bg and border

* various left sidebar enhancements

* alignment fixes

* split favorites and recents scrolling

* handle unavailable icon

* handle overflow edge case

* fix and refactor menu shortcuts

* handle zero items

* display nan shortcuts on mouse over

* min height fix

* min height fix

* simplify chevron icon

* minor fixes

* add flashcards shortcut

* revert initial sidebar state changes

* cloud icon fix

* fix border radius

* add missing go-home shortcut

* add clear recent button

* fix typo

* hide scrollbars

* remove transition

* fix: favorites

* fix: border and rounded corners

* fix: dnd delay

* Revert "add clear recent button"

This reverts commit d8c52c35f0.

* fix: keyboard shortcuts

* fix: shortcuts

* remove unused require
2023-08-16 23:39:29 +08:00
..
apps/tldraw-logseq Enhance: Left sidebar (#9880) 2023-08-16 23:39:29 +08:00
assets move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
cljs-demo fix: demo elements 2022-11-01 13:43:13 +02:00
demo move and refactor css files 2023-08-04 11:17:30 +08:00
packages altered hardcoded pressure values 2023-08-07 12:40:48 +08:00
.editorconfig Add editor config 2022-08-26 12:59:27 +03:00
.eslintignore move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
.eslintrc fix: scroll offset issue 2022-05-30 15:22:35 +08:00
.gitattributes move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
.gitignore move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
.npmignore move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
.prettierrc run prettier 2022-07-03 21:38:09 +08:00
LICENSE.md move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
README.md fix: readme typos (#7451) 2022-11-25 08:50:27 +08:00
package.json Fix `yarn install` on Windows 2023-05-04 13:51:17 +08:00
tsconfig.base.json fix: merge issue 2022-08-26 21:56:02 +08:00
tsconfig.json move tldraw/next inside of logseq 2022-05-16 19:55:07 +08:00
yarn.lock chore(deps): bump word-wrap from 1.2.3 to 1.2.5 in /tldraw (#9915) 2023-08-03 21:00:34 +08:00

README.md

Developer Notes

Background

This folder contains the JS codes for a custom build of Tldraw to fit the needs of Logseq, which originates from an abandoned next branch from the author of Tldraw.

Development

Prerequisites

Modern JS eco tools like Node.js and yarn.

Run in dev mode

  • install dependencies with yarn
  • run dev mode with yarn dev, which will start a Vite server at http://127.0.0.1:3031/

Note, the dev mode is a standalone web app running a demo Tldraw app in tldraw/demo/src/App.jsx. The Logseq component renderers and handlers are all mocked to make sure Tldraw only functions can be isolatedly developed.

Other useful commands

  • fixing styles: yarn fix:style
  • build: yarn build

How it works

Data flow between Tldraw & Logseq

The data flow between Tldraw & Logseq can be found here: https://whimsical.com/9sdt5j7MabK6DVrxgTZw25