Skip to content

优化表格组件样式,调整选中单元格背景色及过渡效果,修复滚动事件处理逻辑 (#30) #230

优化表格组件样式,调整选中单元格背景色及过渡效果,修复滚动事件处理逻辑 (#30)

优化表格组件样式,调整选中单元格背景色及过渡效果,修复滚动事件处理逻辑 (#30) #230

Triggered via push January 14, 2025 15:59
Status Failure
Total duration 2m 50s
Artifacts

codecov.yml

on: push
Run tests and collect coverage
2m 34s
Run tests and collect coverage
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/test.tsx > renders src/MarkdownEditor/demos/test.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/test.tsx > renders src/MarkdownEditor/demos/test.tsx correctly 1` mismatched ❯ tests/demo/demo.test.tsx:31:11
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/render.tsx > renders src/MarkdownEditor/demos/render.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/render.tsx > renders src/MarkdownEditor/demos/render.tsx correctly 1` mismatched - Expected + Received @@ -350,12 +350,11 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" > <span class="ant-md-editor-drag-handle" contenteditable="false" > @@ -381,3087 +380,3220 @@ /> </svg> </span> </div> </span> + </div> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" + > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + />
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/readonly.tsx > renders src/MarkdownEditor/demos/readonly.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/readonly.tsx > renders src/MarkdownEditor/demos/readonly.tsx correctly 1` mismatched - Expected + Received @@ -7505,1416 +7505,1537 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" > - <table - style="border-collapse: collapse; border-spacing: 0;" + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-ac
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/pure.tsx > renders src/MarkdownEditor/demos/pure.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/pure.tsx > renders src/MarkdownEditor/demos/pure.tsx correctly 1` mismatched - Expected + Received @@ -722,3090 +722,3221 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + </div> + <div + class="col-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: relative; display: flex; height: 16px; z-index: 100; transform: translateX(0px);" + > + <div + class="table-side-div ignore-toggle-readonly none-active " +
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/preview.tsx > renders src/MarkdownEditor/demos/preview.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/preview.tsx > renders src/MarkdownEditor/demos/preview.tsx correctly 1` mismatched - Expected + Received @@ -17,116 +17,10 @@ role="textbox" spellcheck="false" style="position: relative; white-space: pre-wrap; word-wrap: break-word; font-size: 16px;" zindex="-1" > - <h1 - class="ant-md-editor-drag-el" - data-be="head" - data-head="腾讯研究报告" - data-slate-node="element" - data-title="true" - id="腾讯研究报告" - > - <span - class="ant-md-editor-drag-handle" - contenteditable="false" - > - <div - class="ant-md-editor-drag-icon" - > - <span - aria-label="holder" - class="anticon anticon-holder" - role="img" - > - <svg - aria-hidden="true" - data-icon="holder" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" - > - <path - d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" - /> - </svg> - </span> - </div> - </span> - <span - data-slate-node="text" - > - <span - class=" " - data-be="text" - data-slate-leaf="true" - draggable="false" - > - <span - data-slate-string="true" - > - 腾讯研究报告 - </span> - </span> - </span> - </h1> - <h2 - class="ant-md-editor-drag-el" - data-be="head" - data-head="创始人" - data-slate-node="element" - data-title="false" - id="创始人" - > - <span - class="ant-md-editor-drag-handle" - contenteditable="false" - > - <div - class="ant-md-editor-drag-icon" - > - <span - aria-label="holder" - class="anticon anticon-holder" - role="img" - > - <svg - aria-hidden="true" - data-icon="holder" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" - > - <path - d="M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z" - /> - </svg> - </span> - </div> - </span> - <span - data-slate-node="text" - > - <span - class=" " - data-be="text" - data-slate-leaf="true" - draggable="false" - > - <span - data-slate-string="true" - > - 创始人 - </span> - </span> - </span> - </h2> <p class="ant-md-editor-drag-el" data-be="paragraph" data-slate-node="element" > @@ -168,97 +62,15 @@ draggable="false" > <span data-slate-string="true"
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/ppt.tsx > renders src/MarkdownEditor/demos/ppt.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/ppt.tsx > renders src/MarkdownEditor/demos/ppt.tsx correctly 1` mismatched - Expected + Received @@ -1,43 +1,44 @@ <DocumentFragment> <div aria-label="segmented control" class="ant-segmented" - role="listbox" + role="radiogroup" style="position: fixed; z-index: 1000; top: 0px;" + tabindex="0" > <div class="ant-segmented-group" > <label class="ant-segmented-item ant-segmented-item-selected" > <input checked="" class="ant-segmented-item-input" + name="test-id" type="radio" /> <div aria-selected="true" class="ant-segmented-item-label" - role="option" title="编辑模式" > 编辑模式 </div> </label> <label class="ant-segmented-item" > <input class="ant-segmented-item-input" + name="test-id" type="radio" /> <div aria-selected="false" class="ant-segmented-item-label" - role="option" title="幻灯片模式" > 幻灯片模式 </div> </label> @@ -912,3090 +913,3221 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: r
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/minPreview.tsx > renders src/MarkdownEditor/demos/minPreview.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/minPreview.tsx > renders src/MarkdownEditor/demos/minPreview.tsx correctly 1` mismatched - Expected + Received @@ -150,3090 +150,3221 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relat
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/min.tsx > renders src/MarkdownEditor/demos/min.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/min.tsx > renders src/MarkdownEditor/demos/min.tsx correctly 1` mismatched - Expected + Received @@ -232,3090 +232,3221 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/min-render.tsx > renders src/MarkdownEditor/demos/min-render.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/min-render.tsx > renders src/MarkdownEditor/demos/min-render.tsx correctly 1` mismatched - Expected + Received @@ -209,3090 +209,3221 @@ data-be="table" data-slate-node="element" style="display: flex; gap: 1px; max-width: 100%; min-width: 0; margin-bottom: 12px;" > <div - class="ant-md-editor-drag-el ant-md-editor-table ant-md-editor-content-table" - style="max-width: 100%; width: 100%; border: 1px solid #e8e8e8; border-radius: 16px; display: flex; min-width: 0; box-shadow: none;" + class="ant-md-editor-drag-el" + /> + <div + class="ant-md-editor-table ant-md-editor-content-table " + style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0; margin-left: 20px; margin-top: 4px; margin-right: 6px;" > <div - style="width: 100%; max-width: 100%; overflow: auto; flex: 1; min-width: 0;" + data-slate-editor="false" + style="visibility: hidden; overflow: hidden;" + > + <div + class="intersection-point ignore-toggle-readonly " + contenteditable="false" + style="display: flex; z-index: 102;" + /> + <div + class="row-div-bar-inner ignore-toggle-readonly" + contenteditable="false" + style="position: absolute; display: block; border-bottom: 1px solid #DFDFDF; z-index: 100; width: 14px; margin-top: 15.5px; margin-left: -16px;" + > + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-side-div ignore-toggle-readonly none-active " + contenteditable="false" + style="position: relative; width: 14px; height: -1px;" + /> + <div + class="table-
Run tests and collect coverage
Process completed with exit code 1.
Run tests and collect coverage
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636