feat(creator-studio): bottom status bar, editor-rendered math/footnote, code language picker, block delete
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6928127bfa
commit
4a119358ca
11 files changed
+754
-63
No files matched your search
@@ -176,14 +176,16 @@ test('fixed top toolbar has TinyMCE formatting, media, and extension actions', (
|
||||
assert.match(appSource, /onInsertBlock=\{insertBlock\}/);
|
||||
assert.match(appSource, /onInsertQuote=\{insertQuote\}/);
|
||||
const markup = read('assets/creator-studio/src/utils/block-markup.ts');
|
||||
assert.match(markup, /jio_math/);
|
||||
assert.match(markup, /jio-math/);
|
||||
// 引用沿用主题的 quote_q 结构与配色类。
|
||||
assert.match(markup, /quote_q/);
|
||||
assert.match(markup, /qe_wzk_c-red/);
|
||||
// 公式与注释用短代码落库,由服务端保证渲染。
|
||||
assert.doesNotMatch(markup, /E = mc\^2/);
|
||||
assert.match(markup, /\[jio_math display="1"\]/);
|
||||
assert.match(markup, /\[jio_footnote\]/);
|
||||
// 编辑器展示渲染结果,序列化时再换回短代码。
|
||||
assert.match(markup, /data-jio-math-source/);
|
||||
assert.match(read('assets/creator-studio/src/utils/serialize.ts'), /\[jio_math display=/);
|
||||
assert.match(read('assets/creator-studio/src/utils/serialize.ts'), /\[jio_footnote\]/);
|
||||
assert.match(markup, /\[jio_toc\]/);
|
||||
// 代码块角标不再输出固定「高亮代码」文案。
|
||||
assert.doesNotMatch(read('assets/css/frontend/pages/submit-editor.css'), /高亮代码/);
|
||||
@@ -204,9 +206,17 @@ test('fixed top toolbar has TinyMCE formatting, media, and extension actions', (
|
||||
// 工具栏按钮统一为「图标在上、文字在下」。
|
||||
assert.match(editorToolbar, /jio-creator__tool-label/);
|
||||
assert.match(read('assets/creator-studio/src/styles/studio.scss'), /\.jio-creator__tool-btn\s*\{[\s\S]*?flex-direction:\s*column/);
|
||||
assert.match(appSource, /保存草稿/);
|
||||
assert.match(appSource, /<SaveState value=\{saveState\}/);
|
||||
// 保存 / 预览 / 发布固定在底部状态栏,顶栏只保留工具。
|
||||
assert.match(appSource, /<StatusBar/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /保存草稿/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /预览/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /字数/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /Markdown 语法输入中/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /<SaveState value=\{saveState\}/);
|
||||
assert.match(appSource, /draftRef\.current\.postId/);
|
||||
const barStyles = read('assets/creator-studio/src/styles/_block-tools.scss');
|
||||
assert.match(barStyles, /\.jio-creator__status\s*\{[\s\S]*?position:\s*fixed/);
|
||||
assert.match(barStyles, /\.jio-creator__status\s*\{[\s\S]*?bottom:\s*0/);
|
||||
assert.match(editorToolbar, /role="toolbar"/);
|
||||
assert.match(read('assets/creator-studio/src/styles/studio.scss'), /\.jio-creator__bar\s*\{[^}]*position:\s*fixed/);
|
||||
assert.match(read('assets/creator-studio/src/styles/studio.scss'), /\.jio-creator\s*\{[\s\S]*?padding-top:\s*var\(--jc-bar\)/);
|
||||
@@ -289,9 +299,8 @@ test('the writing card has no author strip above the title', () => {
|
||||
assert.doesNotMatch(read('assets/creator-studio/src/styles/studio.scss'), /jio-creator__author/);
|
||||
});
|
||||
|
||||
test('the writing surface has no character or reading-time footer', () => {
|
||||
test('character count lives in the fixed bottom bar, not a reading-time footer', () => {
|
||||
assert.doesNotMatch(appSource, /jio-creator__footer/);
|
||||
assert.doesNotMatch(appSource, /分钟阅读/);
|
||||
assert.doesNotMatch(appSource, /charCount/);
|
||||
assert.doesNotMatch(read('assets/creator-studio/src/styles/studio.scss'), /\.jio-creator__footer/);
|
||||
assert.match(read('assets/creator-studio/src/components/status-bar.tsx'), /字数/);
|
||||
});
|
||||
Reference in new issue
Block a user