Skip to content

feat: 调整图表容器的尺寸计算逻辑以支持动态索引 #225

feat: 调整图表容器的尺寸计算逻辑以支持动态索引

feat: 调整图表容器的尺寸计算逻辑以支持动态索引 #225

Triggered via push January 13, 2025 10:16
Status Failure
Total duration 2m 42s
Artifacts

codecov.yml

on: push
Run tests and collect coverage
2m 31s
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/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 @@ -4762,110 +4762,116 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg +
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 @@ -874,427 +874,440 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - 样本数据 - </div> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" - > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64
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 @@ -5985,86 +5985,92 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64 896 896" + width="1em" + > + <path + d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" + /> + </svg> + </span> </span> -
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 @@ -6904,110 +6904,116 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64 896 896" + width="1em" + > + <path + d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.
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> @@ -6244,86 +6245,92 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" -
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 @@ -5414,86 +5414,92 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64 896 896" + width="1em" +
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 @@ -4932,86 +4932,92 @@ > <div contenteditable="false" style="user-select: none; border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - /> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" + /> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" > - 条形图 <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 条形图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" +
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/max-chart.tsx > renders src/MarkdownEditor/demos/max-chart.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/max-chart.tsx > renders src/MarkdownEditor/demos/max-chart.tsx correctly 1` mismatched - Expected + Received @@ -246324,4337 +246324,4413 @@ > <div contenteditable="false" style="border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1; user-select: none;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - > - mytab 底纹词 - </div> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" > - 折线图 + mytab 底纹词 + </div> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" + > <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 折线图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64 896 896" + width="1em"
tests/demo/demo.test.tsx > Rendering demo: src/MarkdownEditor/demos/bug.tsx > renders src/MarkdownEditor/demos/bug.tsx correctly: tests/demo/demo.test.tsx#L31
Error: Snapshot `Rendering demo: src/MarkdownEditor/demos/bug.tsx > renders src/MarkdownEditor/demos/bug.tsx correctly 1` mismatched - Expected + Received @@ -247999,4337 +247999,4413 @@ > <div contenteditable="false" style="border: 1px solid #eee; border-radius: 18px; margin: auto; min-width: calc(50% - 16px); flex: 1; user-select: none;" > - <div - contenteditable="false" - style="user-select: none;" - > + <div> <div - class="ant-chart-attr-toolbar" contenteditable="false" - style="width: auto;" + style="user-select: none;" > <div - style="flex: 1; font-weight: bold;" - > - mytab 底纹词 - </div> - <div - class="ant-chart-attr-toolbar-item" - style="padding: 0px;" + class="ant-chart-attr-toolbar" + contenteditable="false" + style="width: auto;" > - <span - class="ant-dropdown-trigger" - style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" + <div + style="flex: 1; font-weight: bold;" > - 折线图 + mytab 底纹词 + </div> + <div + class="ant-chart-attr-toolbar-item" + style="padding: 0px;" + > <span - aria-label="down" - class="anticon anticon-down" - role="img" - style="font-size: 8px;" + class="ant-dropdown-trigger" + style="font-size: 12px; display: flex; align-items: center; gap: 4px; border: 1px solid #f0f0f0; padding: 4px 12px; border-radius: 14px;" > - <svg - aria-hidden="true" - data-icon="down" - fill="currentColor" - focusable="false" - height="1em" - viewBox="64 64 896 896" - width="1em" + 折线图 + <span + aria-label="down" + class="anticon anticon-down" + role="img" + style="font-size: 8px;" > - <path - d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" - /> - </svg> + <svg + aria-hidden="true" + data-icon="down" + fill="currentColor" + focusable="false" + height="1em" + viewBox="64 64 896 896" + width="1em" +
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