fix: simple table width (#6918)

* fix: adjust min width

* fix: adjust simple table font size

* fix: do not need to run rust-ci and docker-ci when web codes have been changed
This commit is contained in:
Kilu.He 2024-12-04 16:16:48 +08:00 committed by GitHub
parent 03c84ff8b5
commit 5cf6617231
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 32 additions and 10 deletions

View file

@ -2,9 +2,9 @@ name: Docker-CI
on:
push:
branches: ["main", "release/*"]
branches: [ "main", "release/*" ]
pull_request:
branches: ["main", "release/*"]
branches: [ "main", "release/*" ]
workflow_dispatch:
concurrency:

View file

@ -5,6 +5,7 @@ on:
paths:
- ".github/workflows/tauri2_ci.yaml"
- "frontend/rust-lib/**"
paths-ignore:
- "frontend/appflowy_web_app/**"
- "frontend/resources/**"

View file

@ -1,4 +1,4 @@
import { BlockType, TableAlignType } from '@/application/types';
import { BlockType } from '@/application/types';
import { EditorElementProps, SimpleTableCellBlockNode, SimpleTableNode } from '@/components/editor/editor.type';
import { renderColor } from '@/utils/color';
import React, { forwardRef, useMemo } from 'react';
@ -51,8 +51,8 @@ const SimpleTableCell =
const { horizontalAlign, bgColor } = useMemo(() => {
if (!table || !row) return {
bgColor: '',
horizontalAlign: TableAlignType.Left,
bgColor: undefined,
horizontalAlign: undefined,
};
const [parentElement] = table;

View file

@ -1,4 +1,4 @@
import { BlockType, TableAlignType } from '@/application/types';
import { BlockType } from '@/application/types';
import { EditorElementProps, SimpleTableNode, SimpleTableRowNode } from '@/components/editor/editor.type';
import { renderColor } from '@/utils/color';
import React, { forwardRef, useMemo } from 'react';
@ -38,8 +38,8 @@ const SimpleTableRow =
const { align, bgColor } = useMemo(() => {
if (!parent) return {
align: TableAlignType.Left,
bgColor: '',
align: undefined,
bgColor: undefined,
};
const [parentElement] = parent;

View file

@ -1,4 +1,6 @@
.simple-table {
font-size: 14px;
&.enable-header-column {
tr [data-block-type="simple_table_cell"]:first-child {
@apply font-semibold;
@ -32,6 +34,15 @@
}
}
tr[data-table-row-horizontal-align="left"] {
.block-element {
> div > .text-element {
text-align: left;
justify-content: flex-start;
}
}
}
tr[data-table-row-horizontal-align="center"] {
.block-element {
> div > .text-element {
@ -50,6 +61,15 @@
}
}
td[data-table-cell-horizontal-align="left"] {
.block-element {
> div > .text-element {
text-align: left;
justify-content: flex-start;
}
}
}
td[data-table-cell-horizontal-align="center"] {
.block-element {
@ -69,11 +89,12 @@
}
}
td .cell-children {
@apply min-w-[120px] leading-[1.8em];
@apply leading-[1.7em];
}
td {
@apply p-2;
@apply px-2 py-0.5;
}
}