Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(options): improve descriptions for search
Elian Doran597c6eb15b86
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.jsonindex abc3de3de4..25e6940e9a 100644--- a/apps/client/src/translations/en/translation.json+++ b/apps/client/src/translations/en/translation.json@@ -1326,8 +1326,10 @@},"search": {"title": "Search",- "enable_fuzzy_matching": "Enable fuzzy matching in search (matches similar words when exact matches are insufficient)",- "enable_autocomplete_fuzzy": "Enable fuzzy matching for autocomplete (slower, but tolerates typos while typing)"+ "fuzzy_matching_label": "Typo tolerance in search",+ "fuzzy_matching_description": "Affects quick search and full search. Finds similar words when exact matches are insufficient.",+ "autocomplete_fuzzy_label": "Typo tolerance in autocomplete",+ "autocomplete_fuzzy_description": "Affects jump-to-note and note selectors. Slower but tolerates typos."},"search_engine": {"title": "Search Engine",diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsxindex b75c81b711..b1ccfcfcc0 100644--- a/apps/client/src/widgets/type_widgets/options/other.tsx+++ b/apps/client/src/widgets/type_widgets/options/other.tsx@@ -14,7 +14,9 @@ import FormGroup from "../../react/FormGroup";import FormSelect from "../../react/FormSelect";import FormText from "../../react/FormText";import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";+import FormToggle from "../../react/FormToggle";import { useTriliumOption, useTriliumOptionBool, useTriliumOptionJson } from "../../react/hooks";+import OptionsRow from "./components/OptionsRow";import OptionsSection from "./components/OptionsSection";import TimeSelector from "./components/TimeSelector";@@ -43,18 +45,29 @@ function SearchSettings() {return (<OptionsSection title={t("search.title")}>- <FormCheckbox+ <OptionsRowname="search-fuzzy-matching"- label={t("search.enable_fuzzy_matching")}- currentValue={fuzzyEnabled}- onChange={setFuzzyEnabled}- />- <FormCheckbox+ label={t("search.fuzzy_matching_label")}+ description={t("search.fuzzy_matching_description")}+ >+ <FormToggle+ switchOnName="" switchOffName=""+ currentValue={fuzzyEnabled}+ onChange={setFuzzyEnabled}+ />+ </OptionsRow>++ <OptionsRowname="search-autocomplete-fuzzy"- label={t("search.enable_autocomplete_fuzzy")}- currentValue={autocompleteFuzzy}- onChange={setAutocompleteFuzzy}- />+ label={t("search.autocomplete_fuzzy_label")}+ description={t("search.autocomplete_fuzzy_description")}+ >+ <FormToggle+ switchOnName="" switchOffName=""+ currentValue={autocompleteFuzzy}+ onChange={setAutocompleteFuzzy}+ />+ </OptionsRow></OptionsSection>);}