Skip to content

Commit

Permalink
Merge branch 'main' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
pointhalo committed Sep 12, 2024
2 parents c8ff557 + 0f3e0db commit f3c2220
Show file tree
Hide file tree
Showing 29 changed files with 1,324 additions and 1,257 deletions.
26 changes: 19 additions & 7 deletions content/start/changelog/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,33 @@ Version:Major.Minor.Patch (follow the **Semver** specification)

---

#### 🎉 2.66.0 (2024-09-10)
- 【Fix】
- Fixed the issue where the Tooltip quickly slides in and out when the animation is on, and the tooltip disappears normally but the dom is not unloaded
- Fixed Upload addOnPasting in Sidesheet could not be uploaded [#2478](https:/DouyinFE/semi-design/issues/2478)
- Fixed single-select Cascader, under React18, the expansion behavior is abnormal when loading data asynchronously [#2212](https:/DouyinFE/semi-design/issues/2212)
- **Made some API tweaks for the Hotkeys component added in the previous Beta to make it more suitable for actual usage scenarios** [#2463](https:/DouyinFE/semi-design/issues/2463)
- 【Chore】
- Added ConfigConsumer export for manually obtaining ConfigProvider [#2468](https:/DouyinFE/semi-design/pull/2468)
- HotKeys adds static `Keys` property [@Nathon2Y](https:/Nathon2Y) [#2463](https:/DouyinFE/semi-design/pull/2463)


#### 🎉 2.66.0-beta.0 (2024-09-02)
- 【New Component】
- create Hotkeys component,user can define shortcut key combinations and trigger callbacks. [@Nathon2Y](https:/Nathon2Y)
- 【Feat】
- Tabs add slash type
- renderArrow of Tabs support defaultNode param
- All types of Tabs support closable (previously only the card type supported closable)
- Tabs supports setting dropdown parameters in collapsible mode through dropdownProps API
- 【Fix】
- Fixed the issue that the error style was blocked in Form.Upload image wall mode
- Fixed the issue that Collapse Tabs crashes when the tab is set to jsx (affected range: 2.65.0 )
- Fixed the issue that Dropdown onVisibleChange reported an error when it was not defined in some scenarios
- Fixed SyntaxError when parsing unescaped characters in Chat component message box
- Fixed the issue where the Chat component scrolls the message list while the message is being updated streaming. The streaming update of message will cause the list to unexpectedly scroll to the bottom.
- 【Feat】
- Tabs add slash type
- renderArrow of Tabs support defaultNode param
- All types of Tabs support closable (previously only the card type supported closable)
- Tabs supports setting dropdown parameters in collapsible mode through dropdownProps API
- create KeyboardShortCut,user can define shortcut key combinations and trigger callbacks. [@Nathon2Y](https:/Nathon2Y)
- 【Chore】
- The size API type of Avatar and AvatarGroup has been changed to string #2443 [#2446 ](https:/DouyinFE/semi-design/issues/2446)
- The size API type of Avatar and AvatarGroup has been changed to string #2443 [#2446](https:/DouyinFE/semi-design/issues/2446)

#### 🎉 2.65.0 (2024-08-23)
- 【Fix】
Expand Down
25 changes: 18 additions & 7 deletions content/start/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,32 @@ Semi 版本号遵循 **Semver** 规范(主版本号-次版本号-修订版本
- 次版本号(minor):Semi 固定每两周发布一个 minor 版本,包括以下类型变更:添加了新组件/新 feature,或者设计规范样式更新,或者不合理交互的变更,但不会对组件 API 做删减或功能变更。
- 修订版本号(patch):仅会进行 bugfix,发布时间不限
- 不同版本间的详细关系,可查阅 [FAQ](/zh-CN/start/faq)
-


#### 🎉 2.66.0 (2024-09-10)
- 【Fix】
- 修复 Tooltip 在动画开启状态快速滑入并滑出,tooltip 正常消失但是 dom 不卸载的问题 [#2461](https:/DouyinFE/semi-design/pull/2461)
- 修复 Upload addOnPasting 在 SideSheet中无法上传的问题 [#2478](https:/DouyinFE/semi-design/issues/2478)
- 修复单选的 Cascader,在 React 版本大于 18 情况下,异步加载数据展开行为异常问题 [#2212](https:/DouyinFE/semi-design/issues/2212)
- **针对上个 Beta 新增的 快捷键组件 Hotkeys 进行了一些 API 的微调,更符合实际使用场景** [#2463](https:/DouyinFE/semi-design/issues/2463)
- 【Chore】
- 新增 ConfigConsumer 导出,用于手动获取 ConfigProvider 内的值 [#2468](https:/DouyinFE/semi-design/pull/2468)
- HotKeys 增加 static `Keys`属性 [@Nathon2Y](https:/Nathon2Y) [#2463](https:/DouyinFE/semi-design/pull/2463)

#### 🎉 2.66.0-beta.0 (2024-09-02)
- 【New Component】
- 添加快捷键组件,支持用户自定义快捷键组合并触发回调 [@Nathon2Y](https:/Nathon2Y) [#2418](https:/DouyinFE/semi-design/pull/2418)
- 【Feat】
- Tabs 增加 slash 类型 [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 的 renderArrow 支持 defaultNode 参数 [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 的所有类型支持 closable (此前仅 card 类型支持 closable) [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 支持通过dropdownProps API 设置滚动折叠模式下的 dropdown 参数 [#2416](https:/DouyinFE/semi-design/pull/2416)
- 【Fix】
- 修复 Form.Upload 图片墙模式下 error 样式被遮挡问题 [#2449](https:/DouyinFE/semi-design/pull/2449)
- 修复 Collapse Tabs 在 tab 设置为 jsx 情况下会崩溃问题(影响范围:2.65.0 ) [#2464](https:/DouyinFE/semi-design/pull/2464)
- 修复 Dropdown onVisibleChange 在一些场景未定义时报错的问题 [#2454](https:/DouyinFE/semi-design/pull/2454)
- 修复 Chat 组件内容显示部分解析未转义字符时候的 SyntaxError [#2452](https:/DouyinFE/semi-design/pull/2452)
- 修复 Chat 组件在消息流式更新的同时,滚动消息列表,消息流式更新会导致列表意外滚动到底部问题 [#2451](https:/DouyinFE/semi-design/pull/2451)
- 【Feat】
- Tabs 增加 slash 类型 [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 的 renderArrow 支持 defaultNode 参数 [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 的所有类型支持 closable (此前仅 card 类型支持 closable) [#2416](https:/DouyinFE/semi-design/pull/2416)
- Tabs 支持通过dropdownProps API 设置滚动折叠模式下的 dropdown 参数 [#2416](https:/DouyinFE/semi-design/pull/2416)
- 添加快捷键组件,支持用户自定义快捷键组合并触发回调 [@Nathon2Y](https:/Nathon2Y) [#2418](https:/DouyinFE/semi-design/pull/2418)
- 【Chore】
- Avatar,AvatarGroup 的 size API 类型修改为 string #2443 [#2446 ](https:/DouyinFE/semi-design/issues/2446) [#2459](https:/DouyinFE/semi-design/pull/2459)

Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from "cypress";
export default defineConfig({
projectId: "k83u7j",
scrollBehavior: false,

video: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/autoComplete.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('autoComplete', () => {

// close panel
cy.get('input').type('{enter}');
cy.get('.semi-popover').not('.exit');
cy.get('.semi-popover').should('not.exist');
cy.get('input').should('have.value', '123');

// test downArrow and upArrow
Expand Down
2 changes: 2 additions & 0 deletions cypress/e2e/datePicker.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ describe('DatePicker', () => {
cy.get('[data-cy=dateTimeRange] .semi-input').first().click();
cy.get('[data-cy=dateTimeRange] .semi-input').eq(0).clear().type('2021-0');
cy.get('.semi-datepicker-footer .semi-button').eq(0).click();
cy.wait(300);
cy.get('[data-cy=dateTimeRange] .semi-input').first().click();
cy.get('.semi-popover .semi-datepicker-day-selected-start').contains('8');
cy.get('.semi-popover .semi-datepicker-day-selected-end').contains('9');
Expand Down Expand Up @@ -832,6 +833,7 @@ describe('DatePicker', () => {
cy.get('.semi-input').should('have.value', '2024-02-15 00:00:00');
cy.get('button').contains('确定').trigger('click');
cy.get('.semi-input').should('have.value', '');
cy.wait(300);
cy.get('.semi-input').eq(1).click();
cy.get('.semi-datepicker-day').contains('15').trigger('click');
cy.get('.semi-input').eq(1).should('have.value', '2024-02-15 00:00:00');
Expand Down
22 changes: 11 additions & 11 deletions cypress/e2e/slider.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('slider', () => {
const parentSelector = '[data-cy=horizontalNoChangeSlider]';
const sliderTrackSelector = `${parentSelector} .semi-slider-rail`;
const sliderHandleSelector = `${parentSelector} .semi-slider-handle`;

// test track click
let handleInitialPos;
cy.get(sliderHandleSelector).then(($handle) => {
Expand All @@ -18,7 +18,7 @@ describe('slider', () => {

cy.get(sliderTrackSelector).trigger('click', 'right');
cy.get('@consoleLog').should('be.calledWith', 'value改变了100');

cy.get(sliderHandleSelector).should(($button) => {
expect($button.position()).deep.equal(handleInitialPos);
});
Expand All @@ -28,7 +28,7 @@ describe('slider', () => {
.trigger('mousedown')
.trigger('mousemove', { pageX: 600, pageY: 0 })
.trigger('mouseup', { force: true });

cy.get(sliderHandleSelector).should(($button) => {
expect($button.position()).deep.equal(handleInitialPos);
});
Expand All @@ -53,14 +53,14 @@ describe('slider', () => {
// test knob slide (pageX 300 = 32%)
cy.get(sliderHandleSelector)
.realMouseDown()
.realMouseMove(-530, 0, { position: "center" })
.realMouseMove(-(774 - 774 * 0.32), 0, { position: "center" })
.realMouseUp({ force: true });

// left 32% = 247.68px;
// cy.get(sliderHandleSelector).should('have.css', 'left', '247.68px');
// cy.get(sliderHandleSelector).should('have.css', 'left', '32%');
cy.window().then(window => {
const style = window.getComputedStyle(window.document.querySelector(sliderHandleSelector));
expect(Math.ceil(parseFloat(style.left))).eq(248);
const left = (window.document.querySelector(sliderHandleSelector))['style']['left'];
expect(left).eq("32%");
});
});

Expand Down Expand Up @@ -140,7 +140,7 @@ describe('slider', () => {
.trigger('mousedown')
.trigger('mousemove', { pageX: 0, pageY: 600 })
.trigger('mouseup', { force: true });

cy.get(sliderHandleSelector).should(($button) => {
expect($button.position()).deep.equal(handleInitialPos);
});
Expand Down Expand Up @@ -219,7 +219,7 @@ describe('slider', () => {
cy.get('.semi-slider-handle').eq(2).should('have.attr', 'aria-valuenow', '50');
cy.get('.semi-slider-handle').eq(2).type('{Home}');
cy.get('.semi-slider-handle').eq(2).should('have.attr', 'aria-valuenow', '0');
});
});

it('should show tooltip when hovering slider handler', () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=slider--controlled-slider-demo&args=&viewMode=story', {
Expand All @@ -231,4 +231,4 @@ describe('slider', () => {
cy.get('.semi-slider-handle').eq(0).trigger('mouseover');
cy.get('.semi-slider-handle-tooltip').eq(0).should('have.text', '0');
});
});
});
5 changes: 4 additions & 1 deletion cypress/e2e/table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,21 +264,24 @@ describe('table', () => {
cy.get('.semi-input').type('12');
cy.get('.semi-button').contains('筛选+关闭').click();
cy.get('.semi-table-tbody .semi-table-row').should('have.length', 1);
cy.wait(200);
cy.get('.semi-table-column-filter').eq(0).click();
cy.get('.semi-input').should('be.focused');
cy.get('.semi-button').contains('清除+关闭').click();
cy.get('.semi-table-tbody .semi-table-row').should('have.length', 10);
cy.wait(200);
cy.get('.semi-table-column-filter').eq(0).click();
cy.get('.semi-input').should('be.focused');
cy.get('.semi-button').contains('直接关闭').click();
cy.get('.semi-dropdown').should('not.exist');

cy.wait(300);
// 测试第二个筛选器
cy.get('.semi-table-column-filter').eq(1).click();
cy.get('.semi-input').should('have.value', '姜鹏志');
cy.get('.semi-button').contains('清除后不关闭').click();
cy.get('.semi-table-pagination-info').should('contain', '显示第 1 条-第 10 条,共 46 条');
cy.get('.semi-dropdown').should('exist');
cy.wait(200);
cy.get('.semi-table-column-filter').eq(1).click();
cy.get('.semi-input').type('郝宣');
cy.get('.semi-button').contains('筛选后不关闭').click();
Expand Down
9 changes: 6 additions & 3 deletions cypress/e2e/treeSelect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('treeSelect', () => {

it('expanded controlled + showFilteredOnly', () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=treeselect--issue-1542');
cy.get('.semi-tree-select-selection').eq(0).trigger('click');
// cy.get('.semi-tree-select-selection').eq(0).trigger('click');
cy.get('.semi-tree-select-inputTrigger').eq(0).children(".semi-input").eq(0).type('b');
// showFilteredOnly,因此搜索后的选项应该只有 3 项
cy.get('.semi-tree-option').should('have.length', 3);
Expand All @@ -139,6 +139,9 @@ describe('treeSelect', () => {
// 等待弹出层展开
cy.wait(500);
cy.get('.semi-tree-option').should('have.length', 2);
cy.get('body').click();
// 等待弹出层收起
cy.wait(500);
cy.get('.semi-tree-select-inputTrigger').eq(0).children(".semi-input").eq(0).type('o');
cy.get('.semi-tree-option').should('have.length', 4);
cy.get('.semi-tree-option').eq(3).trigger('click');
Expand Down Expand Up @@ -197,7 +200,7 @@ describe('treeSelect', () => {

it('esc close panel', () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=treeselect--search-position-in-trigger-and-virtualize');
cy.get('.semi-input').trigger('click');
// cy.get('.semi-input').trigger('click');
cy.get('.semi-input').type('中');
cy.get('.semi-tree-select-popover').should('have.length', 1);
cy.get('.semi-input').type('{esc}', { force: true });
Expand All @@ -206,7 +209,7 @@ describe('treeSelect', () => {

it('showFilteredOnly + searchPosition in trigger', () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=treeselect--show-filtered-only');
cy.get('.semi-tree-select').trigger('click');
// cy.get('.semi-tree-select').trigger('click');
cy.get('.semi-input').type('上');
cy.get('.semi-tree-option').should('have.length', 3);
cy.get('#info').trigger('mousedown');
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.66.0-beta.0"
"version": "2.66.0"
}
6 changes: 3 additions & 3 deletions packages/semi-animation-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-react",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "motion library for semi-ui-react",
"keywords": [
"motion",
Expand All @@ -25,8 +25,8 @@
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.66.0-beta.0",
"@douyinfe/semi-animation-styled": "2.66.0-beta.0",
"@douyinfe/semi-animation": "2.66.0",
"@douyinfe/semi-animation-styled": "2.66.0",
"classnames": "^2.2.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation-styled/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation-styled",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "semi styled animation",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-animation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-animation",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "animation base library for semi-ui",
"keywords": [
"animation",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-eslint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-semi-design",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "semi ui eslint plugin",
"keywords": [
"semi",
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-foundation/hotKeys/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export default class HotKeysFoundation<P = Record<string, any>, S = Record<strin
}

handleKeyDown = (event: KeyboardEvent): void => {
const { mergeMetaCtrl:merged, hotKeys, preventDefault } = this.getProps();
const { mergeMetaCtrl: merged, hotKeys, preventDefault } = this.getProps();
let allModifier = new Array(4).fill(false); // Meta Shift Alt Ctrl
let clickedModifier = [event.metaKey, event.shiftKey, event.altKey, event.ctrlKey];
const keysPressed = hotKeys?.map((key: KeyboardEvent["key"])=> {
const keysPressed = hotKeys?.map((key: KeyboardEvent["key"]) => {
key = key.toLowerCase();
if (key === Keys.Meta) {
allModifier[0] = true;
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-foundation/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@douyinfe/semi-foundation",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "",
"scripts": {
"build:lib": "node ./scripts/compileLib.js",
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.66.0-beta.0",
"@douyinfe/semi-animation": "2.66.0",
"@mdx-js/mdx": "^3.0.1",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
Expand Down
3 changes: 1 addition & 2 deletions packages/semi-foundation/upload/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,9 +903,8 @@ class UploadFoundation<P = Record<string, any>, S = Record<string, any>> extends
const isMac = this._adapter.isMac();
const isCombineKeydown = isMac ? e.metaKey : e.ctrlKey;
const { addOnPasting } = this.getProps();

if (addOnPasting) {
if (isCombineKeydown && e.code === 'KeyV' && e.target === document.body) {
if (isCombineKeydown && e.code === 'KeyV') {
// https:/microsoft/TypeScript/issues/33923
const permissionName = 'clipboard-read' as PermissionName;
// The main thread should not be blocked by clipboard, so callback writing is required here. No await here
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons-lab/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons-lab",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "semi icons lab",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-icons",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "semi icons",
"keywords": [
"semi",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-illustrations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-illustrations",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "semi illustrations",
"keywords": [
"semi",
Expand Down
4 changes: 2 additions & 2 deletions packages/semi-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-next",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "Plugin that support Semi Design in Next.js",
"author": "伍浩威 <[email protected]>",
"homepage": "",
Expand All @@ -22,7 +22,7 @@
"typescript": "^4"
},
"dependencies": {
"@douyinfe/semi-webpack-plugin": "2.66.0-beta.0"
"@douyinfe/semi-webpack-plugin": "2.66.0"
},
"gitHead": "eb34a4f25f002bb4cbcfa51f3df93bed868c831a"
}
2 changes: 1 addition & 1 deletion packages/semi-rspack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-rspack-plugin",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "",
"homepage": "",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-scss-compile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-scss-compile",
"version": "2.66.0-beta.0",
"version": "2.66.0",
"description": "compile semi scss to css",
"author": "[email protected]",
"license": "MIT",
Expand Down
Loading

0 comments on commit f3c2220

Please sign in to comment.