Merge branch 'main' into T-2327-and-2771

This commit is contained in:
Zeke Zhang 2024-01-21 12:25:20 +08:00
commit 8e7cb845d4
4 changed files with 19 additions and 10 deletions

View File

@ -136,7 +136,7 @@ jobs:
container: node:${{ matrix.node_version }}
services:
mysql:
image: mysql:8
image: mysql:8.2 # >= 8.3 will meet unsolved error: https://github.com/nocobase/nocobase/actions/runs/7581141593/job/20653828990?pr=3383
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: nocobase

View File

@ -167,6 +167,7 @@ Upload.Attachment = connect((props: UploadProps) => {
if (info.file.status === 'done') {
onChange?.(toValue(list));
}
onChange?.(toValue(list));
setFileList(list.map(toItem));
setSync(true);
} else {

View File

@ -5,11 +5,11 @@ import { Space } from 'antd';
import classNames from 'classnames';
import React, { FC, useEffect, useMemo, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { SchemaToolbarProvider, useSchemaInitializerRender, useSchemaSettingsRender } from '../application';
import { DragHandler, useCompile, useDesignable, useGridContext, useGridRowContext } from '../schema-component';
import { gridRowColWrap } from '../schema-initializer/utils';
import { SchemaSettingsDropdown } from './SchemaSettings';
import { useGetAriaLabelOfDesigner } from './hooks/useGetAriaLabelOfDesigner';
import { SchemaToolbarProvider, useSchemaInitializerRender, useSchemaSettingsRender } from '../application';
import { useStyles } from './styles';
const titleCss = css`
@ -160,7 +160,7 @@ export interface SchemaToolbarProps {
showBackground?: boolean;
}
export const SchemaToolbar: FC<SchemaToolbarProps> = (props) => {
const InternalSchemaToolbar: FC<SchemaToolbarProps> = (props) => {
const { title, initializer, settings, showBackground, showBorder = true, draggable = true } = props;
const { designable } = useDesignable();
const fieldSchema = useFieldSchema();
@ -242,13 +242,13 @@ export const SchemaToolbar: FC<SchemaToolbarProps> = (props) => {
}
}
if (toolbarElement) {
if (toolbarElement?.parentElement) {
toolbarElement.parentElement.addEventListener('mouseenter', show);
toolbarElement.parentElement.addEventListener('mouseleave', hide);
}
return () => {
if (toolbarElement) {
if (toolbarElement?.parentElement) {
toolbarElement.parentElement.removeEventListener('mouseenter', show);
toolbarElement.parentElement.removeEventListener('mouseleave', hide);
}
@ -286,3 +286,13 @@ export const SchemaToolbar: FC<SchemaToolbarProps> = (props) => {
</div>
);
};
export const SchemaToolbar: FC<SchemaToolbarProps> = (props) => {
const { designable } = useDesignable();
if (!designable) {
return null;
}
return <InternalSchemaToolbar {...props} />;
};

View File

@ -86,7 +86,7 @@ describe('workflow > instructions > delay', () => {
expect(j2.status).toBe(JOB_STATUS.FAILED);
});
it('delay to resolve and rollback in downstream node', async () => {
it('delay to resolve and downstream node error', async () => {
const n1 = await workflow.createNode({
type: 'delay',
config: {
@ -97,11 +97,9 @@ describe('workflow > instructions > delay', () => {
const n2 = await workflow.createNode({
type: 'create',
config: {
collection: 'comment',
collection: 'notExistsTable',
params: {
values: {
status: 'should be number but use string to raise an error',
},
values: {},
},
},
upstreamId: n1.id,