Skip to content

Commit

Permalink
feat: 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ldq1220 committed Sep 10, 2024
2 parents 51a5ce8 + 361c68c commit ae6e90e
Show file tree
Hide file tree
Showing 110 changed files with 1,143 additions and 366 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/manual-build-pro-plugin-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
required: true
pr_number:
description: 'Please enter the pr number of pro plugin repository'
required: true
nocobase_pr_number:
description: 'Please enter the pr number of nocobase/nocobase repository'
required: false
jobs:
build-and-push:
Expand All @@ -34,6 +37,12 @@ jobs:
with:
ref: ${{ github.head_ref || github.ref_name }}
fetch-depth: 0
- name: Checkout nocobase/nocobase pr
shell: bash
run: |
gh pr checkout ${{ inputs.nocobase_pr_number }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Checkout plugin
uses: actions/checkout@v3
with:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.3.20-beta](https://github.com/nocobase/nocobase/compare/v1.3.19-beta...v1.3.20-beta) - 2024-09-10

### 🚀 Improvements

- **[client]** Support for displaying deeper level association fields in data blocks ([#5243](https://github.com/nocobase/nocobase/pull/5243)) by @zhangzhonghe

### 🐛 Bug Fixes

- **[client]**
- Menu modifications do not take effect in real-time ([#5207](https://github.com/nocobase/nocobase/pull/5207)) by @katherinehhh

- Support association field preloading in Handlebars templates ([#5236](https://github.com/nocobase/nocobase/pull/5236)) by @katherinehhh

- **[Data visualization]** Fix incorrect data source context when multiple data sources exist ([#5237](https://github.com/nocobase/nocobase/pull/5237)) by @2013xile

## [v1.3.19-beta](https://github.com/nocobase/nocobase/compare/v1.3.18-beta...v1.3.19-beta) - 2024-09-08

### 🐛 Bug Fixes
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@
格式基于 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.0.0/),
并且本项目遵循 [语义化版本](https://semver.org/spec/v2.0.0.html)

## [v1.3.20-beta](https://github.com/nocobase/nocobase/compare/v1.3.19-beta...v1.3.20-beta) - 2024-09-10

### 🚀 优化

- **[client]** 数据区块中支持显示更深层级的关系字段 ([#5243](https://github.com/nocobase/nocobase/pull/5243)) by @zhangzhonghe

### 🐛 修复

- **[client]**
- 修改菜单标题时没有实时生效 ([#5207](https://github.com/nocobase/nocobase/pull/5207)) by @katherinehhh

- 支持 Handlebars 模板中关系字段的预加载 ([#5236](https://github.com/nocobase/nocobase/pull/5236)) by @katherinehhh

- **[数据可视化]** 修复存在多个数据源时,图表的数据源上下文不正确的问题 ([#5237](https://github.com/nocobase/nocobase/pull/5237)) by @2013xile

## [v1.3.19-beta](https://github.com/nocobase/nocobase/compare/v1.3.18-beta...v1.3.19-beta) - 2024-09-08

### 🐛 修复
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": ["--ignore-engines"],
Expand Down
6 changes: 3 additions & 3 deletions packages/core/acl/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@nocobase/acl",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/resourcer": "1.3.19-beta",
"@nocobase/utils": "1.3.19-beta",
"@nocobase/resourcer": "1.3.20-beta",
"@nocobase/utils": "1.3.20-beta",
"minimatch": "^5.1.1"
},
"repository": {
Expand Down
8 changes: 4 additions & 4 deletions packages/core/actions/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nocobase/actions",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/cache": "1.3.19-beta",
"@nocobase/database": "1.3.19-beta",
"@nocobase/resourcer": "1.3.19-beta"
"@nocobase/cache": "1.3.20-beta",
"@nocobase/database": "1.3.20-beta",
"@nocobase/resourcer": "1.3.20-beta"
},
"repository": {
"type": "git",
Expand Down
10 changes: 5 additions & 5 deletions packages/core/app/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@nocobase/app",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/database": "1.3.19-beta",
"@nocobase/preset-nocobase": "1.3.19-beta",
"@nocobase/server": "1.3.19-beta"
"@nocobase/database": "1.3.20-beta",
"@nocobase/preset-nocobase": "1.3.20-beta",
"@nocobase/server": "1.3.20-beta"
},
"devDependencies": {
"@nocobase/client": "1.3.19-beta"
"@nocobase/client": "1.3.20-beta"
},
"repository": {
"type": "git",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@nocobase/auth",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
"dependencies": {
"@nocobase/actions": "1.3.19-beta",
"@nocobase/cache": "1.3.19-beta",
"@nocobase/database": "1.3.19-beta",
"@nocobase/resourcer": "1.3.19-beta",
"@nocobase/utils": "1.3.19-beta",
"@nocobase/actions": "1.3.20-beta",
"@nocobase/cache": "1.3.20-beta",
"@nocobase/database": "1.3.20-beta",
"@nocobase/resourcer": "1.3.20-beta",
"@nocobase/utils": "1.3.20-beta",
"@types/jsonwebtoken": "^8.5.8",
"jsonwebtoken": "^8.5.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/build",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "Library build tool based on rollup.",
"main": "lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/cache",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./lib/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@nocobase/cli",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"description": "",
"license": "AGPL-3.0",
"main": "./src/index.js",
"bin": {
"nocobase": "./bin/index.js"
},
"dependencies": {
"@nocobase/app": "1.3.19-beta",
"@nocobase/app": "1.3.20-beta",
"@types/fs-extra": "^11.0.1",
"@umijs/utils": "3.5.20",
"chalk": "^4.1.1",
Expand All @@ -25,7 +25,7 @@
"tsx": "^4.19.0"
},
"devDependencies": {
"@nocobase/devtools": "1.3.19-beta"
"@nocobase/devtools": "1.3.20-beta"
},
"repository": {
"type": "git",
Expand Down
8 changes: 4 additions & 4 deletions packages/core/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nocobase/client",
"version": "1.3.19-beta",
"version": "1.3.20-beta",
"license": "AGPL-3.0",
"main": "lib/index.js",
"module": "es/index.mjs",
Expand All @@ -26,9 +26,9 @@
"@formily/reactive-react": "^2.2.27",
"@formily/shared": "^2.2.27",
"@formily/validator": "^2.2.27",
"@nocobase/evaluators": "1.3.19-beta",
"@nocobase/sdk": "1.3.19-beta",
"@nocobase/utils": "1.3.19-beta",
"@nocobase/evaluators": "1.3.20-beta",
"@nocobase/sdk": "1.3.20-beta",
"@nocobase/utils": "1.3.20-beta",
"ahooks": "^3.7.2",
"antd": "^5.12.8",
"antd-style": "3.4.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export const SchemaInitializerMenu: FC<MenuProps> = (props) => {
const { items, ...others } = props;
const { token } = theme.useToken();
const itemsWithPopupClass = useMemo(
() => items.map((item) => ({ ...item, popupClassName: `${hashId} ${componentCls}-menu-sub` })),
() =>
items.map((item) => ({
...item,
popupClassName: `${hashId} ${componentCls}-menu-sub`,
})),
[componentCls, hashId, items],
);
// selectedKeys 为了不让有选中效果
Expand All @@ -62,9 +66,23 @@ export const SchemaInitializerMenu: FC<MenuProps> = (props) => {
border-inline-end: 0 !important;
.ant-menu-sub {
max-height: 50vh !important;
padding: ${token.paddingXXS}px !important;
}
.ant-menu-item {
margin-block: 0;
margin-inline: ${token.marginXXS}px !important;
margin-block: 0 !important;
width: auto !important;
padding: 0 ${token.paddingSM}px 0 ${token.padding}px !important;
}
.ant-menu-item-group-title {
padding: 0 ${token.padding}px;
margin-inline: 0;
line-height: 32px;
}
.ant-menu-submenu-title {
margin: 0 ${token.marginXXS}px !important;
padding-left: ${token.padding}px !important;
width: auto !important;
}
.ant-menu-root {
margin: 0 -${token.margin}px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ export const useSchemaInitializerStyles = genStyleHook('nb-schema-initializer',
},
},
},
[`${componentCls}-menu-sub`]: {
ul: {
maxHeight: '50vh !important',
},
},
[`${componentCls}-item-content`]: {
marginLeft: token.marginXS,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ test.describe('configure fields', () => {
await expect(
page.getByLabel('block-item-CollectionField-general-details-general.singleSelect-Single select'),
).toBeVisible();
await expect(
page.getByLabel('block-item-CollectionField-general-details-general.manyToOne.nickname'),
).toBeVisible();
await expect(page.getByLabel('block-item-CollectionField-general-details-users.nickname-Nickname')).toBeVisible();

// delete fields
await formItemInitializer.hover();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ test.describe('configure fields', () => {

await page.mouse.move(300, 0);
await expect(page.getByLabel('block-item-CollectionField-general-form-general.id-ID')).toBeVisible();
await expect(page.getByLabel('block-item-CollectionField-general-form-general.manyToOne.nickname')).toBeVisible();
await expect(page.getByLabel('block-item-CollectionField-general-form-users.nickname-Nickname')).toBeVisible();

// delete fields
await page.getByLabel('schema-initializer-Grid-form:configureFields-general').hover();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import { expect, oneEmptyTableBlockWithActions, test } from '@nocobase/test/e2e';
import { T3848 } from '../../../details-single/__e2e__/templatesOfBug';
import { addAssociationFields } from './templatesOfBug';

test.describe('where edit form block can be added', () => {
test('popup', async ({ page, mockPage, mockRecord }) => {
Expand Down Expand Up @@ -69,4 +70,30 @@ test.describe('where edit form block can be added', () => {

test.describe('configure actions', () => {});

test.describe('configure fields', () => {});
test.describe('configure fields', () => {
test('add association fields', async ({ page, mockPage, mockRecord }) => {
const nocoPage = await mockPage(addAssociationFields).waitForInit();
const record = await mockRecord('general', 3);
await nocoPage.goto();

// Create association fields for the first, second, and third levels respectively, and assert whether the values are correct
await page.getByLabel('action-Action.Link-Edit-').first().click();
await page.getByLabel('schema-initializer-Grid-form:').hover();
await page.getByRole('menuitem', { name: 'manyToOne1', exact: true }).click();
await page.getByRole('menuitem', { name: 'manyToOne1 right' }).hover();
await page.getByRole('menuitem', { name: 'manyToOne2', exact: true }).click();
await page.getByRole('menuitem', { name: 'manyToOne2 right' }).hover();
await page.getByRole('menuitem', { name: 'manyToOne3' }).click();
await page.mouse.move(600, 0);

await expect(page.getByLabel('block-item-CollectionField-general-form-general.manyToOne1-manyToOne1')).toHaveText(
`manyToOne1:${record.manyToOne1.id}`,
);
await expect(
page.getByLabel('block-item-CollectionField-general-form-targetCollection1.manyToOne2-manyToOne2'),
).toHaveText(`manyToOne2:${record.manyToOne1.manyToOne2.id}`);
await expect(
page.getByLabel('block-item-CollectionField-general-form-targetCollection2.manyToOne3-manyToOne3'),
).toHaveText(`manyToOne3:${record.manyToOne1.manyToOne2.manyToOne3.id}`);
});
});
Loading

0 comments on commit ae6e90e

Please sign in to comment.