From bcbd413e571d772a4438f57138169ad1a6a3b5a8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 31 Mar 2021 18:17:28 -0400 Subject: Definition collapsing when overflowing (#1575) * Add double-down-chevron.svg * Add options * Update dictionary importers * Update settings * Add support for collapsible definitions * Improve case when there is a very small amount of overflow * Fix incorrect enabled state of newly imported dictionaries --- ext/js/data/options-util.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext/js/data') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 5b2e2bd3..ca122e89 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -755,9 +755,13 @@ class OptionsUtil { // Removed global option useSettingsV2. // Added part-of-speech field template. // Added an argument to hotkey inputs. + // Added definitionsCollapsible to dictionary options. await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v10.handlebars'); delete options.global.useSettingsV2; for (const profile of options.profiles) { + for (const dictionaryOptions of Object.values(profile.options.dictionaries)) { + dictionaryOptions.definitionsCollapsible = 'not-collapsible'; + } for (const hotkey of profile.options.inputs.hotkeys) { switch (hotkey.action) { case 'previousEntry': -- cgit v1.2.3