Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/base/src/__snapshots__/App.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ exports[`App render App when "checkPageAction" is false 1`] = `
</div>
</div>
<div
class="ant-select ant-select-lg ant-select-borderless basic-select-wrapper custom-select-namespace custom-project-selector css-wk9fc9 ant-select-single ant-select-show-arrow"
class="ant-select ant-select-lg ant-select-borderless basic-select-wrapper custom-select-namespace custom-project-selector css-1be09ba ant-select-single ant-select-show-arrow"
searchinputref="[object Object]"
>
<div
Expand Down Expand Up @@ -1382,7 +1382,7 @@ exports[`App render App when token is existed 1`] = `
</div>
</div>
<div
class="ant-select ant-select-lg ant-select-borderless basic-select-wrapper custom-select-namespace custom-project-selector css-wk9fc9 ant-select-single ant-select-show-arrow"
class="ant-select ant-select-lg ant-select-borderless basic-select-wrapper custom-select-namespace custom-project-selector css-1be09ba ant-select-single ant-select-show-arrow"
searchinputref="[object Object]"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ exports[`useUsername should render options when use generateUsernameSelectOption
>
<div
aria-selected="false"
class="ant-select-item ant-select-item-option ant-select-item-option-active"
class="ant-select-item ant-select-item-option select-option-whitespace-pre ant-select-item-option-active"
label="a1"
title="a1"
>
Expand All @@ -198,7 +198,7 @@ exports[`useUsername should render options when use generateUsernameSelectOption
</div>
<div
aria-selected="false"
class="ant-select-item ant-select-item-option"
class="ant-select-item ant-select-item-option select-option-whitespace-pre"
label="a2"
title="a2"
>
Expand Down
5 changes: 4 additions & 1 deletion packages/base/src/hooks/useMemberTips/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const useMemberTips = () => {
key={member.user_id}
value={member.user_id ?? ''}
label={member.user_name}
className="select-option-whitespace-pre"
>
{member.user_name}
</Select.Option>
Expand All @@ -47,7 +48,9 @@ const useMemberTips = () => {
label: (
<Space>
<CustomAvatar noTips size="small" name={member.user_name} />
<Typography.Text>{member.user_name}</Typography.Text>
<Typography.Text className="whitespace-pre">
{member.user_name}
</Typography.Text>
</Space>
),
value: member.user_id
Expand Down
7 changes: 6 additions & 1 deletion packages/base/src/hooks/useUsername/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
const generateUsernameSelectOption = React.useCallback(() => {
return usernameList.map((user) => {
return (
<Select.Option key={user.uid} value={user.uid ?? ''} label={user.name}>
<Select.Option
key={user.uid}
value={user.uid ?? ''}

Check warning on line 37 in packages/base/src/hooks/useUsername/index.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
label={user.name}
className="select-option-whitespace-pre"
>
{user.name}
</Select.Option>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/locale/zh-CN/dmsUserCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
},
userForm: {
username: '用户名',
usernameNoSpaces: '用户名不支持空格',
usernameNoSpaces: '用户名不支持首尾空格',
needUpdatePassWord: '是否需要更新密码',
passwordConfirm: '确认密码',
passwordConfirmPlaceholder: '请保持两次密码输入一致',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ exports[`test base/page/Account ce should match snapshot 1`] = `
class="ant-space-item"
style="margin-right: 8px;"
>
admin
<span
class="whitespace-pre"
>
admin
</span>
</div>
<div
class="ant-space-item"
Expand Down
18 changes: 15 additions & 3 deletions packages/base/src/page/Account/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ exports[`test base/page/Account should match snapshot 1`] = `
class="ant-space-item"
style="margin-right: 8px;"
>
admin
<span
class="whitespace-pre"
>
admin
</span>
</div>
<div
class="ant-space-item"
Expand Down Expand Up @@ -738,7 +742,11 @@ exports[`test base/page/Account should match snapshot 2`] = `
class="ant-space-item"
style="margin-right: 8px;"
>
admin
<span
class="whitespace-pre"
>
admin
</span>
</div>
<div
class="ant-space-item"
Expand Down Expand Up @@ -1765,7 +1773,11 @@ exports[`test base/page/Account should match snapshot when "getUserInfoLoading"
class="ant-space-item"
style="margin-right: 8px;"
>
admin
<span
class="whitespace-pre"
>
admin
</span>
</div>
<div
class="ant-space-item"
Expand Down
6 changes: 5 additions & 1 deletion packages/base/src/page/Account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@
{t('dmsUserCenter.user.userForm.username')}
</LabelContent>
}
descNode={!!userInfo?.name ? userInfo?.name : '-'}
descNode={
<span className="whitespace-pre">
{!!userInfo?.name ? userInfo?.name : '-'}

Check warning on line 52 in packages/base/src/page/Account/index.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
</span>
}
fieldVisible={false}
needEditButton={false}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ exports[`test base/CloudBeaver/List filter data with search 1`] = `
style="margin-right: 12px; padding-bottom: 12px;"
>
<div
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace css-pti5z8 ant-select-single ant-select-allow-clear ant-select-show-arrow"
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace css-wd6pz6 ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -454,7 +454,7 @@ exports[`test base/CloudBeaver/List filter data with search 1`] = `
style="margin-right: 12px; padding-bottom: 12px;"
>
<div
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace css-pti5z8 ant-select-single ant-select-allow-clear ant-select-show-arrow"
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace css-wd6pz6 ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -512,7 +512,7 @@ exports[`test base/CloudBeaver/List filter data with search 1`] = `
style="padding-bottom: 12px;"
>
<div
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace exec-result-filter-item css-pti5z8 ant-select-single ant-select-allow-clear ant-select-show-arrow"
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace exec-result-filter-item css-wd6pz6 ant-select-single ant-select-allow-clear ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -1673,14 +1673,22 @@ exports[`test base/CloudBeaver/List filter data with search 1`] = `
<td
class="ant-table-cell"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
<div
class="ant-space ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
<div
class="ant-space-item"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
</div>
</div>
</td>
<td
class="ant-table-cell"
Expand Down Expand Up @@ -3418,14 +3426,22 @@ exports[`test base/CloudBeaver/List render init table 1`] = `
<td
class="ant-table-cell"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
<div
class="ant-space ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
<div
class="ant-space-item"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
</div>
</div>
</td>
<td
class="ant-table-cell"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2144,14 +2144,22 @@ exports[`test base/page/CloudBeaver should match snapshot when sql query is disa
<td
class="ant-table-cell"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
<div
class="ant-space ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
<div
class="ant-space-item"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
</div>
</div>
</td>
<td
class="ant-table-cell"
Expand Down Expand Up @@ -3916,14 +3924,22 @@ exports[`test base/page/CloudBeaver should render jump to cloud beaver when sql
<td
class="ant-table-cell"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
<div
class="ant-space ant-space-horizontal ant-space-align-center basic-tooltips-wrapper css-4jbtl9"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
<div
class="ant-space-item"
>
<span
class="ant-avatar ant-avatar-sm ant-avatar-circle action-avatar css-6ssfc7"
>
<span
class="ant-avatar-string"
style="transform: scale(1) translateX(-50%);"
/>
</span>
</div>
</div>
</td>
<td
class="ant-table-cell"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ exports[`first should match snapshot when pageState is equal CREATE_TASK 1`] = `
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow ant-select-loading"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow ant-select-loading"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -446,7 +446,7 @@ exports[`first should match snapshot when pageState is equal CREATE_TASK 1`] = `
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ exports[`test base/DataExport/Create/CreateExportTask should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow ant-select-loading"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow ant-select-loading"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -471,7 +471,7 @@ exports[`test base/DataExport/Create/CreateExportTask should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -1179,7 +1179,7 @@ exports[`test base/DataExport/Create/CreateExportTask should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow ant-select-loading"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow ant-select-loading"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -1331,7 +1331,7 @@ exports[`test base/DataExport/Create/CreateExportTask should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ exports[`test base/DataExport/Create/UpdateInfoDrawer should match snapshot 1`]
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item ant-select-status-success basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow ant-select-loading"
class="ant-select ant-select-in-form-item ant-select-status-success basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow ant-select-loading"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -485,7 +485,7 @@ exports[`test base/DataExport/Create/UpdateInfoDrawer should match snapshot 1`]
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -1250,7 +1250,7 @@ exports[`test base/DataExport/Create/UpdateInfoDrawer should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item ant-select-status-success basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow ant-select-loading"
class="ant-select ant-select-in-form-item ant-select-status-success basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow ant-select-loading"
>
<div
class="ant-select-selector"
Expand Down Expand Up @@ -1403,7 +1403,7 @@ exports[`test base/DataExport/Create/UpdateInfoDrawer should match snapshot when
>
<div
aria-required="true"
class="ant-select ant-select-in-form-item basic-select-wrapper css-iy4o4x ant-select-single ant-select-show-arrow"
class="ant-select ant-select-in-form-item basic-select-wrapper css-1gowd4m ant-select-single ant-select-show-arrow"
>
<div
class="ant-select-selector"
Expand Down
Loading