Skip to content

Commit a7c2093

Browse files
committed
tooltip for anon
1 parent e9eedf2 commit a7c2093

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

apps/remix-ide/src/app/tabs/locales/en/remixApp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
"remixApp.mpOp1Title": "Matomo Anonymous Analytics (Necessary)",
2121
"remixApp.mpOp1Details": "Our use of anonymous analytics data helps us improve your experience by identifying bug and important UX improvements. This data can also be used in overall statistics on Remix use in the wider Web3 ecosystem",
22+
"remixApp.mpOp1Tooltip": "This is a necessary selection for a better experience of Remix IDE",
2223

2324
"remixApp.mpOp2Title": "Matomo Performance Analytics",
2425
"remixApp.mpOp2Details": "Remix believes your privacy is of primary importance. Your help in making Remix the best possible open source public good toolset is also very important. Approval of performance analytics tracking greatly helps us refine and improve the toolset. Rest assured, we will never share this data with any third parties.",

libs/remix-ui/app/src/lib/remix-app/components/modals/managePreferences.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { useContext, useEffect, useRef, useState } from 'react'
22
import { FormattedMessage } from 'react-intl'
33
import { useDialogDispatchers } from '../../context/provider'
4+
import { CustomTooltip } from "@remix-ui/helper"
5+
import { useIntl } from 'react-intl';
46
declare global {
57
interface Window {
68
_paq: any
@@ -14,6 +16,7 @@ interface ManagePreferencesDialogProps {
1416
const ManagePreferencesSwitcher = (prop: {
1517
setParentState: (state: any) => void
1618
}) => {
19+
const intl = useIntl()
1720
const [remixAISwitch, setRemixAISwitch] = useState(true)
1821
const [matPerfSwitch, setMatPerfSwitch] = useState(true)
1922

@@ -33,14 +36,21 @@ const ManagePreferencesSwitcher = (prop: {
3336
<p className='form-check-label text-secondary'><FormattedMessage id="remixApp.mpOp1Details" /></p>
3437
</div>
3538
<div>
36-
<button
37-
data-id="matomoAnonAnalyticsSwitch"
38-
id='matomoAnonAnalyticsSwitch'
39-
className="btn text-ai"
40-
disabled
39+
<CustomTooltip
40+
placement={"auto"}
41+
tooltipId="matomoAnonAnalyticsTooltip"
42+
tooltipClasses="text-nowrap"
43+
tooltipText={<FormattedMessage id="remixApp.mpOp1Tooltip" />}
4144
>
42-
<i className="fas fa-toggle-on fa-2xl"></i>
43-
</button>
45+
<button
46+
data-id="matomoAnonAnalyticsSwitch"
47+
id='matomoAnonAnalyticsSwitch'
48+
className="btn text-ai"
49+
disabled
50+
>
51+
<i className="fas fa-toggle-on fa-2xl"></i>
52+
</button>
53+
</CustomTooltip>
4454
</div>
4555
</div>
4656
<div data-id="matomoPerfAnalytics" className='justify-content-between d-flex'>

0 commit comments

Comments
 (0)