Browse Source

fix: modal z-index cleanup (#5234)

Charles Zhou 10 months ago
parent
commit
9961cdd7c8
22 changed files with 5 additions and 24 deletions
  1. 1 1
      web/app/components/app/annotation/batch-add-annotation-modal/index.tsx
  2. 0 1
      web/app/components/app/configuration/config-prompt/conversation-histroy/edit-modal.tsx
  3. 0 1
      web/app/components/app/configuration/config-var/config-modal/index.tsx
  4. 0 1
      web/app/components/app/configuration/dataset-config/select-dataset/index.tsx
  5. 0 2
      web/app/components/app/configuration/tools/external-data-tool-modal.tsx
  6. 0 1
      web/app/components/app/create-app-modal/index.tsx
  7. 0 1
      web/app/components/app/create-from-dsl-modal/index.tsx
  8. 0 1
      web/app/components/app/switch-app-modal/index.tsx
  9. 1 1
      web/app/components/base/emoji-picker/index.tsx
  10. 0 1
      web/app/components/base/tag-management/index.tsx
  11. 0 1
      web/app/components/base/tag-management/tag-remove-modal.tsx
  12. 0 1
      web/app/components/datasets/hit-testing/index.tsx
  13. 0 1
      web/app/components/datasets/rename-modal/index.tsx
  14. 0 1
      web/app/components/explore/create-app-modal/index.tsx
  15. 0 2
      web/app/components/header/account-setting/account-page/index.tsx
  16. 0 1
      web/app/components/header/account-setting/api-based-extension-page/modal.tsx
  17. 1 1
      web/app/components/header/account-setting/index.tsx
  18. 1 1
      web/app/components/header/account-setting/members-page/invite-modal/index.tsx
  19. 1 1
      web/app/components/header/account-setting/members-page/invited-modal/index.tsx
  20. 0 1
      web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx
  21. 0 1
      web/app/components/tools/workflow-tool/confirm-modal/index.tsx
  22. 0 1
      web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx

+ 1 - 1
web/app/components/app/annotation/batch-add-annotation-modal/index.tsx

@@ -87,7 +87,7 @@ const BatchModal: FC<IBatchModalProps> = ({
   }
   }
 
 
   return (
   return (
-    <Modal isShow={isShow} onClose={() => { }} wrapperClassName='!z-[20]' className='px-8 py-6 !max-w-[520px] !rounded-xl'>
+    <Modal isShow={isShow} onClose={() => { }} className='px-8 py-6 !max-w-[520px] !rounded-xl'>
       <div className='relative pb-1 text-xl font-medium leading-[30px] text-gray-900'>{t('appAnnotation.batchModal.title')}</div>
       <div className='relative pb-1 text-xl font-medium leading-[30px] text-gray-900'>{t('appAnnotation.batchModal.title')}</div>
       <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onCancel}>
       <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onCancel}>
         <XClose className='w-4 h-4 text-gray-500' />
         <XClose className='w-4 h-4 text-gray-500' />

+ 0 - 1
web/app/components/app/configuration/config-prompt/conversation-histroy/edit-modal.tsx

@@ -27,7 +27,6 @@ const EditModal: FC<Props> = ({
       title={t('appDebug.feature.conversationHistory.editModal.title')}
       title={t('appDebug.feature.conversationHistory.editModal.title')}
       isShow={isShow}
       isShow={isShow}
       onClose={onClose}
       onClose={onClose}
-      wrapperClassName='!z-[101]'
     >
     >
       <div className={'mt-6 font-medium text-sm leading-[21px] text-gray-900'}>{t('appDebug.feature.conversationHistory.editModal.userPrefix')}</div>
       <div className={'mt-6 font-medium text-sm leading-[21px] text-gray-900'}>{t('appDebug.feature.conversationHistory.editModal.userPrefix')}</div>
       <input className={'mt-2 w-full rounded-lg h-10 box-border px-3 text-sm leading-10 bg-gray-100'}
       <input className={'mt-2 w-full rounded-lg h-10 box-border px-3 text-sm leading-10 bg-gray-100'}

+ 0 - 1
web/app/components/app/configuration/config-var/config-modal/index.tsx

@@ -132,7 +132,6 @@ const ConfigModal: FC<IConfigModalProps> = ({
       title={t(`appDebug.variableConig.${isCreate ? 'addModalTitle' : 'editModalTitle'}`)}
       title={t(`appDebug.variableConig.${isCreate ? 'addModalTitle' : 'editModalTitle'}`)}
       isShow={isShow}
       isShow={isShow}
       onClose={onClose}
       onClose={onClose}
-      wrapperClassName='!z-[100]'
     >
     >
       <div className='mb-8'>
       <div className='mb-8'>
         <div className='space-y-2'>
         <div className='space-y-2'>

+ 0 - 1
web/app/components/app/configuration/dataset-config/select-dataset/index.tsx

@@ -94,7 +94,6 @@ const SelectDataSet: FC<ISelectDataSetProps> = ({
       isShow={isShow}
       isShow={isShow}
       onClose={onClose}
       onClose={onClose}
       className='w-[400px]'
       className='w-[400px]'
-      wrapperClassName='!z-[101]'
       title={t('appDebug.feature.dataSet.selectTitle')}
       title={t('appDebug.feature.dataSet.selectTitle')}
     >
     >
       {!loaded && (
       {!loaded && (

+ 0 - 2
web/app/components/app/configuration/tools/external-data-tool-modal.tsx

@@ -186,7 +186,6 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
     <Modal
     <Modal
       isShow
       isShow
       onClose={() => { }}
       onClose={() => { }}
-      wrapperClassName='z-[101]'
       className='!p-8 !pb-6 !max-w-none !w-[640px]'
       className='!p-8 !pb-6 !max-w-none !w-[640px]'
     >
     >
       <div className='mb-2 text-xl font-semibold text-gray-900'>
       <div className='mb-2 text-xl font-semibold text-gray-900'>
@@ -287,7 +286,6 @@ const ExternalDataToolModal: FC<ExternalDataToolModalProps> = ({
       {
       {
         showEmojiPicker && (
         showEmojiPicker && (
           <EmojiPicker
           <EmojiPicker
-            className='!z-[200]'
             onSelect={(icon, icon_background) => {
             onSelect={(icon, icon_background) => {
               handleValueChange({ icon, icon_background })
               handleValueChange({ icon, icon_background })
               setShowEmojiPicker(false)
               setShowEmojiPicker(false)

+ 0 - 1
web/app/components/app/create-app-modal/index.tsx

@@ -83,7 +83,6 @@ const CreateAppModal = ({ show, onSuccess, onClose }: CreateAppDialogProps) => {
   return (
   return (
     <Modal
     <Modal
       overflowVisible
       overflowVisible
-      wrapperClassName='z-20'
       className='!p-0 !max-w-[720px] !w-[720px] rounded-xl'
       className='!p-0 !max-w-[720px] !w-[720px] rounded-xl'
       isShow={show}
       isShow={show}
       onClose={() => {}}
       onClose={() => {}}

+ 0 - 1
web/app/components/app/create-from-dsl-modal/index.tsx

@@ -78,7 +78,6 @@ const CreateFromDSLModal = ({ show, onSuccess, onClose }: CreateFromDSLModalProp
 
 
   return (
   return (
     <Modal
     <Modal
-      wrapperClassName='z-20'
       className='px-8 py-6 max-w-[520px] w-[520px] rounded-xl'
       className='px-8 py-6 max-w-[520px] w-[520px] rounded-xl'
       isShow={show}
       isShow={show}
       onClose={() => {}}
       onClose={() => {}}

+ 0 - 1
web/app/components/app/switch-app-modal/index.tsx

@@ -87,7 +87,6 @@ const SwitchAppModal = ({ show, appDetail, inAppDetail = false, onSuccess, onClo
   return (
   return (
     <>
     <>
       <Modal
       <Modal
-        wrapperClassName='z-20'
         className={cn('p-8 max-w-[600px] w-[600px]', s.bg)}
         className={cn('p-8 max-w-[600px] w-[600px]', s.bg)}
         isShow={show}
         isShow={show}
         onClose={() => {}}
         onClose={() => {}}

+ 1 - 1
web/app/components/base/emoji-picker/index.tsx

@@ -86,7 +86,7 @@ const EmojiPicker: FC<IEmojiPickerProps> = ({
     onClose={() => { }}
     onClose={() => { }}
     isShow
     isShow
     closable={false}
     closable={false}
-    wrapperClassName={`!z-50 ${className}`}
+    wrapperClassName={className}
     className={cn(s.container, '!w-[362px] !p-0')}
     className={cn(s.container, '!w-[362px] !p-0')}
   >
   >
     <div className='flex flex-col items-center w-full p-3'>
     <div className='flex flex-col items-center w-full p-3'>

+ 0 - 1
web/app/components/base/tag-management/index.tsx

@@ -60,7 +60,6 @@ const TagManagementModal = ({ show, type }: TagManagementModalProps) => {
 
 
   return (
   return (
     <Modal
     <Modal
-      wrapperClassName='!z-[1020]'
       className='px-8 py-6 !max-w-[600px] !w-[600px] rounded-xl'
       className='px-8 py-6 !max-w-[600px] !w-[600px] rounded-xl'
       isShow={show}
       isShow={show}
       onClose={() => setShowTagManagementModal(false)}
       onClose={() => setShowTagManagementModal(false)}

+ 0 - 1
web/app/components/base/tag-management/tag-remove-modal.tsx

@@ -21,7 +21,6 @@ const TagRemoveModal = ({ show, tag, onConfirm, onClose }: TagRemoveModalProps)
 
 
   return (
   return (
     <Modal
     <Modal
-      wrapperClassName='!z-[1020]'
       className={cn('p-8 max-w-[480px] w-[480px]', s.bg)}
       className={cn('p-8 max-w-[480px] w-[480px]', s.bg)}
       isShow={show}
       isShow={show}
       onClose={() => {}}
       onClose={() => {}}

+ 0 - 1
web/app/components/datasets/hit-testing/index.tsx

@@ -195,7 +195,6 @@ const HitTesting: FC<Props> = ({ datasetId }: Props) => {
       </FloatRightContainer>
       </FloatRightContainer>
       <Modal
       <Modal
         className='!max-w-[960px] !p-0'
         className='!max-w-[960px] !p-0'
-        wrapperClassName='!z-40'
         closable
         closable
         onClose={() => setCurrParagraph({ showModal: false })}
         onClose={() => setCurrParagraph({ showModal: false })}
         isShow={currParagraph.showModal}
         isShow={currParagraph.showModal}

+ 0 - 1
web/app/components/datasets/rename-modal/index.tsx

@@ -56,7 +56,6 @@ const RenameDatasetModal = ({ show, dataset, onSuccess, onClose }: RenameDataset
 
 
   return (
   return (
     <Modal
     <Modal
-      wrapperClassName='z-20'
       className='px-8 py-6 max-w-[520px] w-[520px] rounded-xl'
       className='px-8 py-6 max-w-[520px] w-[520px] rounded-xl'
       isShow={show}
       isShow={show}
       onClose={() => {}}
       onClose={() => {}}

+ 0 - 1
web/app/components/explore/create-app-modal/index.tsx

@@ -64,7 +64,6 @@ const CreateAppModal = ({
       <Modal
       <Modal
         isShow={show}
         isShow={show}
         onClose={() => {}}
         onClose={() => {}}
-        wrapperClassName='z-40'
         className='relative !max-w-[480px] px-8'
         className='relative !max-w-[480px] px-8'
       >
       >
         <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onHide}>
         <div className='absolute right-4 top-4 p-2 cursor-pointer' onClick={onHide}>

+ 0 - 2
web/app/components/header/account-setting/account-page/index.tsx

@@ -168,7 +168,6 @@ export default function AccountPage() {
           isShow
           isShow
           onClose={() => setEditNameModalVisible(false)}
           onClose={() => setEditNameModalVisible(false)}
           className={s.modal}
           className={s.modal}
-          wrapperClassName='z-20'
         >
         >
           <div className='mb-6 text-lg font-medium text-gray-900'>{t('common.account.editName')}</div>
           <div className='mb-6 text-lg font-medium text-gray-900'>{t('common.account.editName')}</div>
           <div className={titleClassName}>{t('common.account.name')}</div>
           <div className={titleClassName}>{t('common.account.name')}</div>
@@ -198,7 +197,6 @@ export default function AccountPage() {
             resetPasswordForm()
             resetPasswordForm()
           }}
           }}
           className={s.modal}
           className={s.modal}
-          wrapperClassName='z-20'
         >
         >
           <div className='mb-6 text-lg font-medium text-gray-900'>{userProfile.is_password_set ? t('common.account.resetPassword') : t('common.account.setPassword')}</div>
           <div className='mb-6 text-lg font-medium text-gray-900'>{userProfile.is_password_set ? t('common.account.resetPassword') : t('common.account.setPassword')}</div>
           {userProfile.is_password_set && (
           {userProfile.is_password_set && (

+ 0 - 1
web/app/components/header/account-setting/api-based-extension-page/modal.tsx

@@ -75,7 +75,6 @@ const ApiBasedExtensionModal: FC<ApiBasedExtensionModalProps> = ({
     <Modal
     <Modal
       isShow
       isShow
       onClose={() => { }}
       onClose={() => { }}
-      wrapperClassName='!z-[103]'
       className='!p-8 !pb-6 !max-w-none !w-[640px]'
       className='!p-8 !pb-6 !max-w-none !w-[640px]'
     >
     >
       <div className='mb-2 text-xl font-semibold text-gray-900'>
       <div className='mb-2 text-xl font-semibold text-gray-900'>

+ 1 - 1
web/app/components/header/account-setting/index.tsx

@@ -157,7 +157,7 @@ export default function AccountSetting({
       isShow
       isShow
       onClose={() => { }}
       onClose={() => { }}
       className={s.modal}
       className={s.modal}
-      wrapperClassName='!z-20 pt-[60px]'
+      wrapperClassName='pt-[60px]'
     >
     >
       <div className='flex'>
       <div className='flex'>
         <div className='w-[44px] sm:w-[200px] px-[1px] py-4 sm:p-4 border border-gray-100 shrink-0 sm:shrink-1 flex flex-col items-center sm:items-start'>
         <div className='w-[44px] sm:w-[200px] px-[1px] py-4 sm:p-4 border border-gray-100 shrink-0 sm:shrink-1 flex flex-col items-center sm:items-start'>

+ 1 - 1
web/app/components/header/account-setting/members-page/invite-modal/index.tsx

@@ -70,7 +70,7 @@ const InviteModal = ({
 
 
   return (
   return (
     <div className={cn(s.wrap)}>
     <div className={cn(s.wrap)}>
-      <Modal overflowVisible isShow onClose={() => {}} className={cn(s.modal)} wrapperClassName='z-20'>
+      <Modal overflowVisible isShow onClose={() => {}} className={cn(s.modal)}>
         <div className='flex justify-between mb-2'>
         <div className='flex justify-between mb-2'>
           <div className='text-xl font-semibold text-gray-900'>{t('common.members.inviteTeamMember')}</div>
           <div className='text-xl font-semibold text-gray-900'>{t('common.members.inviteTeamMember')}</div>
           <XMarkIcon className='w-4 h-4 cursor-pointer' onClick={onCancel} />
           <XMarkIcon className='w-4 h-4 cursor-pointer' onClick={onCancel} />

+ 1 - 1
web/app/components/header/account-setting/members-page/invited-modal/index.tsx

@@ -28,7 +28,7 @@ const InvitedModal = ({
 
 
   return (
   return (
     <div className={s.wrap}>
     <div className={s.wrap}>
-      <Modal isShow onClose={() => {}} className={s.modal} wrapperClassName='z-20'>
+      <Modal isShow onClose={() => {}} className={s.modal}>
         <div className='flex justify-between mb-3'>
         <div className='flex justify-between mb-3'>
           <div className='
           <div className='
             w-12 h-12 flex items-center justify-center rounded-xl
             w-12 h-12 flex items-center justify-center rounded-xl

+ 0 - 1
web/app/components/header/account-setting/model-provider-page/provider-added-card/model-load-balancing-modal.tsx

@@ -107,7 +107,6 @@ const ModelLoadBalancingModal = ({ provider, model, open = false, onClose, onSav
     <Modal
     <Modal
       isShow={Boolean(model) && open}
       isShow={Boolean(model) && open}
       onClose={onClose}
       onClose={onClose}
-      wrapperClassName='!z-30'
       className='max-w-none pt-8 px-8 w-[640px]'
       className='max-w-none pt-8 px-8 w-[640px]'
       title={
       title={
         <div className='pb-3 font-semibold'>
         <div className='pb-3 font-semibold'>

+ 0 - 1
web/app/components/tools/workflow-tool/confirm-modal/index.tsx

@@ -19,7 +19,6 @@ const ConfirmModal = ({ show, onConfirm, onClose }: ConfirmModalProps) => {
 
 
   return (
   return (
     <Modal
     <Modal
-      wrapperClassName='!z-[1020]'
       className={cn('p-8 max-w-[600px] w-[600px]', s.bg)}
       className={cn('p-8 max-w-[600px] w-[600px]', s.bg)}
       isShow={show}
       isShow={show}
       onClose={() => {}}
       onClose={() => {}}

+ 0 - 1
web/app/components/workflow/nodes/parameter-extractor/components/extract-parameter/update.tsx

@@ -132,7 +132,6 @@ const AddExtractParameter: FC<Props> = ({
           isShow
           isShow
           onClose={hideModal}
           onClose={hideModal}
           className='!w-[400px] !max-w-[400px] !p-4'
           className='!w-[400px] !max-w-[400px] !p-4'
-          wrapperClassName='!z-[100]'
         >
         >
           <div>
           <div>
             <div className='space-y-2'>
             <div className='space-y-2'>