anki/ts
Matthias Metelka 0c340c4f74
Add comments to Sass variables and tweak main window (#2137)
* Prevent multiple inclusion of variables in CSS files

* Use dict instead of tuple for variables

* Add comments to variables

* Improve appearance of main window

* Tweak main window styles

* Use json.dumps over pprint.format

* Make study button primary

* Improve header margin

* Make bottom toolbar slimmer

* Make congrats page more balanced

* Fix type issue

* Replace day/night with light/dark

* Exclude top-level-drag-row from hover effect

* Create dataclass for variables

* Run formatter

* Apply CSS variables from Python side

Why go full-circle with the Sass variables? This way we only need one interface for add-on authors to interact with. It also makes it easier for us to apply additional themes in the future.

* Fix typing

* Fix rgba values in Qt

* Darken button background

* Fix palette not being applied in light theme

For some odd reason this problem arose much later than #2016.

* Tweak default button look

* Reformat

* Apply CSS vars to ts pages

* Include elevation in button_mixins_lib

* Cast opacity to int

* Add some margin to studiedToday info

* Tweak light theme button gradient

* Tweak highlight-bg for light theme

* Add back default button color

as it made the browser sidebar tool icons dark in light theme.

* Reformat

* Tweak light theme buttons once more

Sorry for the back-and-forth. Sass only compiles when there are changes in user files, not when I only change the vars.

* Fix bottom toolbar button indicators

* Make buttons more clicky

* Fix button padding

* Handle macOS separately again

* Decrease elevation effect for main window buttons to 1

* Imitate box-shadow for Qt elements

* Adjust shadow vars

* Adjust primary border color

because the save button in the deck options had a lighter color than its background gradient.

* Boost box-shadow color of primary buttons

* Format

* Adjust Qt box-shadow imitation and shadow colors

* Use more subtle default shadow color

* Add some more padding to top toolbar

* Revert "Apply CSS vars to ts pages"

This reverts commit 5d8e7f6b7ffc8894b6517ecbb8cfba35407fc69a.

* Revert "Apply CSS variables from Python side"

This reverts commit 87db774412fd2bfd75e2630d2c5e782daef96b5f.

* Better match the standard macOS buttons

In the dark theme the standard color is a lighter grey, but at least
the size/shape is similar again.

This doesn't work for the editor buttons.

* Reduce the top margin of the congrats screen

* Fix illegible buttons when changing theme on macOS; match dark button style
2022-10-29 10:48:53 +10:00
..
card-info Introduce new color palette using Sass maps (#2016) 2022-09-16 14:11:18 +10:00
change-notetype Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
components Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
congrats Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
deck-options Use badge to link manual chapter (#2143) 2022-10-26 11:32:18 +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 Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
fields Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
graphs Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
html-filter With the new duplicate appearance, excluding the bg color becomes viable 2022-10-24 09:26:02 +10:00
icons Add extra button group for cloze commands (#1756) 2022-03-31 13:30:00 +10:00
import-csv Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +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 Fix scrolling with keys / keyboard event listeners not working on answer side (#2099) 2022-10-03 12:53:09 +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 Add comments to Sass variables and tweak main window (#2137) 2022-10-29 10:48:53 +10:00
.eslintrc.js Add option to shrink editor images by default (#2071) 2022-09-26 09:47:50 +10:00
.gitignore
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
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 Update d3 deps for CWE 2022-09-30 14:22:23 +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
protobuf.bzl Consider using --force-message for ts/protobuf.bzl (#1694) 2022-02-27 17:35:07 +10:00
README.md
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
vendor.bzl copy_bootstrap_css/icons were unused 2022-01-15 20:35:11 +10:00
yarn.sh

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