mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-26 19:45:01 +02:00
✨(frontend) Scroll to linked block when read-only
Make the "Copy link to block" scroll for users with Read-only permissions. Signed-off-by: BOUKERFA Mohamed El Amine <boukerfa.ma@gmail.com>
This commit is contained in:
@@ -23,6 +23,7 @@ and this project adheres to
|
||||
|
||||
- 🐛(backend) skip session creation for the liveness probe
|
||||
- 🐛(frontend) preserve page titles when adding an emoji #2586
|
||||
- 🐛(frontend) scroll to the linked block in read-only documents #2663
|
||||
- 🐛(frontend) hide the selection highlight on presenter images #2665
|
||||
- 🐛(y-provider) prevent process crash on malformed websocket frames #2673
|
||||
- 🐛(docker) pull minio images from quay.io #2675
|
||||
|
||||
@@ -5,7 +5,7 @@ import cs from 'convert-stream';
|
||||
|
||||
import { createDoc, goToGridDoc, verifyDocName } from './utils-common';
|
||||
import { getEditor, openSuggestionMenu, writeInEditor } from './utils-editor';
|
||||
import { updateShareLink } from './utils-share';
|
||||
import { connectOtherUserToDoc, updateShareLink } from './utils-share';
|
||||
import {
|
||||
createRootSubPage,
|
||||
getTreeRow,
|
||||
@@ -744,6 +744,21 @@ test.describe('Doc Editor', () => {
|
||||
await page.goto(clipboardContent);
|
||||
await expect(editor.getByText('First Block')).not.toBeInViewport();
|
||||
await expect(editor.getByText('My Block')).toBeInViewport();
|
||||
|
||||
await page.getByRole('button', { name: 'Share' }).click();
|
||||
await updateShareLink(page, 'Public', 'Reading');
|
||||
|
||||
// Check link on read-only view for another user
|
||||
const { otherPage, cleanup } = await connectOtherUserToDoc({
|
||||
browserName,
|
||||
docUrl: clipboardContent,
|
||||
withoutSignIn: true,
|
||||
});
|
||||
|
||||
await expect(otherPage.getByText('First Block')).not.toBeInViewport();
|
||||
await expect(otherPage.getByText('My Block')).toBeInViewport();
|
||||
|
||||
await cleanup();
|
||||
});
|
||||
|
||||
test('it checks "Equation block" feature', async ({ page, browserName }) => {
|
||||
|
||||
@@ -419,6 +419,8 @@ export const BlockNoteReader = ({
|
||||
|
||||
useHeadings(editor);
|
||||
|
||||
useScrollToBlockAnchor();
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<DocsEditorStyle />
|
||||
|
||||
Reference in New Issue
Block a user