mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 02:43:40 -05:00
Merge pull request #8995 from overleaf/ab-dictionary-editor-split-test-badge
[web] Use the SplitTestBadge for dictionary-editor test GitOrigin-RevId: 5a5a646dd852f53603423ec2fe3d473593281dad
This commit is contained in:
parent
e9e36737e6
commit
5f7cb3a0dc
1 changed files with 9 additions and 21 deletions
|
@ -1,12 +1,12 @@
|
||||||
import { useCallback, useMemo } from 'react'
|
import { useCallback } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { Alert, Button, Modal } from 'react-bootstrap'
|
import { Alert, Button, Modal } from 'react-bootstrap'
|
||||||
import Icon from '../../../shared/components/icon'
|
import Icon from '../../../shared/components/icon'
|
||||||
|
import SplitTestBadge from '../../../shared/components/split-test-badge'
|
||||||
import Tooltip from '../../../shared/components/tooltip'
|
import Tooltip from '../../../shared/components/tooltip'
|
||||||
import useAsync from '../../../shared/hooks/use-async'
|
import useAsync from '../../../shared/hooks/use-async'
|
||||||
import { postJSON } from '../../../infrastructure/fetch-json'
|
import { postJSON } from '../../../infrastructure/fetch-json'
|
||||||
import ignoredWords from '../ignored-words'
|
import ignoredWords from '../ignored-words'
|
||||||
import BetaBadge from '../../../shared/components/beta-badge'
|
|
||||||
|
|
||||||
type DictionaryModalContentProps = {
|
type DictionaryModalContentProps = {
|
||||||
handleHide: () => void
|
handleHide: () => void
|
||||||
|
@ -35,30 +35,18 @@ export default function DictionaryModalContent({
|
||||||
[runAsync]
|
[runAsync]
|
||||||
)
|
)
|
||||||
|
|
||||||
const betaBadgeTooltipProps = useMemo(() => {
|
|
||||||
return {
|
|
||||||
id: 'dictionary-modal-tooltip',
|
|
||||||
placement: 'bottom',
|
|
||||||
className: 'tooltip-wide',
|
|
||||||
text: (
|
|
||||||
<>
|
|
||||||
We are testing the dictionary manager.
|
|
||||||
<br />
|
|
||||||
Click to give feedback
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
}
|
|
||||||
}, [])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header closeButton>
|
||||||
<Modal.Title>
|
<Modal.Title>
|
||||||
{t('edit_dictionary')}{' '}
|
{t('edit_dictionary')}{' '}
|
||||||
<BetaBadge
|
<SplitTestBadge
|
||||||
tooltip={betaBadgeTooltipProps}
|
splitTestName="dictionary-editor"
|
||||||
url="https://forms.gle/8cLBEW6HU9mDKBPX9"
|
displayOnVariants={['enabled']}
|
||||||
phase="release"
|
tooltip={{
|
||||||
|
placement: 'bottom',
|
||||||
|
className: 'tooltip-wide',
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</Modal.Title>
|
</Modal.Title>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
|
|
Loading…
Reference in a new issue