Commit graph

9657 commits

Author SHA1 Message Date
Matthias Metelka
bbab485373
Merge branch 'main' into color-palette 2022-09-04 15:51:55 +02:00
Matthias Metelka
35650e0f69 Adjust gray tones 2022-09-03 14:44:07 +02:00
Matthias Metelka
2d1849549b Dark theme: use less saturated flag colors 2022-09-03 10:25:12 +02:00
Matthias Metelka
e2193950a9
Add animation toggle to preferences (#2041)
* Add animation toggle to preferences

and move settings affecting appearance together.

* Add class to body if animations unchecked

* Fix formatting in preferences.ftl

* Update duration(height) function for Collapsible transition

and add explanation.

* Fix formatting

* Increase duration baseline to 10 and decrease factor to 20

* Restore initial layout and rename option to "Reduce motion"

* Move checkboxes together and fix tab order (dae)

+ Remove separation of UI size
2022-09-03 12:14:47 +10:00
RumovZ
1f8189fe91
Some import/export features and fixes (#2038)
* Keep filtered decks when importing apkg

If all original decks exist and scheduling is included.

* Create missing decks from csv

* Export original decks if with_scheduling

* Also remap original deck ids on import

* Update imported filtered decks

* Fix meta column being mapped to tags

* Fix ids in csv deck and notetype columns

Note: This implies names which parse to an i64 will be seen as ids,
likely resulting in the intended deck/notetype not being found.

* Check for scheduling with revlog and deck configs

Might help with cases in which scheduling was included, but all cards
are new. In such a case, filtered deck should not be converted.

* Fix duplicate with same GUID being created

* Remove redundant `distinct`s from sql query

* Match notes by _either_ guid _or_ first field

* Refactor to emphasise GUID/first field distinction

* Export default deck and config if with scheduling

* Fix default deck being exported if it's a parent
2022-09-03 11:29:06 +10:00
Matthias Metelka
7242501db3 Fix PlainTextInput not expanding 2022-09-02 20:46:36 +02:00
Matthias Metelka
6295f50587
Merge branch 'main' into color-palette 2022-09-02 19:05:58 +02:00
Matthias Metelka
7243a9c091 Dark theme: make border-faint darker than canvas-default
meaning two shades darker than it currently was.
2022-09-02 19:02:31 +02:00
Matthias Metelka
3d896b5949 Tweak inset shadow color 2022-09-02 18:57:36 +02:00
Matthias Metelka
98e7c37eaa Dark theme: make border-default one shade darker 2022-09-02 18:56:55 +02:00
Matthias Metelka
e39a3edeab Experiment with inset look for fields again
Is this too dark in night mode? It's the same color used for all other text inputs.
2022-09-02 18:25:37 +02:00
Matthias Metelka
d3fa137e1c Tweak card/note accent colors 2022-09-02 17:39:46 +02:00
Matthias Metelka
c5f9e9954b Reduce flag colors to single default value 2022-09-02 17:35:48 +02:00
Matthias Metelka
7d45b65ebe Light theme: darken background and flatten transition
also set hue and saturation of gray-8 to 0 (like all the other grays).
2022-09-02 15:55:23 +02:00
Matthias Metelka
690cc04edd Add back box-shadow to EditingArea 2022-09-02 15:53:58 +02:00
Matthias Metelka
98ed2813cc Adjust light theme 2022-09-02 15:28:47 +02:00
Matthias Metelka
a7c1cdfa2d Use canvas-inset variable for switch knob 2022-09-02 15:28:35 +02:00
Matthias Metelka
decfa16df2 Light theme: decrease brightness of canvas-default and adjust fg-default 2022-09-02 12:49:37 +02:00
Damien Elmes
8cf829d442 Update translations 2022-09-02 15:04:10 +10:00
RumovZ
31b7464c67
Add card meta for persisting custom scheduling state (#2040)
* Add card meta for persisting custom scheduling state

* Rename meta -> custom_data

* Enforce limits on size of custom data

Large values will slow down table scans of the cards table, and it's
easier to be strict now and possibly relax things in the future than
the opposite.

* Pack card states and customData into a single message

+ default customData to empty if it can't be parsed

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2022-09-02 11:22:49 +10:00
Matthias Metelka
d9e2d7d3eb
Break long words in pre tags (#2045)
* Break long words in pre tags

* Move rule to editable-base.scss
2022-09-01 23:31:47 +10:00
Matthias Metelka
53293284c9
Break long words in CodeMirror (#2044)
* Break long words in CodeMirror

Credit to Marko Letic: https://stackoverflow.com/a/57377527

* Move rule to more general CodeMirror component
2022-09-01 23:30:17 +10:00
RumovZ
52b4e3ad16
Document Protocol Buffers used in Anki (#2042)
* Document Protocol Buffers used in Anki

* Fix typos

* Correct notes about Rust crate
2022-09-01 22:01:14 +10:00
Matthias Metelka
e4f3f9bf41
Merge branch 'main' into color-palette 2022-08-31 22:07:22 +02:00
Matthias Metelka
ac928225f9 Showcase use of palette-of function
The #{...} syntax is required only because the use cases are CSS var definitions. In other cases a simple palette-of(keyword, theme) would suffice.
2022-08-31 21:21:54 +02:00
Matthias Metelka
cd726049a1 Return CSS var by default and add palette-of function for raw value 2022-08-31 21:19:53 +02:00
Matthias Metelka
d110c4916c
Introduce setting to collapse field by default (#1990)
* Introduce setting to collapse field by default

* Fix schema order

* Change wording from adjective to imperative

sounds a bit less clunky

* Update rslib/src/notetype/schema11.rs (dae)

* Keep settings in single column

* Add back Toggle Visual Editor string

* Add RichTextBadge component and show it conditionally

* Reverse input order depending on default setting

* Make PlainTextInput border-radius responsive to toggle states

* Prevent first Collapsible transition differently

* Focus inputs after Collapsible transition

The double tick calls are just a temporary solution until I find the exact moment an input is focusable again.

* Use requestAnimationFrame to await focusable state

Note: Svelte tick doesn't seem to work in this scenario.
2022-08-31 23:34:39 +10:00
Sam Penny
65601196ee
add shortcut to close addcards window (#2031) 2022-08-31 20:09:09 +10:00
gnnoh
e4f1d9952b
Make dvipng use transparent background by default (#2036)
* make dvipng use transparent background by default

Note that if using all-lowercase 'transparent', it will give "a simple fully transparent background with non-transparent antialiased pixels", which is unnecessary.

* latex.py: format
2022-08-31 18:49:22 +10:00
wallgrenen
0eaa80dd28
change update link to point to download section (#2034) 2022-08-31 18:35:53 +10:00
BlueGreenMagick
28eae0667a
fix wrong rich-text-widget offset (#2033)
.rich-text-input { padding: 6px; }
messed up image & mathjax overlay positioning
because parent padding isn't added to absolute positioning px
2022-08-31 18:35:01 +10:00
Matthias Metelka
1498ba2c29 Use old --frame-bg color and use darker tone for canvas-default 2022-08-30 19:17:11 +02:00
Matthias Metelka
98f8ab7344 Improve uses of default-themed variables 2022-08-30 18:54:25 +02:00
Matthias Metelka
cb4afed825
Merge branch 'main' into color-palette 2022-08-30 18:17:38 +02:00
Matthias Metelka
4881f16eba Add vars_lib as dependency to base_lib and button_mixins_lib 2022-08-30 18:15:50 +02:00
Matthias Metelka
ac0d2c8954 Add functions and colors to base_lib 2022-08-30 17:56:00 +02:00
Matthias Metelka
7451b67f2a Tweak light theme border and shadow colors 2022-08-30 17:42:12 +02:00
Matthias Metelka
1b8e32e363 Fix focus box shadow transition and remove default shadow for a cleaner look
I couldn't quite get the inset look the way I wanted, because inset box-shadows do not respect the border radius, therefore causing aliasing.
2022-08-30 17:41:36 +02:00
Matthias Metelka
644ff49966 Showcase use of access functions in several locations
@hgiesel in buttons.scss I access the color palette directly. Is this what you meant by "... keep it local to the component, and possibly make it global at a later time ..."?
2022-08-30 17:17:15 +02:00
Matthias Metelka
e9f75e1756 Add Sass functions to access color palette and semantic variables
in response to https://github.com/ankitects/anki/pull/2016#issuecomment-1220571076
2022-08-30 17:14:28 +02:00
Damien Elmes
966d7f3760 Experimentally remove webview recycling
It was originally introduced for WebKit, and may no longer be pertinent
for Chromium.WebEngine.

https://forums.ankiweb.net/t/anki-glitch-showing-previous-card-answer-instead-of-new-card/12482/13
2022-08-30 21:52:22 +10:00
Matthias Metelka
bb172edf05 Adjust box-shadow of EditingArea to make fields look inset 2022-08-30 10:06:05 +02:00
Matthias Metelka
ec290a23cb Tweak gray tones 2022-08-30 10:05:59 +02:00
Matthias Metelka
b7cc8edcae Saturate highlight-bg in light theme 2022-08-29 16:04:08 +02:00
Matthias Metelka
f2d5abb95d Improve categorization of global colors
by renaming almost all of them and sorting them into separate maps.
2022-08-29 15:43:02 +02:00
Matthias Metelka
017c3938ef Replace gray tones with more neutral values 2022-08-29 06:37:16 +02:00
Matthias Metelka
b91ee5bbf7 Use --slightly-grey-text for options tab color 2022-08-29 06:35:31 +02:00
Matthias Metelka
dfe3aba2d8
Merge branch 'main' into color-palette 2022-08-29 05:08:27 +02:00
Damien Elmes
4a884d379f Fix build failing on macOS
I suspect the PyQt maintainer uploaded a new wheel and yanked the old
one, which made pip fall back on a source install which failed. If that's
the case, he really should have used a new version number, as this makes
building/bisecting older releases more cumbersome.
2022-08-25 18:04:37 +10:00
Damien Elmes
89c4441837 Fix scheduler change not reflected after normal sync 2022-08-24 18:37:58 +10:00