Repository: toeverything/AFFiNE
Pull request #12162: chore(editor): adjust embed synced doc ui
Author: login: L-Sun
Labels: name: mod:i18n
description: Related to i18n
name: app:core
Created: 2025-05-07T03:48:30Z | Merged: 2025-05-07T08:49:12Z

Close [BS-3400](https://linear.app/affine-design/issue/BS-3400/ui-issues)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - The "View in Page" button has been renamed to "Open in Page" and now uses a new icon for improved clarity.
  - The menu for embedded synced documents is now integrated directly into the Open button for a more streamlined interface.

- **Style**
  - Improved spacing and visual alignment in edgeless block headers, including dedicated styling for title icons and buttons.
  - Updated toolbar icon for better visual consistency.
  - Added background styling for embedded linked document blocks.

- **Localization**
  - Updated translation keys and text to reflect the "Open in Page" terminology across all supported languages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts b/blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts
index 63f6f8dcc7931..491f850da5b5a 100644
--- a/blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts
+++ b/blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts
@@ -2,8 +2,6 @@ import { embedNoteContentStyles } from '@blocksuite/affine-block-embed';
 import { unsafeCSSVarV2 } from '@blocksuite/affine-shared/theme';
 import { css, html } from 'lit';
 
-unsafeCSSVarV2('layer/background/linkedDocOnEdgeless');
-
 export const styles = css`
   .affine-embed-linked-doc-block {
     box-sizing: border-box;
@@ -12,6 +10,7 @@ export const styles = css`
     height: 100%;
     border-radius: 8px;
     border: 1px solid var(--affine-background-tertiary-color);
+    background: ${unsafeCSSVarV2('layer/background/primary')};
     user-select: none;
     position: relative;
   }
diff --git a/blocksuite/affine/blocks/note/src/configs/toolbar.ts b/blocksuite/affine/blocks/note/src/configs/toolbar.ts
index c67e7a7adc550..2ed26031c2f74 100644
--- a/blocksuite/affine/blocks/note/src/configs/toolbar.ts
+++ b/blocksuite/affine/blocks/note/src/configs/toolbar.ts
@@ -28,7 +28,7 @@ import {
   AutoHeightIcon,
   CornerIcon,
   CustomizedHeightIcon,
-  LinkedPageIcon,
+  InsertIntoPageIcon,
   ScissorsIcon,
 } from '@blocksuite/icons/lit';
 import { BlockFlavourIdentifier } from '@blocksuite/std';
