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
fix(ribbon): attribute details not shown in new layout
Elian Dorane556c090ffc8
diff --git a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts b/apps/client/src/widgets/attribute_widgets/attribute_detail.tsindex 2a7a55aef1..8ae3ae6746 100644--- a/apps/client/src/widgets/attribute_widgets/attribute_detail.ts+++ b/apps/client/src/widgets/attribute_widgets/attribute_detail.ts@@ -12,6 +12,7 @@ import shortcutService from "../../services/shortcuts.js";import appContext from "../../components/app_context.js";import type { Attribute } from "../../services/attribute_parser.js";import { focusSavedElement, saveFocusedElement } from "../../services/focus.js";+import { isExperimentalFeatureEnabled } from "../../services/experimental_features.js";const TPL = /*html*/`<div class="attr-detail tn-tool-dialog">@@ -309,6 +310,8 @@ interface SearchRelatedResponse {count: number;}+const isNewLayout = isExperimentalFeatureEnabled("new-layout");+export default class AttributeDetailWidget extends NoteContextAwareWidget {private $title!: JQuery<HTMLElement>;private $inputName!: JQuery<HTMLElement>;@@ -579,6 +582,13 @@ export default class AttributeDetailWidget extends NoteContextAwareWidget {.css("top", y - offset.top + 70).css("max-height", outerHeight + y > height - 50 ? height - y - 50 : 10000);+ if (isNewLayout) {+ this.$widget+ .css("top", "unset")+ .css("bottom", 70)+ .css("max-height", "80vh");+ }+if (focus === "name") {this.$inputName.trigger("focus").trigger("select");}