anki/ts/editor
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
..
editor-toolbar Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
image-overlay Add option to shrink editor images by default (#2071) 2022-09-26 09:47:50 +10:00
mathjax-overlay Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
plain-text-input Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
rich-text-input Revert "Fix/autofix empty div (#2066)" 2022-09-28 11:47:59 +10:00
symbols-overlay Fuzzy search in symbol insertion overlay (#2059) 2022-09-13 14:19:19 +10:00
base.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
BrowserEditor.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
BUILD.bazel Fuzzy search in symbol insertion overlay (#2059) 2022-09-13 14:19:19 +10:00
change-timer.ts Add ChangeTimer.prototype.fireImmediately 2021-09-16 14:47:05 +02:00
ClozeButtons.svelte Restrict cloze shortcut workaround to non-increment case 2022-09-26 11:22:00 +10:00
code-mirror.ts Disable auto-closing of HTML tags 2022-08-16 12:43:43 +10:00
CodeMirror.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
CollapseBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
DecoratedElements.svelte Fix infinite update loop in editor with invalid input HTML (#1761) 2022-03-31 11:17:13 +10:00
destroyable.ts Fix Cloze button (#1504) 2021-11-24 10:25:24 +10:00
DuplicateLink.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
EditingArea.svelte Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
editor-base.scss Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
EditorField.svelte Collapsible patch (#2052) 2022-09-14 15:26:07 +10:00
FieldDescription.svelte Fix sticky field labels - Make editor toolbar+tag editor non sticky in editor (#2058) 2022-09-12 19:22:22 +10:00
Fields.svelte Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
FieldState.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
FocusTrap.svelte Add some component comment (#1779) 2022-04-19 17:20:26 +10:00
FrameElement.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
HandleBackground.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
HandleControl.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
HandleLabel.svelte Use WithFloating for MathjaxOverlay (#2011) 2022-09-05 17:20:00 +10:00
helpers.ts Introduce setting to collapse field by default (#1990) 2022-08-31 23:34:39 +10:00
icons.ts Field redesign (#2002) 2022-08-19 10:02:28 +10:00
index_browser.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
index_creator.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
index_reviewer.ts Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
LabelContainer.svelte Fix sticky field labels - Make editor toolbar+tag editor non sticky in editor (#2058) 2022-09-12 19:22:22 +10:00
LabelName.svelte Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
legacy.scss Redesign deck options inputs (#2082) 2022-09-27 12:16:45 +10:00
MathjaxElement.svelte Fix infinite update loop in editor with invalid input HTML (#1761) 2022-03-31 11:17:13 +10:00
NoteCreator.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
NoteEditor.svelte Make tags editor resizable using Henrik's components (#2046) 2022-09-28 14:02:32 +10:00
Notification.svelte Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
old-editor-adapter.ts Plaintext import/export (#1850) 2022-06-01 20:26:16 +10:00
PlainTextBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
PreviewButton.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
ReviewerEditor.svelte Use eslint for sorting our imports (#1637) 2022-02-04 18:36:34 +10:00
RichTextBadge.svelte Introduce setting to collapse field by default (#1990) 2022-08-31 23:34:39 +10:00
StickyBadge.svelte Field redesign (#2002) 2022-08-19 10:02:28 +10:00
surround.ts Last polishes for Surrounder class (#2017) 2022-08-17 16:00:37 +10:00
tsconfig.json Insert symbols overlay (#2051) 2022-09-10 18:46:59 +10:00