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 Oct 30, 2023
2 parents d13d8e4 + 5ba19cb commit feb348f
Show file tree
Hide file tree
Showing 51 changed files with 1,189 additions and 296 deletions.
8 changes: 8 additions & 0 deletions content/start/changelog/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ Version:Major.Minor.Patch (follow the **Semver** specification)
- **Patch version**: Only include bug fix, the release time is not limited

---

#### 🎉 2.45.0 (2023-10-20)
- 【Fix】
- resizable Table width reset to initial bug(Affected v2.32~v2.44)
- Fixed the problem of incorrect update of select ellipsisTrigger under certain boundary conditions
- Fixed the problem of asynchronous loading of data in Tree/TreeSelect where checkRelation is unRelated, causing the selected status to be lost.
- Fix the issue of selecting ellipsisTrigger displaying more quantities incorrectly [#1560](https://github.com/DouyinFE/semi-design/issues/1560) [@Jon-Millent](https://github.com/Jon-Millent)

#### 🎉 2.45.0-beta.0 (2023-10-13)
- 【Fix】
- Fixed the problem that when Select virtualization and renderCreateItem are used at the same time, the display position of custom creation options is incorrect. [#1856](https://github.com/DouyinFE/semi-design/issues/1856)
Expand Down
7 changes: 7 additions & 0 deletions content/start/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ Semi 版本号遵循 **Semver** 规范(主版本号-次版本号-修订版本
- 修订版本号(patch):仅会进行 bugfix,发布时间不限
- 不同版本间的详细关系,可查阅 [FAQ](/zh-CN/start/faq)

#### 🎉 2.45.0 (2023-10-20)
- 【Fix】
- 修复 resizable Table 宽度在行选择时错误设置为初始值问题(影响 v2.32~v2.44)
- 修复 select ellipsisTrigger 在某些边界条件下更新不正确的问题
- 修复 checkRelation 为 unRelated 的 Tree/TreeSelect 中,异步加载数据导致已选状态丢失问题
- 修复 select ellipsisTrigger 更多数量显示错误的问题 [#1560](https://github.com/DouyinFE/semi-design/issues/1560) [@Jon-Millent](https://github.com/Jon-Millent)

#### 🎉 2.45.0-beta.0 (2023-10-13)
- 【Fix】
- 修复 Select 虚拟化与 renderCreateItem 同时使用时,自定义创建选项显示位置不正确的问题 [#1856](https://github.com/DouyinFE/semi-design/issues/1856)
Expand Down
2 changes: 1 addition & 1 deletion content/start/introduction/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In addition, a good design system must be "live", it needs to be able to develop

How does Semi become flexible and changeable on the basis of coherence and unity? The answer is a powerful theming program.
By layering and sorting out thousands of design variables (Design Token), designers and developers can deeply customize the presentation layer at the global and even component level-even if you don’t know CSS, you can use the theme editor (DSM), to create a style that meets the diverse visual needs of the business and brand. Developers can publish and replace with one click through the npm package, which is easy to customize and easy to manage.
You can check Semi's official sample themes in different brand scenarios such as Douyin, Cut Ying, Feishu, Volcano Engine, etc. in [Semi DSM](https://semi.design/dsm/store)
You can check Semi's official sample themes in different brand scenarios such as Douyin, Cut Ying, Feishu, Volcano Engine, etc. in [Semi DSM](https://semi.design/dsm_store)

Within this year, we will also realize real-time synchronization of themes from online to design tools-while improving efficiency, we will further ensure the continuous alignment of design and R&D, and reduce the cost of communication between production and research.

Expand Down
2 changes: 1 addition & 1 deletion content/start/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Semi 是如何在连贯统一的基础上,做到灵活多变的?答案是强

通过对数千个设计变量 (Design Token) 的分层和梳理,设计师和开发者可在全局、乃至组件级别,对 表现层进行深度定制 —— 即使你不了解 CSS,也可以**通过主题编辑器(DSM),打造符合业务和品牌多样化视觉需求的风格**。开发者则可通过 npm 包一键发布并替换,轻松定制,易于管理。

你可以在[Semi DSM](https://semi.design/dsm/store),查看 Semi 在抖音、剪映、飞书、火山引擎等不同品牌场景下的官方示例主题。
你可以在[Semi DSM](https://semi.design/dsm_store),查看 Semi 在抖音、剪映、飞书、火山引擎等不同品牌场景下的官方示例主题。

![全面覆盖的设计变量用例、文档与编辑器](https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/tech-doc/p3.gif)

Expand Down
14 changes: 14 additions & 0 deletions cypress/e2e/inputNumber.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,18 @@ describe('inputNumber', () => {
cy.get('.semi-input-number .semi-input-number-button-down').click();
cy.get('.semi-input-number .semi-input').should('have.value', '60000');
});

it('fixed formatter error in controlled mode + focus and click add button', () => {
cy.visit('http://localhost:6006/iframe.html?id=inputnumber--fix-1772&viewMode=story');
cy.get('.semi-input-number .semi-input').should('have.value', '60000');
cy.get('.semi-input-number .semi-input').click();
cy.get('.semi-input-number .semi-input-number-button-up').click();
cy.get('.semi-input-number .semi-input').should('have.value', '60001');
cy.get('.semi-input-number .semi-input-number-button-up').click();
cy.get('.semi-input-number .semi-input').should('have.value', '60002');
cy.get('.semi-input-number .semi-input-number-button-down').click();
cy.get('.semi-input-number .semi-input').should('have.value', '60001');
cy.get('.semi-input-number .semi-input-number-button-down').click();
cy.get('.semi-input-number .semi-input').should('have.value', '60000');
});
});
28 changes: 28 additions & 0 deletions cypress/e2e/select.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,34 @@ describe('Select', () => {
cy.wait(500);
cy.get('.semi-select-option').should('have.text', 'Design');
});

// it('ellipsisTrigger', () => {
// cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/select--fix-1560');

// // add option
// cy.get('.semi-select-arrow').eq(0).click();
// cy.get('.semi-select-option').contains('剪映').click();
// cy.get('.semi-tag-grey-light').eq(0).contains('+2');

// // reduce option
// cy.get('.semi-select-arrow').eq(0).click();
// cy.get('.semi-select-option').contains('抖音').click();
// cy.get('.semi-tag-large').eq(2).contains('剪映');

// cy.get('body').click('right');

// // reduce option
// cy.get('.semi-select-arrow').eq(1).click();
// cy.get('.semi-select-option').contains('西瓜视频').click();
// cy.get('.semi-tag-grey-light').eq(0).contains('+1');

// // add option
// cy.get('.semi-select-arrow').eq(1).click();
// cy.get('.semi-select-option').contains('西瓜视频').click();
// cy.get('.semi-tag-grey-light').eq(0).contains('+2');

// });

// it('should trigger onSearch when click x icon', () => {
// cy.visit('http://127.0.0.1:6006/iframe.html?path=/story/select--select-filter-single');
// cy.get('.semi-select').eq(0).click();
Expand Down
8 changes: 8 additions & 0 deletions cypress/e2e/tree.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@ describe('tree', () => {
cy.get('.semi-tree-option-expand-icon');
});

it("unRelated + async load", () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=tree--un-related-and-async-load&args=&viewMode=story');
cy.get('.semi-checkbox').eq(0).get('.semi-checkbox-inner-checked').should("exist");
cy.get('.semi-icon-tree_triangle_down').eq(0).trigger('click');
// sync load, 1000ms
cy.wait(1000);
cy.get('.semi-checkbox').eq(0).get('.semi-checkbox-inner-checked').should("exist");
});

});
9 changes: 9 additions & 0 deletions cypress/e2e/treeSelect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,14 @@ describe('treeSelect', () => {
cy.get('.semi-tree-select').eq(1).click();
cy.get('.semi-tree-select-popover').should('exist');
});

it("unRelated + async load", () => {
cy.visit('http://127.0.0.1:6006/iframe.html?id=treeselect--un-related-and-async-load');
cy.get('.semi-checkbox').eq(0).get('.semi-checkbox-inner-checked').should("exist");
cy.get('.semi-icon-tree_triangle_down').eq(0).trigger('click');
// sync load, 1000ms
cy.wait(1000);
cy.get('.semi-checkbox').eq(0).get('.semi-checkbox-inner-checked').should("exist");
});
});

