Skip to content

Commit

Permalink
chore: release 1.9.8-naruto (#3235)
Browse files Browse the repository at this point in the history
* ci: add pr-comment-ci (#3217)

* feat(icon): add new icon (#3229)

* fix(input): disable password toggle when input disabled (#3230)

* fix(input): disable password toggle when input disabled

fix #3228

* fix(input): update snapshot

* chore: update snapshot

---------

Co-authored-by: Uyarn <[email protected]>

* chore: add CODEOWNERS file (#3231)

* chore: update codeowner (#3232)

* chore(deps-dev): bump cypress from 9.7.0 to 13.12.0 (#3225)

Bumps [cypress](https://github.com/cypress-io/cypress) from 9.7.0 to 13.12.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v9.7.0...v13.12.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps-dev): bump @testing-library/dom from 8.20.1 to 10.2.0 (#3222)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(Tree): fix nil value filter bug (#3233)

* fix(Tree): fix nil value filter bug

* chore: revert change

* chore: add test

* chore: release 1.9.8 (#3234)

* chore: release 1.9.8

* chore: update common

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: liweijie0812 <[email protected]>
Co-authored-by: jby0107 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
5 people authored Jul 11, 2024
1 parent 400c2aa commit d8f1256
Show file tree
Hide file tree
Showing 11 changed files with 159 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @chaishi @uyarn @xiaosansiji @maoyiluo @liweijie0812 @loopzhou
95 changes: 95 additions & 0 deletions .github/workflows/pr-comment-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: PR_COMMENT_CI

on:
issue_comment:
types: [created]

jobs:
check:
runs-on: ubuntu-latest
outputs:
next_action: ${{ steps.get-action.outputs.next_action }}
if: ${{ github.event.issue.pull_request }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/github-script@v7
id: get-action
with:
script: |
const user = context.payload.comment.user.login
core.debug(`user: ${user}`)
const fs = require('fs')
const CODEOWNERS = fs.readFileSync('.github/CODEOWNERS', 'utf8')
core.debug(`CODEOWNERS: ${CODEOWNERS}`)
let isReviewer = false;
CODEOWNERS.match(/@\w+/g).forEach((owner) => {
if (owner === `@${user}`) {
isReviewer = true
}
})
let next_action = ''
if (isReviewer) {
const body = context.payload.comment.body
core.info(`body: ${body}`)
if (body.startsWith('/update-common')) {
next_action='update-common'
}
if (body.startsWith('/update-snapshot')) {
next_action='update-snapshot'
}
} else {
core.warning('You are not collaborator');
}
core.info(`next_action: ${next_action}`)
core.setOutput('next_action', next_action)
update-common:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.next_action == 'update-common' }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_TOKEN }}
- name: gh checkout pr
env:
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
run: gh pr checkout ${{ github.event.issue.number }} --recurse-submodules
- run: git submodule update --remote --merge
- name: Commit Common
run: |
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "chore: update common"
git push
update-snapshot:
needs: check
runs-on: ubuntu-latest
if: ${{ needs.check.outputs.next_action == 'update-snapshot' }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_TOKEN }}
- name: gh checkout pr
env:
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
run: gh pr checkout ${{ github.event.issue.number }} --recurse-submodules
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm install
- run: npm run test:update
- name: Commit Snapshot
run: |
git add .
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "chore: update snapshot"
git push
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ toc: false
docClass: timeline
---

## 🌈 1.9.8 `2024-07-11`
### 🚀 Features
- `Icon`: 新增有序列表图标 `list-numbered`,优化`lock-off`图标的绘制路径 @DOUBLE-DENG ([icon#9f4acfd](https://github.com/Tencent/tdesign-icons/commit/9f4acfdda58f84f9bca71a22f033e27127dd26db))
### 🐞 Bug Fixes
- `Icon`: 修复图标`chart-column`的命名错误问题,如果使用旧错误命名请注意 @uyarn ([#3229](https://github.com/Tencent/tdesign-vue/pull/3229))
- `Tree`: 修复树形组件错误过滤 `value``0` 的节点的问题 @uyarn ([#3233](https://github.com/Tencent/tdesign-vue/pull/3233))
- `Input`: 修复禁用状态下仍可以切换明文密文的问题 @jby0107 ([#3230](https://github.com/Tencent/tdesign-vue/pull/3230))
- `Input`: 修复禁用状态下超出问题文字长度异常的问题 @uyarn ([common#1831](https://github.com/Tencent/tdesign-common/pull/1831))
- `Menu`: 修复样式文件多余的空格导致部分场景打包异常的问题 @liweijie0812 ([common#1828](https://github.com/Tencent/tdesign-common/pull/1828))

## 🌈 1.9.7 `2024-06-28`
### 🐞 Bug Fixes
- `Dialog`: 修复 `Dialog` 组件在 `SSR` 环境下的使用问题 @qqw78901 ([#3219](https://github.com/Tencent/tdesign-vue/pull/3219))
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-vue",
"purename": "tdesign",
"version": "1.9.7-naruto",
"version": "1.9.8-naruto",
"description": "tdesign-vue",
"title": "tdesign-vue",
"keywords": [
Expand Down Expand Up @@ -96,7 +96,7 @@
"mitt": "^3.0.0",
"raf": "^3.4.1",
"sortablejs": "^1.15.0",
"tdesign-icons-vue": "^0.2.0",
"tdesign-icons-vue": "^0.2.4",
"tinycolor2": "^1.4.2",
"validator": "^13.5.1"
},
Expand Down Expand Up @@ -142,7 +142,7 @@
"cli-color": "^2.0.0",
"commitizen": "^4.0.3",
"cross-env": "^7.0.2",
"cypress": "^9.5.3",
"cypress": "^13.12.0",
"cz-conventional-changelog": "^3.3.0",
"dom-parser": "^0.1.6",
"esbuild": "^0.14.9",
Expand Down
6 changes: 6 additions & 0 deletions src/icon/icon.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ You can get all the name of icon by import manifest from the bundle `import { ma
if your project is in a no-network scenario, please use on-demand loading of icons. For example,`<t-icon name="add" />` should be changed to `<AddIcon />`
### All Icons

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
</svg>
Most icons were added to the icon library after version 0.2.0. If you find that the icon cannot be displayed normally after being imported, please check the version of tdesign-icons-vue you have installed</div>

<td-icons-view />

## API
Expand Down
7 changes: 7 additions & 0 deletions src/icon/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ TDesign 支持通过使用 Iconfont 图标,使用时需要单独引入 Iconfon

### 全部图标

<div style="background: #ecf2fe; display: flex; align-items: center; line-height: 20px; padding: 14px 24px; border-radius: 3px; color: #555a65;margin:16px 0">
<svg fill="none" viewBox="0 0 16 16" width="16px" height="16px" style="margin-right: 5px">
<path fill="#0052d9" d="M8 15A7 7 0 108 1a7 7 0 000 14zM7.4 4h1.2v1.2H7.4V4zm.1 2.5h1V12h-1V6.5z" fillOpacity="0.9"></path>
</svg>
大部分图标在 0.2.0 版本后的图标库新增,如果发现图标引入后无法正常展示,请检查安装的图标库`tdesign-icons-vue`的版本。
</div>

<td-icons-view />

## API
Expand Down
15 changes: 13 additions & 2 deletions src/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ export default mixins(
},

emitPassword() {
if (this.tDisabled) return;
const { renderType } = this;
const toggleType = renderType === 'password' ? 'text' : 'password';
this.renderType = toggleType;
Expand Down Expand Up @@ -528,9 +529,19 @@ export default mixins(

if (this.type === 'password') {
if (this.renderType === 'password') {
suffixIcon = <BrowseOffIcon class={`${this.componentName}__suffix-clear`} nativeOnClick={this.emitPassword} />;
suffixIcon = (
<BrowseOffIcon
class={{ [`${this.componentName}__suffix-clear`]: !this.tDisabled }}
nativeOnClick={this.emitPassword}
/>
);
} else if (this.renderType === 'text') {
suffixIcon = <BrowseIcon class={`${this.componentName}__suffix-clear`} nativeOnClick={this.emitPassword} />;
suffixIcon = (
<BrowseIcon
class={{ [`${this.componentName}__suffix-clear`]: !this.tDisabled }}
nativeOnClick={this.emitPassword}
/>
);
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/tree/__tests__/index.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('Tree:init', () => {

it('可以传递一个树结构的数据来完成初始化', () => {
const data = [
{ value: 0 },
{
value: 't1',
children: [
Expand Down Expand Up @@ -89,6 +90,7 @@ describe('Tree:init', () => {
}),
);
expect(wrapper.find('.tree-empty').exists()).toBe(false);
expect(wrapper.find('[data-value="0"]').exists()).toBe(true);
expect(wrapper.find('[data-value="t1"]').exists()).toBe(true);
expect(wrapper.find('[data-value="t1.1"]').exists()).toBe(false);
expect(wrapper.find('[data-value="t2"]').exists()).toBe(true);
Expand Down
4 changes: 3 additions & 1 deletion src/tree/hooks/useTreeNodes.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import isUndefined from 'lodash/isUndefined';
import {
ref, watch, TypeCreateElement, privateKey, TypeVNode,
} from '../adapt';
Expand Down Expand Up @@ -26,13 +27,14 @@ export default function useTreeNodes(state: TypeTreeState) {
const list: TypeTreeNode[] = [];
// 非虚拟滚动,缓存曾经展示过的节点
let hasVisibleNode = false;

allNodes.value.forEach((node: TypeTreeNode) => {
if (node.visible) {
// 曾经展示过的节点加入缓存,避免再次创建
hasVisibleNode = true;
cacheMap.set(node.value, node.value);
}
if (cacheMap.get(node.value)) {
if (!isUndefined(cacheMap.get(node.value))) {
// 创建的节点是缓存的节点
list.push(node);
}
Expand Down
20 changes: 15 additions & 5 deletions test/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36401,8 +36401,10 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/input.vue 1
width="1em"
>
<path
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
clip-rule="evenodd"
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -39118,8 +39120,10 @@ exports[`csr snapshot test > csr test ./src/date-picker/_example/custom-icon.vue
width="1em"
>
<path
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
clip-rule="evenodd"
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -53714,8 +53718,10 @@ exports[`csr snapshot test > csr test ./src/form/_example/login.vue 1`] = `
width="1em"
>
<path
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
clip-rule="evenodd"
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -62930,8 +62936,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = `
width="1em"
>
<path
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
clip-rule="evenodd"
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down Expand Up @@ -62981,8 +62989,10 @@ exports[`csr snapshot test > csr test ./src/input/_example/password.vue 1`] = `
width="1em"
>
<path
d="M5.5 7.5a6.5 6.5 0 0113 0V9h2v13h-17V9h2V7.5zm2 1.5h9V7.5a4.5 4.5 0 10-9 0V9zm-2 2v9h13v-9h-13zM9 14.5h6v2H9v-2z"
clip-rule="evenodd"
d="M12 3a4 4 0 00-4 4v3h8V7a4 4 0 00-4-4zm6 7V7A6 6 0 006 7v3H3.5v12h17V10H18zM5.5 12v8h13v-8h-13zM9 15h6v2H9v-2z"
fill="currentColor"
fill-rule="evenodd"
/>
</svg>
</span>
Expand Down
8 changes: 4 additions & 4 deletions test/snap/__snapshots__/ssr.test.js.snap

Large diffs are not rendered by default.

0 comments on commit d8f1256

Please sign in to comment.