Skip to content

Build your personal knowledge base with Trilium Notes

fix(attributes): quieten the row's note search and shrink its pencil

Elian Doran313601368d77
diff --git a/apps/client/src/widgets/sidebar/AttributeList.css b/apps/client/src/widgets/sidebar/AttributeList.css
index 199f90b977..9deab99920 100644
--- a/apps/client/src/widgets/sidebar/AttributeList.css
+++ b/apps/client/src/widgets/sidebar/AttributeList.css
@@ -150,8 +150,14 @@
}
/* Changing a relation's target is a press away too, so its pencil keeps the delete button's habits:
- at the row's end beside it, and shown only over the row being pointed at. */
+ at the row's end beside it, shown only over the row being pointed at — and worn at the same size,
+ which the cross is given by the theme (see theme-next/forms.css, `.icon-action.bx-x`) and an icon
+ button is otherwise a fair bit bigger than. */
.attribute-list-panel .attribute-edit-button {
+ --icon-button-size: 24px;
+ --icon-button-icon-ratio: 0.8;
+
+ border-radius: 50%;
flex-shrink: 0;
visibility: hidden;
}
diff --git a/apps/client/src/widgets/sidebar/AttributeValueEditor.tsx b/apps/client/src/widgets/sidebar/AttributeValueEditor.tsx
index f946735d8f..43936b1cb9 100644
--- a/apps/client/src/widgets/sidebar/AttributeValueEditor.tsx
+++ b/apps/client/src/widgets/sidebar/AttributeValueEditor.tsx
@@ -145,8 +145,10 @@ export default function AttributeValueEditor({ note, attribute, onEdit, onCommit
);
}
-/** Constant so it does not re-initialise the autocomplete on every render, as in the detail form. */
-const TARGET_NOTE_OPTS = { allowCreatingNotes: true };
+/** Constant so it does not re-initialise the autocomplete on every render, as in the detail form —
+ * less the buttons beside the box (go to, search, recent), which are more furniture than a row has
+ * room for; the field a relation holding several targets offers leaves them out the same way. */
+const TARGET_NOTE_OPTS = { allowCreatingNotes: true, hideAllButtons: true };
/** The input types whose content `select()` applies to; the pickers select nothing and mind nothing. */
const SELECT_ALL_TYPES = new Set([ "text", "number", "url", "email", "tel" ]);