2 changes: 2 additions & 0 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ exports.onCreateWebpackConfig = ({ stage, rules, loaders, plugins, actions }) =>
alias: {
'semi-site-header': process.env.SEMI_SITE_HEADER || '@douyinfe/semi-site-header',
'semi-site-banner': process.env.SEMI_SITE_BANNER || '@douyinfe/semi-site-banner',
'univers-webview': process.env.SEMI_SITE_UNIVERS_WEBVIEW || resolve('packages/semi-ui'),
'@douyinfe/semi-ui': resolve('packages/semi-ui'),
'@douyinfe/semi-foundation': resolve('packages/semi-foundation'),
'@douyinfe/semi-icons': resolve('packages/semi-icons/src/'),
Expand Down Expand Up @@ -170,6 +171,7 @@ exports.onCreateWebpackConfig = ({ stage, rules, loaders, plugins, actions }) =>
"DSM_URL": JSON.stringify(process.env['DSM_URL']),
'process.env.SEMI_SITE_HEADER': JSON.stringify(process.env.SEMI_SITE_HEADER),
'process.env.SEMI_SITE_BANNER': JSON.stringify(process.env.SEMI_SITE_BANNER),
"process.env.SEMI_SITE_UNIVERS_WEBVIEW": JSON.stringify(process.env.SEMI_SITE_UNIVERS_WEBVIEW),
'process.env.D2C_URL': JSON.stringify(process.env.D2C_URL),
"ASSET_PREFIX":JSON.stringify((process.env['CDN_OUTER_CN'] || process.env['CDN_INNER_CN']) ? `https://${(process.env['CDN_OUTER_CN'] || process.env['CDN_INNER_CN'])}/${process.env['CDN_PATH_PREFIX']}`: ""),
})],
Expand Down
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.45.0-beta.0"
}
"version": "2.45.2"
}
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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"@douyinfe/semi-animation-styled": "2.45.0-beta.0",
"@douyinfe/semi-animation": "2.45.2",
"@douyinfe/semi-animation-styled": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"description": "semi ui eslint plugin",
"keywords": [
"semi",
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.45.0-beta.0",
"version": "2.45.2",
"description": "",
"scripts": {
"build:lib": "node ./scripts/compileLib.js",
"prepublishOnly": "npm run build:lib"
},
"dependencies": {
"@douyinfe/semi-animation": "2.45.0-beta.0",
"@douyinfe/semi-animation": "2.45.2",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
"date-fns": "^2.29.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-foundation/select/option.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ $multiple: #{$module}-multiple;

&-selected {
font-weight: $font-weight-bold;

background: $color-select-option-bg-selected;
.#{$module}-option-icon {
color: $color-select_option-icon-active;
}
Expand Down
1 change: 1 addition & 0 deletions packages/semi-foundation/select/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ $color-select_option_disabled-text: var(--semi-color-disabled-text); // 禁用
$color-select_option_disabled-bg: transparent; // 禁用选择器菜单选项背景颜色
$color-select_option-icon-active: var(--semi-color-text-2); // 禁用选择器菜单选项图标颜色 - 选中态
$color-select_option-border-default: var(--semi-color-border); // 分组选择器菜单项描边颜色
$color-select-option-bg-selected: transparent; // 选择器菜单选项背景颜色 - 选中态
$color-select_inset_label-text: var(--semi-color-text-2); // 分组选择器菜单项辅助文本颜色
$color-select_create_tips-text: var(--semi-color-text-2); // 分组选择器菜单项提示文本颜色
$color-select_group-text: var(--semi-color-text-2); // 分组选择器菜单项分组标题文本颜色
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-foundation/table/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export function mergeQueries(query: Record<string, any>, queries: Record<string,
* @param {Object[]} newColumns
*/
export function withResizeWidth(columns: Record<string, any>[], newColumns: Record<string, any>[]) {
const _newColumns = { ...newColumns };
const _newColumns = [ ...newColumns ];
for (const column of columns) {
if (!isNullOrUndefined(column.width)) {
const currentColumn = column.key;
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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"description": "Plugin that support Semi Design in Next.js",
"author": "伍浩威 <[email protected]>",
"homepage": "",
Expand All @@ -23,7 +23,7 @@
"typescript": "^4"
},
"dependencies": {
"@douyinfe/semi-webpack-plugin": "2.45.0-beta.0"
"@douyinfe/semi-webpack-plugin": "2.45.2"
},
"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.45.0-beta.0",
"version": "2.45.2",
"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.45.0-beta.0",
"version": "2.45.2",
"description": "compile semi scss to css",
"author": "[email protected]",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/semi-theme-default/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-theme-default",
"version": "2.45.0-beta.0",
"version": "2.45.2",
"description": "semi-theme-default",
"keywords": [
"semi-theme",
Expand Down
5 changes: 2 additions & 3 deletions packages/semi-ui/inputNumber/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class InputNumber extends BaseComponent<InputNumberProps, InputNumberState> {
* We need to set the status to false after trigger focus event
*/
if (this.clickUpOrDown) {
obj.value = this.foundation.doFormat(valueStr, true);
obj.value = this.foundation.doFormat(obj.number, true);
newValue = obj.value;
}
this.foundation.updateStates(obj, () => this.adapter.restoreCursor());
Expand All @@ -313,8 +313,7 @@ class InputNumber extends BaseComponent<InputNumberProps, InputNumberState> {
this.foundation.updateStates({ value: newValue });
} else {
// Update input content when controlled input NaN
newValue = this.foundation.doFormat(valueStr, false);
this.foundation.updateStates({ value: newValue });
this.foundation.updateStates({ value: valueStr });
}
} else if (this.foundation.isValidNumber(parsedNum)) {
newValue = this.foundation.doFormat(parsedNum);
Expand Down
14 changes: 7 additions & 7 deletions packages/semi-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@douyinfe/semi-ui",
"version": "2.45.0-beta.0",
"version": "2.45.2",
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
"main": "lib/cjs/index.js",
"module": "lib/es/index.js",
Expand All @@ -20,12 +20,12 @@
"@dnd-kit/core": "^6.0.8",
"@dnd-kit/sortable": "^7.0.2",
"@dnd-kit/utilities": "^3.2.1",
"@douyinfe/semi-animation": "2.45.0-beta.0",
"@douyinfe/semi-animation-react": "2.45.0-beta.0",
"@douyinfe/semi-foundation": "2.45.0-beta.0",
"@douyinfe/semi-icons": "2.45.0-beta.0",
"@douyinfe/semi-illustrations": "2.45.0-beta.0",
"@douyinfe/semi-theme-default": "2.45.0-beta.0",
"@douyinfe/semi-animation": "2.45.2",
"@douyinfe/semi-animation-react": "2.45.2",
"@douyinfe/semi-foundation": "2.45.2",
"@douyinfe/semi-icons": "2.45.2",
"@douyinfe/semi-illustrations": "2.45.2",
"@douyinfe/semi-theme-default": "2.45.2",
"async-validator": "^3.5.0",
"classnames": "^2.2.6",
"copy-text-to-clipboard": "^2.1.1",
Expand Down
Loading

0 comments on commit feb348f

Please sign in to comment.