@@ -125,7 +125,7 @@ const builtinSurfaceToolbarConfig = {
             data-testid="display-in-page"
             @click=${() => onSelect()}
           >
-            ${LinkedPageIcon()}
+            ${InsertIntoPageIcon()}
             <span class="label">${label$.value}</span>
           </editor-icon-button>`,
         };
diff --git a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts
index 3fe2c276fc85a..ff68c6127bfd3 100644
--- a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts
+++ b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts
@@ -15,12 +15,20 @@ export const header = style({
 export const titleContainer = style({
   display: 'flex',
   alignItems: 'center',
+  padding: 4,
+  marginRight: 8,
   gap: 4,
   flex: 1,
   overflow: 'hidden',
   whiteSpace: 'nowrap',
 });
 
+export const titleIcon = style({
+  display: 'flex',
+  alignItems: 'center',
+  color: cssVarV2('icon/primary'),
+});
+
 const title = style({
   overflow: 'hidden',
   textOverflow: 'ellipsis',
@@ -59,13 +67,12 @@ export const button = style({
   pointerEvents: 'auto',
   color: cssVarV2('icon/transparentBlack'),
   borderRadius: 4,
+  gap: 0,
 });
 
 export const buttonText = style([
   embedSyncedDocTitle,
   {
-    paddingLeft: 4,
-    paddingRight: 4,
     fontWeight: 500,
   },
 ]);
diff --git a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx
index 63b0bc5f70d8c..f34d32ada17cf 100644
--- a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx
+++ b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx
@@ -98,7 +98,9 @@ const Title = ({ model }: { model: EmbedSyncedDocModel }) => {
       data-collapsed={!!model.props.preFoldHeight}
       data-testid="edgeless-embed-synced-doc-title"
     >
-      <LinkedPageIcon />
+      <span className={styles.titleIcon}>
+        <LinkedPageIcon />
+      </span>
       <span className={styles.embedSyncedDocTitle}>{title}</span>
     </div>
   );
@@ -130,7 +132,13 @@ const EmbedSyncedDocCopyLinkButton = ({
   );
 };
 
-const OpenButton = ({ model }: { model: EmbedSyncedDocModel }) => {
+const OpenButton = ({
+  std,
+  model,
+}: {
+  std: BlockStdScope;
+  model: EmbedSyncedDocModel;
+}) => {
   const t = useI18n();
   const workbench = useService(WorkbenchService).workbench;
 
@@ -141,21 +149,24 @@ const OpenButton = ({ model }: { model: EmbedSyncedDocModel }) => {
   }, [model.props.pageId, workbench]);
 
   return (
-    <Button
-      className={styles.button}
-      variant="plain"
-      size="custom"
-      onClick={open}
-      prefixStyle={{
-        width: `${styles.iconSize}px`,
-        height: `${styles.iconSize}px`,
-      }}
-      prefix={<ExpandFullIcon />}
-    >
-      <span className={styles.buttonText}>
-        {t['com.affine.editor.edgeless-embed-synced-doc-header.open']()}
-      </span>
-    </Button>
+    <div>
+      <Button
+        className={styles.button}
+        variant="plain"
+        size="custom"
+        onClick={open}
+        prefixStyle={{
+          width: `${styles.iconSize}px`,
+          height: `${styles.iconSize}px`,
+        }}
+        prefix={<ExpandFullIcon />}
+      >
+        <span className={styles.buttonText}>
+          {t['com.affine.editor.edgeless-embed-synced-doc-header.open']()}
+        </span>
+      </Button>
+      <MoreMenu model={model} std={std} />
+    </div>
   );
 };
 
@@ -256,8 +267,7 @@ export const EdgelessEmbedSyncedDocHeader = ({
     <div className={styles.header} onPointerDown={stopPropagation}>
       <ToggleButton model={model} />
       <Title model={model} />
-      <OpenButton model={model} />
-      <MoreMenu model={model} std={std} />
+      <OpenButton std={std} model={model} />
       <EmbedSyncedDocInfoButton model={model} />
       <EmbedSyncedDocCopyLinkButton model={model} />
     </div>
diff --git a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx
index f8f78cee030f2..08867ab122b7f 100644
--- a/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx
+++ b/packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx
@@ -9,7 +9,7 @@ import { Bound } from '@blocksuite/affine/global/gfx';
 import { type NoteBlockModel } from '@blocksuite/affine/model';
 import { GfxControllerIdentifier } from '@blocksuite/affine/std/gfx';
 import {
-  LinkedPageIcon,
+  ExpandFullIcon,
   ToggleDownIcon,
   ToggleRightIcon,
 } from '@blocksuite/icons/rc';
@@ -105,11 +105,11 @@ const EdgelessNoteToggleButton = ({ note }: { note: NoteBlockModel }) => {
   );
 };
 
-const ViewInPageButton = () => {
+const OpenInPageButton = () => {
   const t = useI18n();
   const editor = useService(EditorService).editor;
 
-  const viewInPage = useCallback(() => {
+  const openInPage = useCallback(() => {
     track.edgeless.pageBlock.headerToolbar.switchPageMode();
     editor.setMode('page');
   }, [editor]);
@@ -118,11 +118,11 @@ const ViewInPageButton = () => {
     <IconButton
       className={styles.button}
       size={styles.iconSize}
-      tooltip={t['com.affine.editor.edgeless-note-header.view-in-page']()}
+      tooltip={t['com.affine.editor.edgeless-note-header.open-in-page']()}
       data-testid="edgeless-note-view-in-page-button"
-      onClick={viewInPage}
+      onClick={openInPage}
     >
-      <LinkedPageIcon />
+      <ExpandFullIcon />
     </IconButton>
   );
 };
@@ -165,7 +165,7 @@ export const EdgelessNoteHeader = ({ note }: { note: NoteBlockModel }) => {
   return (
     <div className={styles.header} data-testid="edgeless-page-block-header">
       <EdgelessNoteToggleButton note={note} />
-      <ViewInPageButton />
+      <OpenInPageButton />
       {!insidePeekView && <PageBlockInfoButton note={note} />}
       <NoteCopyLinkButton note={note} />
     </div>
diff --git a/packages/frontend/i18n/src/i18n.gen.ts b/packages/frontend/i18n/src/i18n.gen.ts
index 17fdc72a683a6..af4b2c2273223 100644
--- a/packages/frontend/i18n/src/i18n.gen.ts
+++ b/packages/frontend/i18n/src/i18n.gen.ts
@@ -7169,9 +7169,9 @@ export function useAFFiNEI18N(): {
       */
     ["com.affine.editor.edgeless-note-header.fold-page-block"](): string;
     /**
-      * `View in page`
+      * `Open in Page`
       */
-    ["com.affine.editor.edgeless-note-header.view-in-page"](): string;
+    ["com.affine.editor.edgeless-note-header.open-in-page"](): string;
     /**
       * `Fold`
       */
diff --git a/packages/frontend/i18n/src/resources/ar.json b/packages/frontend/i18n/src/resources/ar.json
index 30be50fc1c17d..832b13de371ca 100644
--- a/packages/frontend/i18n/src/resources/ar.json
+++ b/packages/frontend/i18n/src/resources/ar.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "إظهار",
   "com.affine.editor.bi-directional-link-panel.hide": "إخفاء",
   "com.affine.editor.edgeless-note-header.fold-page-block": "طي كتلة الصفحة",
-  "com.affine.editor.edgeless-note-header.view-in-page": "عرض في الصفحة",
+  "com.affine.editor.edgeless-note-header.open-in-page": "عرض في الصفحة",
   "com.affine.upgrade-to-team-page.title": "تعزيز فريقك بتعاون سلس",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "حدد مساحة عمل موجودة أو أنشئ واحدة جديدة",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "إنشاء مساحة عمل",
diff --git a/packages/frontend/i18n/src/resources/de.json b/packages/frontend/i18n/src/resources/de.json
index eebb41f2f623d..89105b800ecd4 100644
--- a/packages/frontend/i18n/src/resources/de.json
+++ b/packages/frontend/i18n/src/resources/de.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Anzeigen",
   "com.affine.editor.bi-directional-link-panel.hide": "Verbergen",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Seitenblock falten",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Auf Seite anzeigen",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Auf Seite anzeigen",
   "com.affine.upgrade-to-team-page.title": "Befähige dein Team durch nahtlose Zusammenarbeit",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Wähle einen vorhandenen Workspace aus oder erstelle einen neuen",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Workspace erstellen",
diff --git a/packages/frontend/i18n/src/resources/el-GR.json b/packages/frontend/i18n/src/resources/el-GR.json
index 6d0e093bd8f53..4d607518f7af8 100644
--- a/packages/frontend/i18n/src/resources/el-GR.json
+++ b/packages/frontend/i18n/src/resources/el-GR.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Εμφάνιση",
   "com.affine.editor.bi-directional-link-panel.hide": "Απόκρυψη",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Σύμπτυξη μπλοκ σελίδας",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Προβολή στη σελίδα",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Άνοιγμα στη σελίδα",
   "com.affine.upgrade-to-team-page.title": "Δώστε δύναμη στην ομάδα σας με Αδιάλειπτη Συνεργασία",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Επιλέξτε έναν υπάρχοντα χώρο εργασίας ή δημιουργήστε έναν νέο",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Δημιουργία Χώρου Εργασίας",
diff --git a/packages/frontend/i18n/src/resources/en.json b/packages/frontend/i18n/src/resources/en.json
index 86557dc6c2a08..d8d0b84e7fdb7 100644
--- a/packages/frontend/i18n/src/resources/en.json
+++ b/packages/frontend/i18n/src/resources/en.json
@@ -1783,7 +1783,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Show",
   "com.affine.editor.bi-directional-link-panel.hide": "Hide",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Fold page block",
-  "com.affine.editor.edgeless-note-header.view-in-page": "View in page",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Open in Page",
   "com.affine.editor.edgeless-embed-synced-doc-header.fold": "Fold",
   "com.affine.editor.edgeless-embed-synced-doc-header.unfold": "Unfold",
   "com.affine.editor.edgeless-embed-synced-doc-header.open": "Open",
diff --git a/packages/frontend/i18n/src/resources/es.json b/packages/frontend/i18n/src/resources/es.json
index 02810ab67b494..7f5317c0b87a0 100644
--- a/packages/frontend/i18n/src/resources/es.json
+++ b/packages/frontend/i18n/src/resources/es.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Mostrar",
   "com.affine.editor.bi-directional-link-panel.hide": "Ocultar",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Plegar bloque de página",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Ver en la página",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Ver en la página",
   "com.affine.upgrade-to-team-page.title": "Potenciar a tu equipo con colaboración sin fisuras",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Selecciona un espacio de trabajo existente o crea uno nuevo",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Crear Espacio de trabajo",
diff --git a/packages/frontend/i18n/src/resources/fa.json b/packages/frontend/i18n/src/resources/fa.json
index 206ccac118c87..9047050b013dd 100644
--- a/packages/frontend/i18n/src/resources/fa.json
+++ b/packages/frontend/i18n/src/resources/fa.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "نمایش",
   "com.affine.editor.bi-directional-link-panel.hide": "پنهان کردن",
   "com.affine.editor.edgeless-note-header.fold-page-block": "بستن بلوک صفحه",
-  "com.affine.editor.edgeless-note-header.view-in-page": "مشاهده در صفحه",
+  "com.affine.editor.edgeless-note-header.open-in-page": "مشاهده در صفحه",
   "com.affine.upgrade-to-team-page.title": "تیم خود را با همکاری بی‌وقفه توانمند کنید",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "یک فضای کاری موجود را انتخاب کنید یا یک فضای جدید ایجاد کنید",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "ایجاد فضای کاری",
diff --git a/packages/frontend/i18n/src/resources/fr.json b/packages/frontend/i18n/src/resources/fr.json
index adeb5897a4469..ed527de08371a 100644
--- a/packages/frontend/i18n/src/resources/fr.json
+++ b/packages/frontend/i18n/src/resources/fr.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Afficher",
   "com.affine.editor.bi-directional-link-panel.hide": "Cacher",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Plier le bloc de page",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Voir dans la page",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Voir dans la page",
   "com.affine.upgrade-to-team-page.title": "Renforcez votre équipe avec une collaboration sans faille",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Sélectionnez un espace de travail existant ou créez-en un nouveau",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Créer un espace de travail",
diff --git a/packages/frontend/i18n/src/resources/it-IT.json b/packages/frontend/i18n/src/resources/it-IT.json
index 1832e2d0bab99..3b64ae8ecacd5 100644
--- a/packages/frontend/i18n/src/resources/it-IT.json
+++ b/packages/frontend/i18n/src/resources/it-IT.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Mostra",
   "com.affine.editor.bi-directional-link-panel.hide": "Nascondi",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Comprimi blocco pagina",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Visualizza nella pagina",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Visualizza nella pagina",
   "com.affine.upgrade-to-team-page.title": "Dai al tuo team una collaborazione senza soluzione di continuità",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Seleziona uno spazio di lavoro esistente o creane uno nuovo",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Crea Spazio di Lavoro",
diff --git a/packages/frontend/i18n/src/resources/ja.json b/packages/frontend/i18n/src/resources/ja.json
index 590a8ed90b978..969236b8ae6e5 100644
--- a/packages/frontend/i18n/src/resources/ja.json
+++ b/packages/frontend/i18n/src/resources/ja.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "表示",
   "com.affine.editor.bi-directional-link-panel.hide": "非表示",
   "com.affine.editor.edgeless-note-header.fold-page-block": "ページブロックを折りたたむ",
-  "com.affine.editor.edgeless-note-header.view-in-page": "ページで見る",
+  "com.affine.editor.edgeless-note-header.open-in-page": "ページで見る",
   "com.affine.upgrade-to-team-page.title": "シームレスなコラボレーションでチームに力を与える",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "既存のワークスペースを選択するか、新しいワークスペースを作成",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "ワークスペースを作成",
diff --git a/packages/frontend/i18n/src/resources/pl.json b/packages/frontend/i18n/src/resources/pl.json
index e0eca8d5cc48b..09cba6ed7fdcc 100644
--- a/packages/frontend/i18n/src/resources/pl.json
+++ b/packages/frontend/i18n/src/resources/pl.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Pokaż",
   "com.affine.editor.bi-directional-link-panel.hide": "Ukryj",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Zwiń blok strony",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Wyświetl na stronie",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Wyświetl na stronie",
   "com.affine.upgrade-to-team-page.title": "Wzmocnij swój zespół dzięki bezproblemowej współpracy",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Wybierz istniejącą przestrzeń roboczą lub utwórz nową",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Utwórz Przestrzeń Roboczą",
diff --git a/packages/frontend/i18n/src/resources/pt-BR.json b/packages/frontend/i18n/src/resources/pt-BR.json
index fede63b98d405..42f32d46b9c64 100644
--- a/packages/frontend/i18n/src/resources/pt-BR.json
+++ b/packages/frontend/i18n/src/resources/pt-BR.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Mostrar",
   "com.affine.editor.bi-directional-link-panel.hide": "Ocultar",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Dobrar bloco de página",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Ver na página",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Ver na página",
   "com.affine.upgrade-to-team-page.title": "Capacite Sua Equipe com Colaboração Sem Esforço",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Selecione um workspace existente ou crie um novo",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Criar workspace",
diff --git a/packages/frontend/i18n/src/resources/ru.json b/packages/frontend/i18n/src/resources/ru.json
index 2903fea07a160..88d87f59f8b67 100644
--- a/packages/frontend/i18n/src/resources/ru.json
+++ b/packages/frontend/i18n/src/resources/ru.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Показать",
   "com.affine.editor.bi-directional-link-panel.hide": "Скрыть",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Свернуть блок страницы",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Просмотреть на странице",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Просмотреть на странице",
   "com.affine.upgrade-to-team-page.title": "Усильте вашу команду при помощи безупречного взаимодействия",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Выберите существующее рабочее пространство или создайте новое",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Создать рабочее пространство",
diff --git a/packages/frontend/i18n/src/resources/sv-SE.json b/packages/frontend/i18n/src/resources/sv-SE.json
index 1c1dd1dc53ac1..efb877d1fc789 100644
--- a/packages/frontend/i18n/src/resources/sv-SE.json
+++ b/packages/frontend/i18n/src/resources/sv-SE.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Visa",
   "com.affine.editor.bi-directional-link-panel.hide": "Dölj",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Vik ihop sidblock",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Visa på sidan",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Visa på sidan",
   "com.affine.upgrade-to-team-page.title": "Stärk ditt team med sömlöst samarbete",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Välj en befintlig arbetsyta eller skapa en ny",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Skapa Arbetsyta",
diff --git a/packages/frontend/i18n/src/resources/uk.json b/packages/frontend/i18n/src/resources/uk.json
index d887eada02a34..4d579a362df7b 100644
--- a/packages/frontend/i18n/src/resources/uk.json
+++ b/packages/frontend/i18n/src/resources/uk.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Показати",
   "com.affine.editor.bi-directional-link-panel.hide": "Приховати",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Згорнути блок сторінки",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Переглянути на сторінці",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Переглянути на сторінці",
   "com.affine.upgrade-to-team-page.title": "Забезпечте свою команду безшовною співпрацею",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "Виберіть існуючий робочий простір або створіть новий",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "Створити робочий простір",
diff --git a/packages/frontend/i18n/src/resources/zh-Hans.json b/packages/frontend/i18n/src/resources/zh-Hans.json
index 48841376e3500..06a20218e62f3 100644
--- a/packages/frontend/i18n/src/resources/zh-Hans.json
+++ b/packages/frontend/i18n/src/resources/zh-Hans.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "展示",
   "com.affine.editor.bi-directional-link-panel.hide": "隐藏",
   "com.affine.editor.edgeless-note-header.fold-page-block": "折叠页面块",
-  "com.affine.editor.edgeless-note-header.view-in-page": "在页面中查看",
+  "com.affine.editor.edgeless-note-header.open-in-page": "在页面中查看",
   "com.affine.upgrade-to-team-page.title": "通过无缝协作来为您的团队赋能",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "选择现有工作区或创建新工作区",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "创建工作区",
diff --git a/packages/frontend/i18n/src/resources/zh-Hant.json b/packages/frontend/i18n/src/resources/zh-Hant.json
index 06184cde83ebe..869d6dad824c7 100644
--- a/packages/frontend/i18n/src/resources/zh-Hant.json
+++ b/packages/frontend/i18n/src/resources/zh-Hant.json
@@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "展示",
   "com.affine.editor.bi-directional-link-panel.hide": "隱藏",
   "com.affine.editor.edgeless-note-header.fold-page-block": "折疊頁面塊",
-  "com.affine.editor.edgeless-note-header.view-in-page": "在頁面中查看",
+  "com.affine.editor.edgeless-note-header.open-in-page": "在頁面中查看",
   "com.affine.upgrade-to-team-page.title": "使用無縫協作來賦能您的團隊",
   "com.affine.upgrade-to-team-page.workspace-selector.placeholder": "選擇現有的工作區或建立新工作區",
   "com.affine.upgrade-to-team-page.workspace-selector.create-workspace": "建立工作區",


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 1**

<details>
<summary>🧹 Nitpick comments (6)</summary><blockquote>

<details>
<summary>packages/frontend/i18n/src/resources/ru.json (1)</summary><blockquote>

`1755-1755`: **Confirm translation matches new action verb.**  
The key has been correctly renamed from `view-in-page` to `open-in-page`. Please ensure the Russian string `"Просмотреть на странице"` accurately conveys the new "Open in Page" action; you may consider changing it to `"Открыть на странице"` for consistency.

</blockquote></details>
<details>
<summary>packages/frontend/i18n/src/resources/fr.json (1)</summary><blockquote>

`1755-1755`: **Check translation semantics for key rename**  
The English label was changed from “View in Page” to “Open in Page”, but the French string remains “Voir dans la page” (“see in page”). To keep consistency with the new context, please confirm whether this should be updated to “Ouvrir dans la page”.  


Example diff:
```diff
- "com.affine.editor.edgeless-note-header.open-in-page": "Voir dans la page",
+ "com.affine.editor.edgeless-note-header.open-in-page": "Ouvrir dans la page",
```

</blockquote></details>
<details>
<summary>packages/frontend/i18n/src/resources/zh-Hans.json (1)</summary><blockquote>

`1755-1755`: **Verify translation accuracy for the renamed key**  
The key `"com.affine.editor.edgeless-note-header.open-in-page"` has been updated correctly, but the Chinese text remains “在页面中查看” (“view in page”). To more closely match the English “Open in Page,” consider changing it to “在页面中打开.”

</blockquote></details>
<details>
<summary>packages/frontend/i18n/src/resources/ar.json (1)</summary><blockquote>

`1755-1755`: **Confirm translation reflects new "Open in Page" semantics.**

The key has been updated from `view-in-page` to `open-in-page`, but the Arabic string remains "عرض في الصفحة" (“View in Page”). Please verify if it should be updated to "فتح في الصفحة" (“Open in Page”) to match the new action label, and ensure the old `view-in-page` entry has been removed.

</blockquote></details>
<details>
<summary>packages/frontend/i18n/src/resources/ja.json (1)</summary><blockquote>

`1755-1755`: **Consider updating translation to reflect "Open" semantics**  
The Japanese text `"ページで見る"` conveys "view on page". To mirror the English "Open in Page", consider using `"ページで開く"`.  

```diff
- "com.affine.editor.edgeless-note-header.open-in-page": "ページで見る",
+ "com.affine.editor.edgeless-note-header.open-in-page": "ページで開く",
```

</blockquote></details>
<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx (1)</summary><blockquote>

`122-122`: **Consider updating data-testid attribute for consistency.**

While component names and text have been updated from "view" to "open", the `data-testid` attribute still contains "view-in-page". This might cause confusion or break tests that rely on consistent naming.

```diff
-      data-testid="edgeless-note-view-in-page-button"
+      data-testid="edgeless-note-open-in-page-button"
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between af7cbdaf7ef539f1b079c86af1be2d15a744c050 and a9978ed4ee30eaae3dd4ddaa203b85d1c736bed5.

</details>

<details>
<summary>📒 Files selected for processing (21)</summary>

* `blocksuite/affine/blocks/note/src/configs/toolbar.ts` (2 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts` (2 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx` (4 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx` (4 hunks)
* `packages/frontend/i18n/src/i18n.gen.ts` (1 hunks)
* `packages/frontend/i18n/src/resources/ar.json` (1 hunks)
* `packages/frontend/i18n/src/resources/de.json` (1 hunks)
* `packages/frontend/i18n/src/resources/el-GR.json` (1 hunks)
* `packages/frontend/i18n/src/resources/en.json` (1 hunks)
* `packages/frontend/i18n/src/resources/es.json` (1 hunks)
* `packages/frontend/i18n/src/resources/fa.json` (1 hunks)
* `packages/frontend/i18n/src/resources/fr.json` (1 hunks)
* `packages/frontend/i18n/src/resources/it-IT.json` (1 hunks)
* `packages/frontend/i18n/src/resources/ja.json` (1 hunks)
* `packages/frontend/i18n/src/resources/pl.json` (1 hunks)
* `packages/frontend/i18n/src/resources/pt-BR.json` (1 hunks)
* `packages/frontend/i18n/src/resources/ru.json` (1 hunks)
* `packages/frontend/i18n/src/resources/sv-SE.json` (1 hunks)
* `packages/frontend/i18n/src/resources/uk.json` (1 hunks)
* `packages/frontend/i18n/src/resources/zh-Hans.json` (1 hunks)
* `packages/frontend/i18n/src/resources/zh-Hant.json` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧬 Code Graph Analysis (2)</summary>

<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx (1)</summary><blockquote>

<details>
<summary>blocksuite/affine/components/src/icons/text.ts (1)</summary>

* `ExpandFullIcon` (414-417)

</details>

</blockquote></details>
<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx (4)</summary><blockquote>

<details>
<summary>blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts (1)</summary>

* `styles` (7-343)

</details>
<details>
<summary>blocksuite/affine/model/src/blocks/embed/synced-doc/synced-doc-model.ts (1)</summary>

* `EmbedSyncedDocModel` (18-24)

</details>
<details>
<summary>blocksuite/affine/components/src/icons/text.ts (1)</summary>

* `ExpandFullIcon` (414-417)

</details>
<details>
<summary>blocksuite/affine/blocks/embed-doc/src/embed-synced-doc-block/components/embed-synced-doc-card.ts (2)</summary>

* `model` (40-42)
* `std` (44-46)

</details>

</blockquote></details>

</details>

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (60)</summary>

* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6
* GitHub Check: test-build-mobile-app / ios
* GitHub Check: test-build-mobile-app / android
* GitHub Check: Desktop Test (windows-latest, windows, x64, x86_64-pc-windows-msvc, true)
* GitHub Check: Desktop bundle check (ubuntu-latest, linux, x64, x86_64-unknown-linux-gnu, true)
* GitHub Check: Cloud E2E Test 3/6
* GitHub Check: Cloud E2E Test 1/6

</details>

<details>
<summary>🔇 Additional comments (27)</summary><blockquote>

<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts (3)</summary>

`18-19`: **Spacing refinement in titleContainer approved.**  
The added `padding: 4` and `marginRight: 8` properties align with the updated UI design, improving icon/text spacing without breaking existing layouts.

---

`26-30`: **New titleIcon style looks correct.**  
Defining a dedicated `titleIcon` class with flex alignment and primary icon color centralizes icon styling and ensures consistent appearance across components.

---

`70-70`: **Removed gap in button as intended.**  
Setting `gap: 0` on the button removes unwanted space between its children, matching the design spec for a tighter icon+label layout.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/pl.json (1)</summary>

`1755-1755`: **Localization key renamed correctly.**  
The key `"com.affine.editor.edgeless-note-header.open-in-page"` replaces the old `"view-in-page"` key while preserving the existing Polish translation, ensuring consistency with the English variant.

</details>
<details>
<summary>blocksuite/affine/blocks/note/src/configs/toolbar.ts (2)</summary>

`31-31`: **Icon import updated.**  
Replacing `LinkedPageIcon` with `InsertIntoPageIcon` in the import list brings the correct icon into the toolbar module.

---

`128-129`: **Toolbar button icon updated.**  
The `<editor-icon-button>` now correctly renders `InsertIntoPageIcon()`, aligning the toolbar with the new page action iconography.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/fa.json (1)</summary>

`1755-1755`: **Localization key updated for edgeless note header.**  
The key `"com.affine.editor.edgeless-note-header.open-in-page"` correctly replaces the previous `"view-in-page"` variant, and the Persian translation remains accurate.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/pt-BR.json (1)</summary>

`1755-1755`: **Translation key rename is correct**  
The key `com.affine.editor.edgeless-note-header.open-in-page` properly replaces the old `view-in-page` entry, and the translation `"Ver na página"` remains accurate. Please confirm the obsolete `view-in-page` key has been removed from this and other locale files.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/it-IT.json (1)</summary>

`1755-1755`: **Approve translation key update.**

The renamed key `"com.affine.editor.edgeless-note-header.open-in-page"` correctly matches the component change, and the Italian string `"Visualizza nella pagina"` remains accurate and unchanged.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/de.json (1)</summary>

`1755-1755`: **Localized key rename correctly applied.** The key `"com.affine.editor.edgeless-note-header.open-in-page"` replaces the old `"view-in-page"` counterpart, and the German translation remains accurate.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/zh-Hant.json (1)</summary>

`1755-1755`: **Verify i18n key rename and confirm removal of old key**  
The new key `"com.affine.editor.edgeless-note-header.open-in-page"` correctly reflects the component rename. The translation value `"在頁面中查看"` remains appropriate, but please ensure the obsolete key `"com.affine.editor.edgeless-note-header.view-in-page"` has been removed to prevent unused entries.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/uk.json (1)</summary>

`1755-1755`: <details>
<summary>✅ Verification successful</summary>

**Consistent translation key rename.**

The localization key has been correctly updated from `view-in-page` to `open-in-page`, and the Ukrainian string remains accurate.  
Please verify that there are no lingering references to the old key in other locale files.  


---

🏁 Script executed:

```shell
#!/bin/bash
# Verify that no legacy key usage remains across all resource files
rg -R '"com.affine.editor.edgeless-note-header.view-in-page"' -l packages/frontend/i18n/src/resources
```

Length of output: 508

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify that no legacy key usage remains across all resource files
rg '"com.affine.editor.edgeless-note-header.view-in-page"' packages/frontend/i18n/src/resources -l
```

Length of output: 100

---



</details>

**Consistent translation key rename — No lingering references found**

The localization key was correctly updated from `view-in-page` to `open-in-page`, the Ukrainian string remains accurate, and a repository-wide search confirms there are no remaining occurrences of  
`com.affine.editor.edgeless-note-header.view-in-page`.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/es.json (1)</summary>

`1755-1756`: **Key rename is applied correctly; Spanish translation remains appropriate.**  
The localization key has been updated to `"open-in-page"` in line with the UI change, and the Spanish string `"Ver en la página"` still conveys the intended meaning.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/sv-SE.json (1)</summary>

`1755-1755`: **Localization key updated correctly**  
The key has been renamed from `com.affine.editor.edgeless-note-header.view-in-page` to `com.affine.editor.edgeless-note-header.open-in-page`, and the translation `"Visa på sidan"` remains appropriate.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/ja.json (1)</summary>

`1755-1755`: **Correct localization key rename**  
The key `com.affine.editor.edgeless-note-header.open-in-page` aligns with the updated UI terminology and matches the counterparts in other language files.

</details>
<details>
<summary>packages/frontend/i18n/src/resources/en.json (1)</summary>

`1786-1786`: <details>
<summary>✅ Verification successful</summary>

**Renamed localization key to `open-in-page`**  
The English translation text has been updated to match the new key. Please ensure that all UI components and code references now use `"com.affine.editor.edgeless-note-header.open-in-page"` and that the old `"…view-in-page"` entry has been removed to avoid stale strings.

---

🏁 Script executed:

```shell
rg "edgeless-note-header.view-in-page" -n packages/frontend/i18n/src/resources/en.json
```

Length of output: 86

---

🏁 Script executed:

```shell
#!/bin/bash
# Verify that no locale files still contain the old key
rg "\"edgeless-note-header\\.view-in-page\"" -n packages/frontend/i18n/src/resources

# Verify that no code references the old key
rg "com\\.affine\\.editor\\.edgeless-note-header\\.view-in-page" -n packages/frontend

# Verify that code now uses the new key everywhere
rg "com\\.affine\\.editor\\.edgeless-note-header\\.open-in-page" -n packages/frontend
```

Length of output: 2579

---



</details>

**Stale localization key removed and replaced**  
All references to `"…view-in-page"` have been removed and replaced with `"com.affine.editor.edgeless-note-header.open-in-page"`.  
- No occurrences of the old key in any locale files or code  
- New key found in every locale (`i18n/src/resources/*.json`), the generated typings (`i18n/src/i18n.gen.ts`), and the component (`edgeless-note-header.tsx`)

</details>
<details>
<summary>packages/frontend/i18n/src/i18n.gen.ts (1)</summary>

`7174-7174`: **Terminology standardization looks good.**

This change from "view-in-page" to "open-in-page" in the translation key aligns with the broader UI terminology update described in the summary. This standardization improves consistency across the application interface.

</details>
<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx (6)</summary>

`12-12`: **Import updated to match new icon usage.**

The import statement has been updated to use `ExpandFullIcon` instead of the previously used icon. This change aligns with the UI standardization effort across the application.

---

`108-108`: **Component renamed for better terminology consistency.**

Component has been renamed from `ViewInPageButton` to `OpenInPageButton` to standardize terminology across the UI.

---

`112-115`: **Function renamed to match component name.**

The callback function has been renamed from `viewInPage` to `openInPage` to align with the component renaming, while maintaining the same functionality.

---

`121-121`: **Tooltip text updated for consistency.**

The i18n key has been updated from 'view-in-page' to 'open-in-page' to maintain terminology consistency.

---

`125-125`: **Icon updated to better represent the action.**

Changed from `LinkedPageIcon` to `ExpandFullIcon` which better represents the action of opening content in a page view.

---

`168-168`: **Component reference updated.**

Reference to the component in the `EdgelessNoteHeader` has been updated to use the new name.

</details>
<details>
<summary>packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx (4)</summary>

`101-103`: **Improved icon styling with container element.**

The `LinkedPageIcon` is now wrapped in a span with the CSS class `titleIcon`, which improves styling consistency and allows for better layout control.

---

`135-141`: **Component signature updated to support new functionality.**

The `OpenButton` component now accepts an additional `std` parameter of type `BlockStdScope`, which is needed for the integrated `MoreMenu` functionality.

---

`152-169`: **Improved component structure with integrated menu.**

The component has been restructured to:
1. Wrap content in a container div
2. Use a styled button with prefix icon and text
3. Integrate the `MoreMenu` directly within the component

This improves component composition and provides a more cohesive UI experience by grouping related elements together.

---

`270-270`: **Updated component usage with required parameter.**

The usage of `OpenButton` in `EdgelessEmbedSyncedDocHeader` has been updated to include the `std` parameter, which is now required for the integrated menu functionality.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T03:59:57Z
user: login: graphite-app[bot]
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T04:23:15Z
user: login: Saul-Mirone
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-05-07T08:15:49Z

Review comments:
diff_hunk: @@ -1752,7 +1752,7 @@
   "com.affine.editor.bi-directional-link-panel.show": "Εμφάνιση",
   "com.affine.editor.bi-directional-link-panel.hide": "Απόκρυψη",
   "com.affine.editor.edgeless-note-header.fold-page-block": "Σύμπτυξη μπλοκ σελίδας",
-  "com.affine.editor.edgeless-note-header.view-in-page": "Προβολή στη σελίδα",
+  "com.affine.editor.edgeless-note-header.open-in-page": "Προβολή στη σελίδα",
path: packages/frontend/i18n/src/resources/el-GR.json
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Inconsistent translation for "open-in-page" key**  
The key was renamed from `view-in-page` to `open-in-page`, but the Greek string still reads "Προβολή στη σελίδα" ("View in page"). Please update it to use "Άνοιγμα στη σελίδα" ("Open in page") for consistency with the new key.  
Apply this diff:
```diff
-"com.affine.editor.edgeless-note-header.open-in-page": "Προβολή στη σελίδα",
+"com.affine.editor.edgeless-note-header.open-in-page": "Άνοιγμα στη σελίδα",
```  



<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

`````suggestion
  "com.affine.editor.edgeless-note-header.open-in-page": "Άνοιγμα στη σελίδα",
`````

</details>

<!-- suggestion_end -->

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-05-07T03:59:57Z
author_association: CONTRIBUTOR
diff_hunk: @@ -141,21 +149,24 @@ const OpenButton = ({ model }: { model: EmbedSyncedDocModel }) => {
   }, [model.props.pageId, workbench]);
 
   return (
-    <Button
-      className={styles.button}
-      variant="plain"
-      size="custom"
-      onClick={open}
-      prefixStyle={{
-        width: `${styles.iconSize}px`,
-        height: `${styles.iconSize}px`,
-      }}
-      prefix={<ExpandFullIcon />}
-    >
-      <span className={styles.buttonText}>
-        {t['com.affine.editor.edgeless-embed-synced-doc-header.open']()}
-      </span>
-    </Button>
+    <div>
path: packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx
user: login: graphite-app[bot]
body: This new div wrapper is likely causing the test to find more elements than expected. Add a specific data attribute like 'data-testid="open-button-container"' to make it distinguishable from note elements in the test selector.

*Spotted by [Diamond](https://app.graphite.dev/diamond/?org=toeverything&ref=ai-review-comment) (based on CI logs)*<i class='graphite__hidden'><br /><br />Is this helpful? React 👍 or 👎 to let us know.</i>
created_at: 2025-05-07T04:23:14Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-05-07T03:48:37Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

"""
## Walkthrough

This update standardizes the terminology and iconography for the "View in page" functionality, renaming it to "Open in Page" across UI components, code references, and localization files. It also adjusts component structures, updates icon usage, and refines CSS styles for the edgeless block header, ensuring consistency in both appearance and language.

## Changes

| Files / Paths                                                                                                 | Change Summary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
|--------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| blocksuite/affine/blocks/note/src/configs/toolbar.ts                                                          | Replaced the `LinkedPageIcon` with `InsertIntoPageIcon` in the toolbar configuration for the `'b.display-in-page'` action.                                                                                                                                                                                                                                                                                                                                                                         |
| packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts           | Updated styles: added `titleIcon` style, adjusted `titleContainer` padding and margin, set `button` gap to 0, and removed padding from `buttonText`.                                                                                                                                                                                                                                                                                                                                              |
| packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx   | Wrapped `LinkedPageIcon` in a styled `<span>` in `Title`, changed `OpenButton` signature to include `std`, and integrated `MoreMenu` into `OpenButton`. Updated prop passing and removed redundant `MoreMenu` usage.                                                                                                                                                                                                                                      |
| packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx               | Renamed `ViewInPageButton` to `OpenInPageButton`, updated callback and tooltip key, replaced `LinkedPageIcon` with `ExpandFullIcon`, and updated imports and usages accordingly.                                                                                                                                                                                                                                                                             |
| packages/frontend/i18n/src/i18n.gen.ts                                                                        | Renamed i18n interface method from `view-in-page` to `open-in-page` in the return type of `useAFFiNEI18N`.                                                                                                                                                                                                                                                                                                                                                   |
| packages/frontend/i18n/src/resources/ar.json<br>.../de.json<br>.../el-GR.json<br>.../en.json<br>.../es.json<br>.../fa.json<br>.../fr.json<br>.../it-IT.json<br>.../ja.json<br>.../pl.json<br>.../pt-BR.json<br>.../ru.json<br>.../sv-SE.json<br>.../uk.json<br>.../zh-Hans.json<br>.../zh-Hant.json | Renamed the translation key `"com.affine.editor.edgeless-note-header.view-in-page"` to `"com.affine.editor.edgeless-note-header.open-in-page"` in all supported languages. Updated the English value to "Open in Page"; other translations remain unchanged.                                                                                                                    |
| blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts                                       | Removed unused call to `unsafeCSSVarV2('layer/background/linkedDocOnEdgeless')` and added a CSS rule setting `.affine-embed-linked-doc-block` background to the CSS variable `layer/background/primary`.                                                                                                                                                                                                                                                    |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant User
    participant EdgelessNoteHeader
    participant OpenInPageButton
    participant Editor

    User->>EdgelessNoteHeader: Render header
    EdgelessNoteHeader->>OpenInPageButton: Render button
    User->>OpenInPageButton: Click "Open in Page"
    OpenInPageButton->>Editor: Switch mode to "page"
```

## Assessment against linked issues

| Objective                                                      | Addressed | Explanation |
|---------------------------------------------------------------|-----------|-------------|
| UI issues (BS-3400): Standardize "View in page" to "Open in Page" across UI, icons, and translations | ✅        |             |

## Suggested labels

`mod:component`

## Suggested reviewers

- L-Sun

## Poem

> A button once said "View in page,"  
> Now "Open in Page" is all the rage!  
> Icons swapped and styles refined,  
> Translations updated, all aligned.  
> The rabbit hops with cheerful glee—  
> Consistency for all to see!  
> 🐇✨
"""

<!-- walkthrough_end -->


---

<details>
<summary>📜 Recent review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 5118384ed1516e6a17239f662c0f641417c89dbb and 610565e61765384311c19cce5eae069e70dc975e.

</details>

<details>
<summary>📒 Files selected for processing (22)</summary>

* `blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts` (1 hunks)
* `blocksuite/affine/blocks/note/src/configs/toolbar.ts` (2 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts` (2 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx` (4 hunks)
* `packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx` (4 hunks)
* `packages/frontend/i18n/src/i18n.gen.ts` (1 hunks)
* `packages/frontend/i18n/src/resources/ar.json` (1 hunks)
* `packages/frontend/i18n/src/resources/de.json` (1 hunks)
* `packages/frontend/i18n/src/resources/el-GR.json` (1 hunks)
* `packages/frontend/i18n/src/resources/en.json` (1 hunks)
* `packages/frontend/i18n/src/resources/es.json` (1 hunks)
* `packages/frontend/i18n/src/resources/fa.json` (1 hunks)
* `packages/frontend/i18n/src/resources/fr.json` (1 hunks)
* `packages/frontend/i18n/src/resources/it-IT.json` (1 hunks)
* `packages/frontend/i18n/src/resources/ja.json` (1 hunks)
* `packages/frontend/i18n/src/resources/pl.json` (1 hunks)
* `packages/frontend/i18n/src/resources/pt-BR.json` (1 hunks)
* `packages/frontend/i18n/src/resources/ru.json` (1 hunks)
* `packages/frontend/i18n/src/resources/sv-SE.json` (1 hunks)
* `packages/frontend/i18n/src/resources/uk.json` (1 hunks)
* `packages/frontend/i18n/src/resources/zh-Hans.json` (1 hunks)
* `packages/frontend/i18n/src/resources/zh-Hant.json` (1 hunks)

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (8)</summary>

* packages/frontend/i18n/src/resources/pt-BR.json
* packages/frontend/i18n/src/resources/it-IT.json
* packages/frontend/i18n/src/resources/es.json
* packages/frontend/i18n/src/resources/de.json
* packages/frontend/i18n/src/resources/fa.json
* packages/frontend/i18n/src/resources/en.json
* packages/frontend/i18n/src/resources/zh-Hans.json
* packages/frontend/i18n/src/resources/sv-SE.json

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (14)</summary>

* blocksuite/affine/blocks/note/src/configs/toolbar.ts
* packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-note-header.tsx
* packages/frontend/i18n/src/resources/pl.json
* packages/frontend/i18n/src/resources/ja.json
* packages/frontend/i18n/src/resources/fr.json
* packages/frontend/i18n/src/resources/ru.json
* blocksuite/affine/blocks/embed-doc/src/embed-linked-doc-block/styles.ts
* packages/frontend/i18n/src/resources/zh-Hant.json
* packages/frontend/i18n/src/resources/el-GR.json
* packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-block-header.css.ts
* packages/frontend/core/src/blocksuite/extensions/edgeless-block-header/edgeless-embed-synced-doc-header.tsx
* packages/frontend/i18n/src/resources/uk.json
* packages/frontend/i18n/src/resources/ar.json
* packages/frontend/i18n/src/i18n.gen.ts

</details>

</details>
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIGWHx/AAo6dQSASi40WiFsRFCSZgEoxFkMBijafAZIbHhoyAB3NGQHAWZ1Gno5MNgPXMpIABkwAGVsLEx6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lxdEW9CkdhlMW79SCuTqIroArLF0CyuQ+O+eAp/h2lIUarGnDAm1L6kkEy2VxYMkERuKYc8CeTKjnJSdisOKC8iYTPqn+1iSFzS9CRyTDIR4wEXOsisXGDCFsQtuEYHGWcBxkdgiQTSMGkxRsRuQd4JSP8i8VMEqgUeDACRUOyaRliLUUIDWm9y+5cgY4VkEzEERW54geADENcH2iW40wdFUgD1BGivBEWzqHynbj8DeAmOlhMgrJy1JglSlOpXnHZj5QuYxACQP1F7RMI0ceEBSrkEUvGBl4fC36C+eMvtwFpJQxaeRHkqcx7KDl/yXgFmhcDiICwxuZJaAhIBpKMlFALJc0lh6a10MS+KZY830rVBxINzUkYotOV3TSxTs2+c9OrFYSv4+8S5CPBPjdjL4nNbVLfHxmPw14Q+TeGoDfi7xP4BgFFTnHUAAB9GYIgEpXRxEydASlSqHZgfxkVg8dAAAE4OVAAdh1R0BqQJAEgJSFpBkQ0AQq14NSFeBoA0AOwWkJSAEA6pCItALYAwG5WUh9g0IQiKyrJXsqlAJALYIRHmCUgxqtAeYLSAYD7BaQyq+YDsAYC0gtgAgBgLKtpDUhKQhEeVTsEIjkR5gWwLENqpRWEQtgY1SkDqgFXKrA1+wEgPsDQBbBuVOwSkByvmD7BDgdqpNdSC2DpruVDAHVBytoCqB/V7K/YFsFpCEQiIUa2NURBDWuqg1DALYByqogkBCIZEEgLSH2AcqSA3Kq1QwB5VNrtVOqiABwXaC4BqVtAWlfStjiMrh4rKoAA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=toeverything/AFFiNE&utm_content=12162):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

### Support

Need help? Create a ticket on our [support page](https://www.coderabbit.ai/contact-us/support) for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: L-Sun
created_at: 2025-05-07T03:48:46Z
body: * **#12165** <a href="https://app.graphite.dev/github/pr/toeverything/AFFiNE/12165?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#12163** <a href="https://app.graphite.dev/github/pr/toeverything/AFFiNE/12163?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a>
* **#12162** <a href="https://app.graphite.dev/github/pr/toeverything/AFFiNE/12162?utm_source=stack-comment-icon" target="_blank"><img src="https://static.graphite.dev/graphite-32x32-black.png" alt="Graphite" width="10px" height="10px"/></a> 👈 <a href="https://app.graphite.dev/github/pr/toeverything/AFFiNE/12162?utm_source=stack-comment-view-in-graphite" target="_blank">(View in Graphite)</a>
* `canary`
<hr />

## How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:
- <kbd>merge</kbd> - adds this PR to the back of the merge queue
- <kbd>hotfix</kbd> - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using [this link](https://app.graphite.dev/invite/github/toeverything?ref=merge-queue-instructions-in-stack-comment&prId=12162).

<h2></h2>
<sub>

An organization admin has enabled the [Graphite Merge Queue](https://graphite.dev/docs/graphite-merge-queue) in this repository.

</sub>

<sub>

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

</sub>

<h2></h2>

This stack of pull requests is managed by <a href="https://graphite.dev?utm-source=stack-comment"><b>Graphite</b></a>. Learn more about <a href="https://stacking.dev/?utm_source=stack-comment">stacking</a>.
<!-- Current dependencies on/for this PR: -->
author_association: MEMBER
user: login: codecov[bot]
created_at: 2025-05-07T03:57:43Z
body: ## [Codecov](https://app.codecov.io/gh/toeverything/AFFiNE/pull/12162?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 53.86%. Comparing base [(`4c56b68`)](https://app.codecov.io/gh/toeverything/AFFiNE/commit/4c56b685a1f574ae8263d6ccc458057df4969f9b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) to head [(`610565e`)](https://app.codecov.io/gh/toeverything/AFFiNE/commit/610565e61765384311c19cce5eae069e70dc975e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything).
> Report is 1 commits behind head on canary.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           canary   #12162      +/-   ##
==========================================
- Coverage   53.86%   53.86%   -0.01%     
==========================================
  Files        2669     2669              
  Lines      118379   118378       -1     
  Branches    19141    19141              
==========================================
- Hits        63763    63762       -1     
+ Misses      53067    52557     -510     
- Partials     1549     2059     +510     
```

| [Flag](https://app.codecov.io/gh/toeverything/AFFiNE/pull/12162/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | Coverage Δ | |
|---|---|---|
| [server-test](https://app.codecov.io/gh/toeverything/AFFiNE/pull/12162/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | `77.79% <ø> (ø)` | |
| [unittest](https://app.codecov.io/gh/toeverything/AFFiNE/pull/12162/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything) | `30.94% <ø> (+<0.01%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/toeverything/AFFiNE/pull/12162?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=toeverything).

<details><summary> :rocket: New features to boost your workflow: </summary>

- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
author_association: NONE
user: login: graphite-app[bot]
created_at: 2025-05-07T08:31:35Z
body: ### Merge activity

* **May 7, 4:31 AM EDT**: `L-Sun` added this pull request to the [Graphite merge queue](https://app.graphite.dev/merges?org=toeverything&repo=AFFiNE).
* **May 7, 4:49 AM EDT**: Merged by the [Graphite merge queue](https://app.graphite.dev/merges?org=toeverything&repo=AFFiNE).

author_association: CONTRIBUTOR