Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to
### Added

- ✨(frontend) add local history grouping controls and test checkpoints
- ✨(frontend) add a debug choice for experimental version diff fixes
- 👷(ci) lint, typecheck, build and test the collaboration server (yhub)
- 👷(ci) check the load-test tooling: swarm, canary, k6 and dashboards
- 👷(ci) cancel the superseded runs of a pull request
Expand Down Expand Up @@ -82,7 +83,7 @@ and this project adheres to
### Changed

- 🛂(backend) let users allowed to comment list each other's accesses #2447
- ⬆️(frontend) update BlockNote preview packages to 8d235ba9eb
- ⬆️(frontend) update BlockNote preview packages to bb192fe8fc
- ♻️(frontend) restore bounded editor history through native yhub rollback
- ♻️(frontend) use standalone YHub version storage and history extension
- ♻️(frontend) migrate the history panel to RenderInPortalElement
Expand Down
22 changes: 11 additions & 11 deletions src/frontend/apps/impress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@
"dependencies": {
"@ag-media/react-pdf-table": "2.0.3",
"@ai-sdk/openai": "3.0.119",
"@blocknote/code-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@8d235ba9eb",
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@8d235ba9eb",
"@blocknote/diagram-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/diagram-block@8d235ba9eb",
"@blocknote/mantine": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@8d235ba9eb",
"@blocknote/math-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/math-block@8d235ba9eb",
"@blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@8d235ba9eb",
"@blocknote/xl-ai": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@8d235ba9eb",
"@blocknote/xl-docx-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@8d235ba9eb",
"@blocknote/xl-multi-column": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@8d235ba9eb",
"@blocknote/xl-odt-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@8d235ba9eb",
"@blocknote/xl-pdf-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@8d235ba9eb",
"@blocknote/code-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@bb192fe8fc",
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@bb192fe8fc",
"@blocknote/diagram-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/diagram-block@bb192fe8fc",
"@blocknote/mantine": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@bb192fe8fc",
"@blocknote/math-block": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/math-block@bb192fe8fc",
"@blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@bb192fe8fc",
"@blocknote/xl-ai": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@bb192fe8fc",
"@blocknote/xl-docx-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@bb192fe8fc",
"@blocknote/xl-multi-column": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@bb192fe8fc",
"@blocknote/xl-odt-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@bb192fe8fc",
"@blocknote/xl-pdf-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@bb192fe8fc",
"@dnd-kit/core": "6.3.1",
"@dnd-kit/modifiers": "9.0.0",
"@emoji-mart/data": "1.2.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import { CommentsExtension } from '@blocknote/core/comments';
import { type VersioningController } from '@blocknote/core/extensions';
import '@blocknote/core/fonts/inter.css';
import * as localesBN from '@blocknote/core/locales';
import { YVersioningExtension, withCollaboration } from '@blocknote/core/y';
import {
type ExperimentalVersionDiffs,
YVersioningExtension,
withCollaboration,
} from '@blocknote/core/y';
import {
createReactDiagramBlockSpec,
locales as diagramLocales,
Expand All @@ -30,7 +34,7 @@ import {
import { FindAndReplace } from '@tiptap/extension-find-and-replace';
import { WebsocketProvider } from '@y/websocket';
import * as Y from '@y/y';
import { useEffect, useMemo, useRef } from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
import { useTranslation } from 'react-i18next';

Expand Down Expand Up @@ -163,6 +167,9 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
const historyDebugSettings = useRef<HistoryDebugSettings | undefined>(
undefined,
);
// The editor reads these once, so changing them recreates it.
const [experimentalDiffs, setExperimentalDiffs] =
useState<ExperimentalVersionDiffs>({});
const historyDefaults = {
groupMaxGap: versionGranularityMs,
groupMaxDuration: versionGranularityMs,
Expand Down Expand Up @@ -284,6 +291,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
return cursorElement;
},
showCursorLabels: showCursorLabels as 'always' | 'activity',
experimental: experimentalDiffs,
},
dropCursor: {
color: 'var(--c--contextuals--background--semantic--brand--tertiary)',
Expand Down Expand Up @@ -381,6 +389,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
aiExtension,
cursorName,
docUserStore,
experimentalDiffs,
langLocalesBN,
langLocalesBNMultiColumn,
langLocalesBNAI,
Expand Down Expand Up @@ -465,6 +474,8 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
defaults: historyDefaults,
initialSettings: historyDebugSettings.current ?? historyDefaults,
canCreate: !!doc.abilities.partial_update,
experimental: experimentalDiffs,
onExperimentalChange: setExperimentalDiffs,
onApply: async (settings) => {
historyDebugSettings.current = settings;
const mode =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { type VersionOperationResult } from '@blocknote/core/extensions';
import {
type ExperimentalVersionDiffs,
type VersionDiffFixes,
} from '@blocknote/core/y';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';

Expand All @@ -19,6 +23,8 @@ interface Props {
defaults: HistoryDebugSettings;
initialSettings: HistoryDebugSettings;
canCreate: boolean;
experimental: ExperimentalVersionDiffs;
onExperimentalChange: (experimental: ExperimentalVersionDiffs) => void;
onDismiss: () => void;
onApply: (settings: HistoryDebugSettings) => Promise<VersionOperationResult>;
onCreate: () => Promise<VersionOperationResult>;
Expand All @@ -29,6 +35,8 @@ export const VersionHistoryDebug = ({
defaults,
initialSettings,
canCreate,
experimental,
onExperimentalChange,
onDismiss,
onApply,
onCreate,
Expand All @@ -38,6 +46,20 @@ export const VersionHistoryDebug = ({
const [unit, setUnit] = useState(60_000);
const [busy, setBusy] = useState(false);
const [message, setMessage] = useState('');
const diffFixOptions: {
value: VersionDiffFixes | undefined;
label: string;
}[] = [
{ value: undefined, label: t('Default') },
{
value: 'implicitDeleteAttribution',
label: t('Implicit delete attribution'),
},
{
value: 'implicitDeleteAttributionAndRecreatedBlocks',
label: t('+ re-created blocks'),
},
];
const valid =
Number.isSafeInteger(settings.groupMaxGap) &&
settings.groupMaxGap > 0 &&
Expand Down Expand Up @@ -184,6 +206,11 @@ export const VersionHistoryDebug = ({
color: var(--c--contextuals--content--semantic--neutral--secondary);
}
.debug-checkpoint small { margin-top: 8px; }
.debug-experimental {
border-top: 1px solid var(--c--contextuals--border--surface--primary);
padding-top: 14px;
}
.debug-experimental { display: flex; flex-direction: column; gap: 6px; }
[role='status']:not(:empty) {
margin-top: 12px;
padding: 8px 10px;
Expand Down Expand Up @@ -334,6 +361,32 @@ export const VersionHistoryDebug = ({
{t('Local settings. Test versions are saved to the document.')}
</small>
</div>
<div className="debug-experimental">
<label htmlFor="history-debug-diff-fixes">
{t('Version diff fixes')}
</label>
<select
id="history-debug-diff-fixes"
value={experimental.versionDiffFixes ?? ''}
onChange={(event) =>
onExperimentalChange({
...experimental,
versionDiffFixes: diffFixOptions.find(
({ value }) => (value ?? '') === event.target.value,
)?.value,
})
}
>
{diffFixOptions.map(({ value, label }) => (
<option key={label} value={value ?? ''}>
{label}
</option>
))}
</select>
<small>
{t('Experimental. Changing this reloads the editor.')}
</small>
</div>
</Box>
</fieldset>
<small role="status" aria-live="polite">
Expand Down
12 changes: 6 additions & 6 deletions src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@
"react": "19.3.0",
"react-dom": "19.3.0",
"serialize-javascript": "7.1.2",
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@8d235ba9eb",
"@blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@8d235ba9eb",
"@blocknote/xl-multi-column": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@8d235ba9eb",
"@blocknote/xl-docx-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@8d235ba9eb",
"@blocknote/xl-odt-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@8d235ba9eb",
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@bb192fe8fc",
"@blocknote/react": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@bb192fe8fc",
"@blocknote/xl-multi-column": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@bb192fe8fc",
"@blocknote/xl-docx-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@bb192fe8fc",
"@blocknote/xl-odt-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@bb192fe8fc",
"@blocknote/xl-typst-compiler": "0.55.0",
"@blocknote/xl-typst-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-typst-exporter@8d235ba9eb",
"@blocknote/xl-typst-exporter": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-typst-exporter@bb192fe8fc",
"sharp": "0.35.4",
"typescript": "6.0.3",
"wrap-ansi": "10.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/frontend/servers/y-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"node": ">=22"
},
"dependencies": {
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@8d235ba9eb",
"@blocknote/server-util": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@8d235ba9eb",
"@blocknote/core": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@bb192fe8fc",
"@blocknote/server-util": "https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@bb192fe8fc",
"@sentry/node": "10.75.0",
"@sentry/profiling-node": "10.75.0",
"@tiptap/extensions": "*",
Expand Down
Loading
Loading