fix(ui): restore inner padding on form popups (#3673)

#3376 put the shared wk-popover skin on the invite, share-link, create-user,
reset-password and change-password popups. The skin sets padding:0 and
overflow:hidden, which suits menus, and the same commit removed each
popup's own padding, min-width and max-height rules. The forms now sit
flush against the popup border and the primary button's corner is clipped.

Add a wk-popover--form modifier that brings back the pre-#3376 frame
(14px 16px padding, min/max width, scroll when tall) and put it on those
five popups.

Fixes #3672
main
Chu Quang Vinh 2026-09-24 17:18:10 +07:00 committed by GitHub
parent 967ed09706
commit eebc1d8643
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 18 additions and 5 deletions

View File

@ -31,6 +31,19 @@
overscroll-behavior: contain;
}
// The skin's padding:0 suits menus, whose items bring their own spacing. A popup
// that holds a form (invite, create user, change password) has no such inner
// padding, so add `wk-popover--form` next to `wk-popover` to give it the frame
// back, and let a tall form scroll instead of being clipped.
.wk-popover.wk-popover--form .t-popup__content {
padding: 14px 16px;
min-width: 300px;
max-width: min(392px, calc(100vw - 24px));
max-height: min(480px, calc(100vh - 96px));
overflow-y: auto;
overscroll-behavior: contain;
}
// A quiet option surface, with the brand accent reserved for the small check.
.t-select-option.t-is-selected:not(.t-is-disabled),
.t-select-option.t-is-selected:not(.t-is-disabled):hover {

View File

@ -198,7 +198,7 @@
</t-input>
</div>
<t-popup v-if="canManage" v-model="invitePopupVisible" trigger="click" placement="bottom-end"
destroy-on-close overlay-class-name="wk-popover member-invite-popup-overlay">
destroy-on-close overlay-class-name="wk-popover wk-popover--form member-invite-popup-overlay">
<t-button theme="primary" variant="outline" shape="square" size="small" class="members-list-add-btn"
:title="$t('tenantMember.add.button')" :aria-label="$t('tenantMember.add.button')">
<template #icon><t-icon name="user-add" /></template>
@ -247,7 +247,7 @@
popup so the two flows live side-by-side: "I know who"
(email input) vs "I don't" (one link, group chat). -->
<t-popup v-if="canManage" v-model="shareLinkPopupVisible" trigger="click" placement="bottom-end"
destroy-on-close overlay-class-name="wk-popover member-invite-popup-overlay">
destroy-on-close overlay-class-name="wk-popover wk-popover--form member-invite-popup-overlay">
<t-button theme="default" variant="outline" shape="square" size="small" class="members-list-add-btn"
:title="$t('tenantInvitation.shareLink.button')"
:aria-label="$t('tenantInvitation.shareLink.button')">

View File

@ -87,7 +87,7 @@
trigger="click"
placement="bottom-end"
destroy-on-close
overlay-class-name="wk-popover user-profile-password-popup-overlay"
overlay-class-name="wk-popover wk-popover--form user-profile-password-popup-overlay"
>
<t-button
theme="default"

View File

@ -15,7 +15,7 @@
-->
<template>
<t-popup :visible="visible" trigger="click" placement="left-top" :destroy-on-close="!locked"
overlay-class-name="wk-popover system-admin-action-popup-overlay" @visible-change="onVisibleChange">
overlay-class-name="wk-popover wk-popover--form system-admin-action-popup-overlay" @visible-change="onVisibleChange">
<span class="system-admin-action-popup-anchor">
<slot />
</span>

View File

@ -8,7 +8,7 @@
-->
<template>
<t-popup :visible="visible && active" trigger="click" placement="left-top" destroy-on-close
overlay-class-name="wk-popover system-admin-action-popup-overlay" @visible-change="onVisibleChange">
overlay-class-name="wk-popover wk-popover--form system-admin-action-popup-overlay" @visible-change="onVisibleChange">
<span class="system-admin-action-popup-anchor">
<slot />
</span>