Henrik Giesel
e805c45403
Explicitly not support dropleft/dropright
...
We'll deal with it when we have a use case
2021-09-09 15:38:09 +02:00
Henrik Giesel
f34112ee28
Correctly place dropdown and only update if there's activeInput
2021-09-09 15:38:09 +02:00
Henrik Giesel
b70124a1e6
Update to use shortened SCSS paths for some components
2021-09-09 15:38:05 +02:00
Henrik Giesel
3873c29022
Refer to ./ instead of components/ from within components
2021-09-09 15:38:04 +02:00
Henrik Giesel
e3fe65fc23
Fix ts/components:svelte_check
2021-09-09 15:38:03 +02:00
Henrik Giesel
5dc8224a1b
Add scrollbar_lib to components
2021-09-09 15:38:03 +02:00
Henrik Giesel
93ba4a2cd8
Implement nowrap mode
2021-09-09 15:38:01 +02:00
Henrik Giesel
bf6e587161
Implement TagWithTooltip
2021-09-09 15:38:00 +02:00
Henrik Giesel
9e91307c5d
Move WithTooltip to components
2021-09-09 15:38:00 +02:00
Henrik Giesel
a49fd5ab2a
Space out Sticky Bottom with Spacer component
2021-09-09 15:37:58 +02:00
Henrik Giesel
09f00a92aa
Position stickyBottom fixed
2021-09-09 15:37:56 +02:00
Henrik Giesel
37d30284fc
Improve positioning of tag editor badges
2021-09-09 15:37:56 +02:00
Henrik Giesel
5a41409f54
Do not open autocomplete on clicking input
2021-09-09 15:37:55 +02:00
Henrik Giesel
b91db34aec
Allow clicking on suggestion items
2021-09-09 15:37:54 +02:00
Henrik Giesel
e3be5972b8
Switch WithAutocomplete to WithDropdown and fix SelectedTagBadge
2021-09-09 15:37:53 +02:00
Henrik Giesel
a576228c08
Add SelectedTagBadge to offer context items for selected tags
2021-09-09 15:37:53 +02:00
Henrik Giesel
b178b86afd
Make automatic deselect when leaving tag editor
2021-09-09 15:37:52 +02:00
Henrik Giesel
8d8dd4fca0
Disable toggle on clicking element (toggle) for WithAutocomplete
2021-09-09 15:37:51 +02:00
Henrik Giesel
b6ffc4d071
Introduce AutocompleteItem
...
* needs too much custom styling / behavior to be done with DropdownItem
2021-09-09 15:37:50 +02:00
Henrik Giesel
d5eff3b75c
Don't allow Enter/Tab/Arrows for Autocomplete, if not active
...
Don't show Autocomplete, if there are no items available
2021-09-09 15:37:49 +02:00
Henrik Giesel
12a3d83d0a
Add some visual for TagAutocomplete
2021-09-09 15:37:39 +02:00
Henrik Giesel
a0c44f55db
Fix some WithDropdownMenu logic
2021-09-09 15:37:37 +02:00
Henrik Giesel
0d394814e7
Decouple TagInput from TagAutocomplete completely
2021-09-09 15:37:37 +02:00
Henrik Giesel
7b6f49577a
Add tabbable option to DropdownItem
2021-09-09 15:37:37 +02:00
Henrik Giesel
f52ad747cb
Fix issue with text showing below StickyBottom
2021-09-09 15:37:37 +02:00
Henrik Giesel
178062fc2d
Make styling of DropdownMenu easier by introducing dropdown-content
2021-09-09 15:37:36 +02:00
Henrik Giesel
a4f52f82d8
Delete when updating tagname to empty text
2021-09-09 15:37:35 +02:00
Henrik Giesel
6e563ddf49
Use our DropdownMenu component for TagAutocomplete
2021-09-09 15:37:34 +02:00
Henrik Giesel
eff5df2c69
Remove TagInputEdit and TagInputNew
2021-09-09 15:37:34 +02:00
Henrik Giesel
d89a6af45f
Port Focus tags shortcut to webview
2021-09-09 15:37:34 +02:00
Henrik Giesel
cecbafcec8
Create AddTagBadge component
2021-09-09 15:37:33 +02:00
Henrik Giesel
4aaba0875f
Enable tag delete icon
2021-09-09 15:37:33 +02:00
Henrik Giesel
7f6e7235f1
Display a tag-outline icon in the bottom left
2021-09-09 15:37:33 +02:00
Henrik Giesel
9919cf2b47
Add Tag DeleteIcon
2021-09-09 15:37:33 +02:00
Henrik Giesel
37fdefaf40
Mount TagEditor
2021-09-09 15:37:33 +02:00
Henrik Giesel
90dc1a0b40
Fix Float buttons in rtl
2021-09-06 21:15:37 +10:00
Henrik Giesel
b7ca721a2c
Have a uniform border-radius for buttons and fields
2021-09-06 21:15:37 +10:00
Henrik Giesel
abf0eb1c16
Fix automatic positioning of ButtonDropdown after changing float property
2021-09-06 21:15:37 +10:00
Henrik Giesel
620f9cb765
Introduce WithImageConstrained
2021-09-06 21:15:37 +10:00
Henrik Giesel
796037649a
Better RTL support
2021-09-06 21:15:36 +10:00
Henrik Giesel
1f34b666b9
Uniformly shorten SCSS imports/uses
2021-09-02 23:37:17 +02:00
Henrik Giesel
8335f81396
Use event object in createShortcut, fix F8 for highlight
2021-07-26 06:15:30 +02:00
Damien Elmes
5255409093
refactor protobuf handling for split/import
...
In order to split backend.proto into a more manageable size, the protobuf
handling needed to be updated. This took more time than I would have
liked, as each language handles protobuf differently:
- The Python Protobuf code ignores "package" directives, and relies
solely on how the files are laid out on disk. While it would have been
nice to keep the generated files in a private subpackage, Protobuf gets
confused if the files are located in a location that does not match
their original .proto layout, so the old approach of storing them in
_backend/ will not work. They now clutter up pylib/anki instead. I'm
rather annoyed by that, but alternatives seem to be having to add an extra
level to the Protobuf path, making the other languages suffer, or trying
to hack around the issue by munging sys.modules.
- Protobufjs fails to expose packages if they don't start with a capital
letter, despite the fact that lowercase packages are the norm in most
languages :-( This required a patch to fix.
- Rust was the easiest, as Prost is relatively straightforward compared
to Google's tools.
The Protobuf files are now stored in /proto/anki, with a separate package
for each file. I've split backend.proto into a few files as a test, but
the majority of that work is still to come.
The Python Protobuf building is a bit of a hack at the moment, hard-coding
"proto" as the top level folder, but it seems to get the job done for now.
Also changed the workspace name, as there seems to be a number of Bazel
repos moving away from the more awkward reverse DNS naming style.
2021-07-10 19:17:05 +10:00
Henrik Giesel
fb3545545c
disabledKey => fieldFocusedKey
2021-07-05 18:15:03 +02:00
Henrik Giesel
57fe9f91c2
Fix issues with sometimes cause assignment of wrong position value
2021-07-05 17:17:58 +02:00
Henrik Giesel
db4cbfcb26
More uniform file naming
...
kebap-case for .ts, .scss, .html, and directories
2021-07-01 12:24:16 +02:00
Henrik Giesel
27335e1d33
Refactor WithDropdown to be more versatile and cause less bugs
2021-06-30 14:01:33 +02:00
Henrik Giesel
69ec04190c
Make gear button show dropdown menu
2021-06-21 20:24:15 +02:00
Henrik Giesel
ad6577d88c
Revert button with gear icon, that shows revert dropdown item
2021-06-21 19:11:10 +02:00
Henrik Giesel
2d3f967899
Disable RevertButton tooltip on touch devices
...
The tooltip will show after you clicked Revert. There's no sensible way
to show the tooltip, without also triggering the functionality
2021-06-21 17:02:48 +02:00
Henrik Giesel
73e66d6dd0
Add down-arrow SASS function
2021-06-21 17:02:48 +02:00
Henrik Giesel
6462643328
Use custom down arrow for both SelectButton and EnumSelector
2021-06-21 17:02:48 +02:00
Henrik Giesel
191684c1b0
Rename SectionItem to just Item and use across option sections
2021-06-21 17:02:46 +02:00
Henrik Giesel
0e0bdccba7
Add Container.svelte
2021-06-21 17:01:45 +02:00
Henrik Giesel
cb14011410
Use Bootstrap containers instead of CSS in base for deckoptions
2021-06-21 17:01:44 +02:00
Henrik Giesel
d2360869b3
Add Section and SectionItem for the deckoptions
2021-06-21 17:01:44 +02:00
Henrik Giesel
0061d61db5
Generalize ButtonToolbarItem to SectionItem
2021-06-21 17:01:42 +02:00
Henrik Giesel
dee7be2323
Disable FormatBlock buttons for Codable
2021-06-18 01:17:43 +02:00
Henrik Giesel
dd1344d7f0
Disable Bold button in Codable
2021-06-18 00:27:07 +02:00
Henrik Giesel
ecc8fed5a9
Change default icon size of IconButtons
2021-05-31 00:31:10 +02:00
Henrik Giesel
973cd59b29
Make ColorPicker buttons halfwidth
2021-05-31 00:17:06 +02:00
Henrik Giesel
6d72e7bc49
Implement new ColorPicker
2021-05-30 22:58:40 +02:00
Henrik Giesel
dcdca0ac7a
Implement new way to way to display icons in IconButtons
...
* allows for multiple icons overlay
* allows to make individual icons smaller/bigger
2021-05-30 21:05:16 +02:00
Henrik Giesel
1caf7ada72
Add overflow-x: hidden for SelectButton
2021-05-28 21:33:34 +02:00
Henrik Giesel
054f96b726
Uniformly use variables to Button{Toolbar,Group} for setting button properties
...
Instead of using WithTheming around ButtonToolbar/ButtonGroup
2021-05-27 17:13:36 +02:00
Damien Elmes
3489257f41
update ts deps
...
- prettier's formatting has changed, so files needed to be reformatted
- dart is spitting out deprecation warnings like:
254 │ 2: $spacer / 2,
│ ^^^^^^^^^^^
╵
bazel-out/darwin-fastbuild/bin/ts/sass/bootstrap/_variables.scss 254:6 @import
ts/sass/button_mixins.scss 2:9 @use
ts/components/ColorPicker.svelte 2:5 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($grid-gutter-width, 2)
2021-05-26 09:37:40 +10:00
Henrik Giesel
9e02d3a92c
Use TextInputModal directly from svelte component
...
* the only important thing is that it is not positioned within elements
with display: none
* I think we can treat the existence of the modal to be a kind of
"precondition" that has to be met for the component to be used
2021-05-26 08:46:12 +10:00
Henrik Giesel
1647538d63
Fix background on DropdownItem + make transitions on buttons quicker
2021-05-24 19:53:30 +02:00
Henrik Giesel
6f31ab5990
Prefer event.which over event.{key,code}
...
It works better with alternative Latin-based keyboard layouts
2021-05-22 17:50:23 +02:00
Henrik Giesel
5cbda88605
Base shortcuts with letters no event.key, with symbols/numbers on event.code
2021-05-21 22:45:55 +02:00
Henrik Giesel
abf1418695
Switch to keyboard shortcuts based on event.key
2021-05-20 18:28:59 +02:00
Damien Elmes
3f232b6ba1
make sticky bar border a bit fainter
2021-05-20 12:49:07 +10:00
Damien Elmes
2ecd91eeb2
fix invisible dropdown arrow in night mode; use bootstrap styling in top
2021-05-20 12:43:47 +10:00
Damien Elmes
5c9f483cdc
move deck name into window title; v-center sticky bar
2021-05-19 19:34:15 +10:00
Damien Elmes
f93075628a
increase toolbar size by 5px and use the default font sizes
...
Workaround for #1174 for now
2021-05-19 19:23:32 +10:00
Henrik Giesel
a602561612
Make SaveButton functional
2021-05-18 18:55:22 +02:00
Henrik Giesel
1582bdb31e
Make styling on select button behave correctly
2021-05-18 17:50:18 +02:00
Henrik Giesel
30d246d74b
WIP: Use our components in deckoptions sticky bar
2021-05-18 16:32:29 +02:00
Henrik Giesel
755b39b59e
Check for id when inserting dynamic elements
...
* I'm not sure it behaved, if there were multiple elements
inserted by different add-ons into the same container
2021-05-07 16:50:17 +02:00
Henrik Giesel
c894d32c14
Fix remaining errors in editor/*.svelte files
2021-05-07 15:10:28 +02:00
Henrik Giesel
9379477e09
Use MouseEvent instead of KeyboardEvent in WithShortcut
...
* otherwise the disabled button will allow it to pass through
2021-05-07 14:46:08 +02:00
Henrik Giesel
3d4224a886
Rename Detachable.detach to detached
2021-05-07 14:31:08 +02:00
Henrik Giesel
bb2fb8e9f5
Fix ButtonDropdown
2021-05-07 02:04:44 +02:00
Henrik Giesel
0a979d789a
Make LabelButtons support active notion
2021-05-07 02:04:44 +02:00
Henrik Giesel
95b6b386dc
Only initialize extension apis if necessary
2021-05-07 02:04:44 +02:00
Henrik Giesel
d92a0c44c7
Add lefttopbtns as AddonButtons
2021-05-07 02:04:44 +02:00
Henrik Giesel
d3bec1a584
Add ButtonToolbarItem as interface for modifying button groups
2021-05-07 02:04:44 +02:00
Henrik Giesel
55e8256f0e
Clean up ButtonGroup and factor out extension logic
2021-05-07 02:04:44 +02:00
Henrik Giesel
dd99524ae0
Enable setting of PreviewButton and hiding of cloze button again
2021-05-07 02:04:42 +02:00
Henrik Giesel
0612c3428b
Fix typing issues
2021-05-07 02:03:55 +02:00
Henrik Giesel
74dad42df3
Use ButtonGroupItem for all buttons in editor
2021-05-07 02:03:55 +02:00
Henrik Giesel
68339ab0b0
Set ButtonPosition via ButtonGroupItem
2021-05-07 02:03:55 +02:00
Henrik Giesel
f724b45ae1
Add hiding functionality in ButtonGroup
2021-05-07 02:03:55 +02:00
Henrik Giesel
da5756822f
Add API for adding new buttons, updating existing ones in ButtonGroup
2021-05-07 02:03:55 +02:00
Henrik Giesel
5f8f4c06f8
Fix issue with dropdowns
2021-05-07 02:03:55 +02:00
Henrik Giesel
deafb0925c
Add .dropdown-menu class to DropdownMenu
2021-05-07 02:03:55 +02:00
Henrik Giesel
099325f407
Add back ColorButtons
2021-05-07 02:03:55 +02:00
Henrik Giesel
af7b1f7d7f
Activate FormatBlockButtons
2021-05-07 02:03:55 +02:00
Henrik Giesel
e7706bac6d
Refactor {CommandIcon,Icon,Square}Button into IconButton and WithState
2021-05-07 02:03:55 +02:00
Henrik Giesel
76ea48fade
Make StickyBar flex
2021-05-07 02:03:55 +02:00
Henrik Giesel
45c52f75aa
Translate ts files in ts/editor to svelte files
2021-05-07 02:03:55 +02:00
Henrik Giesel
8238ec5727
Rename editor-toolbar to components
2021-05-07 02:03:55 +02:00