Skip to content

Build your personal knowledge base with Trilium Notes

refactor(client): show the note title actions on the old layout

Elian Doranbd1b94e76a69
diff --git a/apps/client/src/layouts/desktop_layout.tsx b/apps/client/src/layouts/desktop_layout.tsx
index 70ccbad7aa..650d924b35 100644
--- a/apps/client/src/layouts/desktop_layout.tsx
+++ b/apps/client/src/layouts/desktop_layout.tsx
@@ -33,7 +33,6 @@ import NoteTitleWidget from "../widgets/note_title.jsx";
import NoteTreeWidget from "../widgets/note_tree.js";
import NoteWrapperWidget from "../widgets/note_wrapper.js";
import NoteDetail from "../widgets/NoteDetail.jsx";
-import PromotedAttributes from "../widgets/PromotedAttributes.jsx";
import QuickSearch from "../widgets/quick_search.jsx";
import { FixedFormattingToolbar } from "../widgets/ribbon/FormattingToolbar.jsx";
import LazyComponent from "../widgets/react/LazyComponent.jsx";
@@ -145,8 +144,7 @@ export default class DesktopLayout {
new ScrollingContainer()
.filling()
.optChild(isNewLayout, <InlineTitle />)
- .optChild(isNewLayout, <NoteTitleActions />)
- .optChild(!isNewLayout, <PromotedAttributes />)
+ .child(<NoteTitleActions />)
.child(<NoteDetail />)
.child(<NoteList media="screen" />)
.child(<SearchResult />)
diff --git a/apps/client/src/widgets/PromotedAttributes.css b/apps/client/src/widgets/PromotedAttributes.css
index 558657df69..142ea1a072 100644
--- a/apps/client/src/widgets/PromotedAttributes.css
+++ b/apps/client/src/widgets/PromotedAttributes.css
@@ -13,15 +13,10 @@ body.mobile .promoted-attributes-widget {
.promoted-attributes-container {
margin: 0 1.5em;
overflow: auto;
- max-height: 400px;
display: flex;
flex-wrap: wrap;
}
-body.experimental-feature-new-layout .promoted-attributes-container {
- max-height: unset;
-}
-
.promoted-attribute-cell {
display: flex;
align-items: center;
diff --git a/apps/client/src/widgets/layout/NoteTitleActions.css b/apps/client/src/widgets/layout/NoteTitleActions.css
index 9301bf5012..e8af34918b 100644
--- a/apps/client/src/widgets/layout/NoteTitleActions.css
+++ b/apps/client/src/widgets/layout/NoteTitleActions.css
@@ -1,64 +1,52 @@
-body.experimental-feature-new-layout {
- .component.title-actions {
- contain: none;
- }
-
- .title-actions {
- --title-actions-padding-start: var(--content-margin-inline);
- --title-actions-padding-end: var(--content-margin-inline);
+.component.title-actions {
+ contain: none;
+}
- display: flex;
- width: 100%;
- max-width: var(--max-content-width);
- flex-direction: column;
- gap: 0.5em;
- padding-inline: var(--title-actions-padding-start) var(--title-actions-padding-end);
+.title-actions {
+ --title-actions-padding-start: var(--content-margin-inline);
+ --title-actions-padding-end: var(--content-margin-inline);
- body.prefers-centered-content .note-split:not(.full-content-width) & {
- margin-inline: auto;
- }
+ display: flex;
+ width: 100%;
+ max-width: var(--max-content-width);
+ flex-direction: column;
+ gap: 0.5em;
+ padding-inline: var(--title-actions-padding-start) var(--title-actions-padding-end);
- &:not(:empty) {
- padding-block: 0.75em;
- }
-
- .edited-notes {
- .collapsible-inner-body {
- display: flex;
- flex-wrap: wrap;
- gap: 0.3em;
+ body.prefers-centered-content .note-split:not(.full-content-width) & {
+ margin-inline: auto;
+ }
- .badge {
- margin: 0;
- color: inherit;
- text-transform: none;
- text-decoration: none;
- display: inline-block;
- transition: background-color 250ms ease-in, color 250ms ease-in;
+ &:not(:empty) {
+ padding-block: 0.75em;
+ }
- &:hover {
- background-color: var(--link-hover-background);
- color: var(--link-hover-color);
- }
- }
- }
- }
+ .edited-notes {
+ .collapsible-inner-body {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 0.3em;
- .promoted-attributes-widget {
- .promoted-attributes-container {
+ .badge {
margin: 0;
- padding: 0;
+ color: inherit;
+ text-transform: none;
+ text-decoration: none;
+ display: inline-block;
+ transition: background-color 250ms ease-in, color 250ms ease-in;
+
+ &:hover {
+ background-color: var(--link-hover-background);
+ color: var(--link-hover-color);
+ }
}
}
-
}
- body.desktop .title-actions {
- > .collapsible,
- > .note-type-switcher {
- padding-inline-start: calc(24px - var(--title-actions-padding-start));
- padding-inline-end: calc(24px - var(--title-actions-padding-end));
+ .promoted-attributes-widget {
+ .promoted-attributes-container {
+ margin: 0;
+ padding: 0;
}
}
}
-