anki/ts
Matthias Metelka f72570c604
Make tags editor resizable using Henrik's components (#2046)
* Make tags editor resizable using Henrik's components

All credit for the components goes to Henrik. I just tweaked the design a bit and implemented them in NoteEditor.

Co-Authored-By: Henrik Giesel <hengiesel@gmail.com>

* Remove PaneContent padding

Co-Authored-By: Henrik Giesel <hengiesel@gmail.com>

* Add responsive box-shadows on scroll/resize

only shown when content overflows in the respective direction.

* Remove comment

* Fix overflow calculations and shadow mix-up

This happened when I switched from using scrolledToX to overflowX booleans.

* Simplify overflow calculations

* Make drag handles 0 height/width

The remaining height requirement comes from a margin set on NoteEditor.

* Run eslint on components

* Split editor into three panes: Toolbar, Fields, Tags

* Remove upper split for now

to unblock 2.1.55 beta

* Move panes.scss to sass folder

* Use single type for resizable panes

* Implement collapsed state toggled with click on resizer

* Add button to uncollapse tags pane and focus input

* Add indicator for # of tags

* Use dbclick to prevent interference with resize state

* Add utility functions for expand/collapse

* Meddle around with types and formatting

* Fix collapsed state being forgotten on second browser open (dae)

* Fix typecheck (dae)

Our tooling generates .d.ts files from the Svelte files, but it doesn't
expect variables to be exported. By changing them into functions, they
get included in .bazel/bin/ts/components/Pane.svelte.d.ts

* Remove an unnecessary bridgeCommand (dae)

* Fix the bottom of tags getting cut off (dae)

Not sure why offsetHeight is inaccurate in this case.

* Add missing header (dae)

Co-authored-by: Henrik Giesel <hengiesel@gmail.com>
2022-09-28 14:02:32 +10:00
..
card-info Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
change-notetype Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
components Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
congrats Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
deck-options Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
domlib Refactor how toolbar buttons get to surround within editor fields (#1931) 2022-08-15 13:34:16 +10:00
editable Add option to shrink editor images by default (#2071) 2022-09-26 09:47:50 +10:00
editor Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
fields Add a flag to allow loading the fields dialog in a web view (#1706) 2022-03-03 22:45:26 +10:00
graphs Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
html-filter Preserve background-color when pasting external content in light mode 2022-08-19 12:31:26 +10:00
icons Add extra button group for cloze commands (#1756) 2022-03-31 13:30:00 +10:00
import-csv Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
lib Insert symbols overlay (#2051) 2022-09-10 18:46:59 +10:00
mathjax Use same config for editor and reviewer Mathjax (#1865) 2022-05-13 13:23:35 +10:00
patches Override older protobufjs pulled in via @bazel/typescript 2022-06-03 13:15:48 +10:00
reviewer Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
sql_format run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
svelte Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
sveltelib Fuzzy search in symbol insertion overlay (#2059) 2022-09-13 14:19:19 +10:00
tag-editor Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
.eslintrc.js Add option to shrink editor images by default (#2071) 2022-09-26 09:47:50 +10:00
.gitignore Update eslint to 4.22.0 2021-04-22 19:19:39 +02:00
BUILD.bazel Add extra button group for cloze commands (#1756) 2022-03-31 13:30:00 +10:00
compile_sass.bzl Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
copy.bzl include sourcemaps for pages/* in dev builds 2021-04-20 17:33:46 +10:00
esbuild.bzl Fix invisible tag input in Qt5 (thanks to Hikaru) 2022-04-05 09:53:36 +10:00
eslint.bzl Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
format.sh prettier: don't depend on system node being available 2021-11-25 07:14:15 +10:00
generate_page.bzl Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
jest.bzl Allow passing debug=True to jest_test for debugger support (#2013) 2022-08-16 10:55:16 +10:00
jest.config.js update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
licenses.json Fuzzy search in symbol insertion overlay (#2059) 2022-09-13 14:19:19 +10:00
page.html Load page script after body created (#1802) 2022-04-19 17:16:56 +10:00
prettier.bzl prettier: don't depend on system node being available 2021-11-25 07:14:15 +10:00
proto.bzl update to latest rules_nodejs & switch to ts_project 2021-10-01 12:52:53 +10:00
protobuf-no-long.js add a hack to avoid Long.js in Jest tests 2021-04-17 17:05:48 +10:00
protobuf.bzl Consider using --force-message for ts/protobuf.bzl (#1694) 2022-02-27 17:35:07 +10:00
README.md add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
tsconfig.json Use same config for editor and reviewer Mathjax (#1865) 2022-05-13 13:23:35 +10:00
typescript.bzl Refactor i18n (#1405) 2021-10-07 23:31:49 +10:00
update-licenses.sh fix update-licenses.sh 2021-12-03 20:35:53 +10:00
update.sh add add.sh helper for adding dependency and updating licenses 2020-12-31 12:20:51 +10:00
vendor.bzl copy_bootstrap_css/icons were unused 2022-01-15 20:35:11 +10:00
yarn.sh Replace individual d3 libraries with encompassing d3 2021-01-30 00:00:22 +01:00

Anki's TypeScript and Sass dependencies. Some TS/JS code is also stored separately in ../qt/aqt/data/web/.

To update all dependencies:

./update.sh

To add a new dev dependency, use something like:

./add.sh -D @rollup/plugin-alias