From 62d72cec0a555326dcf9849eedf1c4a26f213150 Mon Sep 17 00:00:00 2001
From: Dobrunia Kostrigin <48620984+Dobrunia@users.noreply.github.com>
Date: Sat, 1 Feb 2025 16:52:38 +0300
Subject: [PATCH 1/2] feat(ui): sticky note header
---
codex-ui/src/styles/z-axis.pcss | 1 +
src/presentation/components/note-header/NoteHeader.vue | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/codex-ui/src/styles/z-axis.pcss b/codex-ui/src/styles/z-axis.pcss
index c9d26c33..fe597a3a 100644
--- a/codex-ui/src/styles/z-axis.pcss
+++ b/codex-ui/src/styles/z-axis.pcss
@@ -2,4 +2,5 @@
--z-popover: 3;
--z-navbar: calc(var(--z-popover) + 1);
--z-popup: calc(var(--z-navbar) + 1);
+ --z-note-header: var(--z-navbar);
}
diff --git a/src/presentation/components/note-header/NoteHeader.vue b/src/presentation/components/note-header/NoteHeader.vue
index cb43f4ce..1d26df61 100644
--- a/src/presentation/components/note-header/NoteHeader.vue
+++ b/src/presentation/components/note-header/NoteHeader.vue
@@ -22,6 +22,10 @@
transition: opacity 100ms;
justify-content: space-between;
padding: var(--spacing-s) var(--spacing-m);
+ position: sticky;
+ top: var(--layout-navbar-height);
+ background-color: var(--base--bg-primary);
+ z-index: var(--z-note-header);
&__left {
color: var(--base--text-secondary);
From 2fa2d1cbb4aa87277f59b87888bf91e92ce79def Mon Sep 17 00:00:00 2001
From: Dobrunia Kostrigin <48620984+Dobrunia@users.noreply.github.com>
Date: Sun, 26 Jan 2025 12:11:23 +0300
Subject: [PATCH 2/2] Merge pull request #290 from
codex-team/implement/layout-page-block-component
feat(ui): integrate layout page block component
---
codex-ui/dev/pages/layout/Navbar.vue | 8 ++--
codex-ui/src/vue/components/tabbar/Tab.vue | 3 +-
.../src/vue/layout/page-block/PageBlock.vue | 2 +
src/application/services/useLayout.ts | 46 -------------------
src/presentation/layouts/Fullpage.vue | 15 ------
src/presentation/layouts/Layout.vue | 15 ------
src/presentation/layouts/ThreeColsLayout.vue | 42 -----------------
src/presentation/pages/History.vue | 7 ++-
src/presentation/pages/HistoryVersion.vue | 14 +++---
src/presentation/pages/Home.vue | 8 ++--
src/presentation/pages/NoteSettings.vue | 7 ++-
src/presentation/pages/Settings.vue | 7 ++-
.../pages/marketplace/AddTool.vue | 1 -
.../pages/marketplace/MarketplacePage.vue | 9 ++--
.../pages/marketplace/MarketplaceTools.vue | 1 -
15 files changed, 30 insertions(+), 155 deletions(-)
delete mode 100644 src/application/services/useLayout.ts
delete mode 100644 src/presentation/layouts/Fullpage.vue
delete mode 100644 src/presentation/layouts/Layout.vue
delete mode 100644 src/presentation/layouts/ThreeColsLayout.vue
diff --git a/codex-ui/dev/pages/layout/Navbar.vue b/codex-ui/dev/pages/layout/Navbar.vue
index 136500ed..f11b6d0d 100644
--- a/codex-ui/dev/pages/layout/Navbar.vue
+++ b/codex-ui/dev/pages/layout/Navbar.vue
@@ -15,17 +15,15 @@ import { Navbar } from '../../../src/vue';
diff --git a/codex-ui/src/vue/components/tabbar/Tab.vue b/codex-ui/src/vue/components/tabbar/Tab.vue
index 4c9683e2..28952bc3 100644
--- a/codex-ui/src/vue/components/tabbar/Tab.vue
+++ b/codex-ui/src/vue/components/tabbar/Tab.vue
@@ -73,9 +73,8 @@ withDefaults(
display: inline-block;
min-width: var(--min-width);
text-decoration: none;
-
max-width: max-content;
-
+ user-select: none;
flex: 1;
flex-shrink: 1;
diff --git a/codex-ui/src/vue/layout/page-block/PageBlock.vue b/codex-ui/src/vue/layout/page-block/PageBlock.vue
index 6a7b5d80..2dda4bb5 100644
--- a/codex-ui/src/vue/layout/page-block/PageBlock.vue
+++ b/codex-ui/src/vue/layout/page-block/PageBlock.vue
@@ -57,6 +57,8 @@ defineProps({
&__content {
max-width: var(--layout-content-width);
+ flex-grow: 1;
+ min-width: 0;
padding: var(--spacing-xxl) var(--spacing-ml);
box-sizing: border-box;
diff --git a/src/application/services/useLayout.ts b/src/application/services/useLayout.ts
deleted file mode 100644
index 118ce7b4..00000000
--- a/src/application/services/useLayout.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { shallowRef, type ShallowRef, type Component, watch } from 'vue';
-import { useRoute } from 'vue-router';
-import Default from '@/presentation/layouts/ThreeColsLayout.vue';
-import Fullpage from '@/presentation/layouts/Fullpage.vue';
-
-/**
- * Layouts available in application.
- *
- * Layout — is page wrapper. You can use it to create different layouts for different pages, e.g.: multiple sidebars, etc.
- */
-export const layouts = {
- /**
- * Standard layout with Centered container
- */
- default: Default,
-
- /**
- * Fullpage layout without container
- */
- fullpage: Fullpage,
-};
-
-/**
- * useLayout hook is setting current Layout
- * @returns Layout template was got by meta
- */
-export default function (): ShallowRef {
- const layout = shallowRef(layouts.default);
- const route = useRoute();
-
- /**
- * Watch route meta and set layout
- */
- watch(
- () => route.meta.layout,
- (layoutName) => {
- if (layoutName !== undefined && layoutName in layouts) {
- layout.value = layouts[layoutName];
- } else {
- layout.value = layouts.default;
- }
- }
- );
-
- return layout;
-}
diff --git a/src/presentation/layouts/Fullpage.vue b/src/presentation/layouts/Fullpage.vue
deleted file mode 100644
index ba754061..00000000
--- a/src/presentation/layouts/Fullpage.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/presentation/layouts/Layout.vue b/src/presentation/layouts/Layout.vue
deleted file mode 100644
index 416b262e..00000000
--- a/src/presentation/layouts/Layout.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/presentation/layouts/ThreeColsLayout.vue b/src/presentation/layouts/ThreeColsLayout.vue
deleted file mode 100644
index 2efbee53..00000000
--- a/src/presentation/layouts/ThreeColsLayout.vue
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/presentation/pages/History.vue b/src/presentation/pages/History.vue
index aba71bfd..46739304 100644
--- a/src/presentation/pages/History.vue
+++ b/src/presentation/pages/History.vue
@@ -1,5 +1,5 @@
-
+
-
+