Skip to content

Commit 0baa85d

Browse files
authored
fix(bundle): fix circular deps (#1061)
1 parent 1793ead commit 0baa85d

5 files changed

Lines changed: 9 additions & 8 deletions

File tree

demo/tests/visual-tests/YfmExtensions.visual.test.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,10 @@ test.describe('Extensions, YFM', () => {
2323
await mount(<YFMStories.YfmTabs />);
2424
await expectScreenshot();
2525
});
26-
test('YFM HTML', async ({mount, expectScreenshot, page, wait}) => {
26+
test('YFM HTML', async ({mount, expectScreenshot, wait}) => {
2727
await mount(<YFMStories.YfmHtmlBlock />);
2828

29-
// TODO: @makhnatkin Improve iframe height stabilization wait
30-
await page.waitForTimeout(200);
31-
await wait.markupRendered();
29+
await wait.markupRendered(1000, 3);
3230
await expectScreenshot();
3331
});
3432
test('YFM File', async ({mount, expectScreenshot}) => {

packages/editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"test:cov": "jest --coverage",
2727
"test:watch": "jest --watchAll",
2828
"test:esbuild": "node tests/esbuild-test/esbuild-tester.js",
29-
"test:circular-deps": "node scripts/check-circular-deps.js 1",
29+
"test:circular-deps": "node scripts/check-circular-deps.js 0",
3030
"prepack": "cp ../../README.md ./README.md",
3131
"postpack": "rm -f ./README.md",
3232
"prepublishOnly": "pnpm run lint && pnpm run clean && pnpm run build"

packages/editor/src/bundle/HorizontalDrag.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {useCallback, useEffect, useRef, useState} from 'react';
33
import {clamp} from '../lodash';
44

55
import type {EditorInt} from './Editor';
6-
import {cnEditorComponent} from './MarkdownEditorView';
6+
import {cnEditorComponent} from './editor-classname';
77

88
export const IN_RESIZE_CLASSNAME = 'in-resize';
99

packages/editor/src/bundle/MarkdownEditorView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {type QAProps, useToaster} from '@gravity-ui/uikit';
1212
import {ErrorBoundary} from 'react-error-boundary';
1313
import {useEnsuredForwardedRef, useKey, useUpdate} from 'react-use';
1414

15-
import {type ClassNameProps, cn} from '../classname';
15+
import type {ClassNameProps} from '../classname';
1616
import {i18n} from '../i18n/bundle';
1717
import {globalLogger} from '../logger';
1818
import type {ToolbarsPreset} from '../modules/toolbars/types';
@@ -25,6 +25,7 @@ import {MarkupEditorView} from './MarkupEditorView';
2525
import {SplitModeView} from './SplitModeView';
2626
import {WysiwygEditorView} from './WysiwygEditorView';
2727
import {useMarkdownEditorContext} from './context';
28+
import {cnEditorComponent} from './editor-classname';
2829
import {EditorSettings, type EditorSettingsProps, type SettingItems} from './settings';
2930
import {stickyCn} from './sticky';
3031
import type {MToolbarData, MToolbarItemData, WToolbarData, WToolbarItemData} from './toolbar/types';
@@ -34,7 +35,6 @@ import type {MarkdownEditorMode} from './types';
3435
import '../styles/styles.scss';
3536
import './MarkdownEditorView.scss'; // eslint-disable-line import/order
3637

37-
export const cnEditorComponent = cn('editor-component');
3838
const b = cnEditorComponent;
3939

4040
interface EditorWrapperProps extends QAProps, ToolbarConfigs, Omit<ViewProps, 'editor'> {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import {cn} from '../classname';
2+
3+
export const cnEditorComponent = cn('editor-component');

0 commit comments

Comments
 (0)