diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index a69014567222..df4b8edf5496 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Laut unseren Aufzeichnungen stimmt der angegebene RPC-URL-Wert nicht mit einem bekannten Anbieter für diese Chain-ID überein." }, - "missingSetting": { - "message": "Können Sie eine Einstellung nicht finden?" - }, - "missingSettingRequest": { - "message": "Hier anfordern" - }, "month": { "message": "Monat" }, diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index cdf5bd6577ac..25707e148ce3 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Σύμφωνα με τα αρχεία μας, η τιμή της διεύθυνσης URL του RPC που υποβλήθηκε δεν αντιστοιχεί με κάποιον γνωστό πάροχο για αυτό το αναγνωριστικό αλυσίδας." }, - "missingSetting": { - "message": "Δεν βρίσκετε μια ρύθμιση;" - }, - "missingSettingRequest": { - "message": "Υποβάλετε αίτημα εδώ" - }, "month": { "message": "μήνας" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index fdecdca2c9bf..68d392c360ee 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -4031,12 +4031,6 @@ "mismatchedRpcUrl": { "message": "According to our records the submitted RPC URL value does not match a known provider for this chain ID." }, - "missingSetting": { - "message": "Can't find a setting?" - }, - "missingSettingRequest": { - "message": "Request here" - }, "month": { "message": "month" }, diff --git a/app/_locales/en_GB/messages.json b/app/_locales/en_GB/messages.json index fdecdca2c9bf..68d392c360ee 100644 --- a/app/_locales/en_GB/messages.json +++ b/app/_locales/en_GB/messages.json @@ -4031,12 +4031,6 @@ "mismatchedRpcUrl": { "message": "According to our records the submitted RPC URL value does not match a known provider for this chain ID." }, - "missingSetting": { - "message": "Can't find a setting?" - }, - "missingSettingRequest": { - "message": "Request here" - }, "month": { "message": "month" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 7008454305f3..752f82c37d19 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Según nuestros registros, el valor de la URL de RPC enviado no coincide con un proveedor conocido para este ID de cadena." }, - "missingSetting": { - "message": "¿No puede encontrar un ajuste?" - }, - "missingSettingRequest": { - "message": "Solicítelo aquí" - }, "month": { "message": "mes" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index df65433dd77b..5fe2b1900cb5 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Selon nos informations, la valeur de l’URL RPC soumise ne correspond pas à un fournisseur connu pour cet ID de chaîne." }, - "missingSetting": { - "message": "Vous ne trouvez pas un paramètre ?" - }, - "missingSettingRequest": { - "message": "Demandez ici" - }, "month": { "message": "mois" }, diff --git a/app/_locales/ga/messages.json b/app/_locales/ga/messages.json index d5c37122ea42..c2f7b73d1606 100644 --- a/app/_locales/ga/messages.json +++ b/app/_locales/ga/messages.json @@ -3168,12 +3168,6 @@ "mismatchedRpcUrl": { "message": "De réir ár dtaifead, ní hionann luach URL an RPC a cuireadh isteach agus soláthraí aitheanta don ID slabhra seo." }, - "missingSetting": { - "message": "Ní féidir leat socrú a aimsiú?" - }, - "missingSettingRequest": { - "message": "Iarratas anseo" - }, "month": { "message": "mí" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index b9fabed84875..7f8f68d6f91d 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "हमारे रिकॉर्ड के अनुसार, सबमिट किया गया RPC-URL वैल्यू इस चेन ID के लिए किसी ज्ञात प्रोवाइडर से मेल नहीं खाता।" }, - "missingSetting": { - "message": "सेटिंग नहीं मिल रही है?" - }, - "missingSettingRequest": { - "message": "यहां रिक्वेस्ट करें" - }, "month": { "message": "महीना" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 9602b95fe0df..a1cd6c2c8db1 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Menurut catatan kami, nilai URL RPC yang dikirimkan tidak sesuai dengan penyedia yang dikenal untuk ID chain ini." }, - "missingSetting": { - "message": "Tidak dapat menemukan pengaturan?" - }, - "missingSettingRequest": { - "message": "Minta di sini" - }, "month": { "message": "bulan" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index a6bbbba94954..c9d30bcee1b5 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "弊社の記録によると、送信されたRPC URLの値がこのチェーンIDの既知のプロバイダーと一致しません。" }, - "missingSetting": { - "message": "設定が見つからない場合" - }, - "missingSettingRequest": { - "message": "ここでリクエスト" - }, "month": { "message": "月" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 642fd6b2c287..afbaee138fbe 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "기록에 따르면 제출한 RPC URL 값이 이 체인 ID의 알려진 공급업체와 일치하지 않습니다." }, - "missingSetting": { - "message": "설정을 찾으세요?" - }, - "missingSettingRequest": { - "message": "여기에서 요청하세요" - }, "month": { "message": "월" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index da44c1d70381..50cd658a5031 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "De acordo com os nossos registros, o valor de URL da RPC enviado não corresponde a um provedor conhecido para este ID de cadeia." }, - "missingSetting": { - "message": "Não consegue encontrar uma configuração?" - }, - "missingSettingRequest": { - "message": "Solicite aqui" - }, "month": { "message": "mês" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 9bc2030854cb..a764b814d5ee 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Согласно нашим записям, отправленное значение URL RPC не соответствует известному поставщику для этого ID блокчейна." }, - "missingSetting": { - "message": "Не удается найти настройки?" - }, - "missingSettingRequest": { - "message": "Запросить здесь" - }, "month": { "message": "месяц" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index ed356a5eb318..108f7307fa83 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Ayon sa aming mga talaan, ang isinumiteng RPC URL value ay hindi tumutugma sa isang kilalang provider para sa ID ng chain na ito." }, - "missingSetting": { - "message": "Hindi makahanap ng setting?" - }, - "missingSettingRequest": { - "message": "Humiling dito" - }, "month": { "message": "buwan" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 2e6ca4e5149f..c86f8ff1cbf7 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Kayıtlarımıza göre, sunulan RPC URL adresi değeri bu zincir kimliğinin bilinen bir sağlayıcısı ile uyumlu değil." }, - "missingSetting": { - "message": "Bir ayarı bulamıyor musun?" - }, - "missingSettingRequest": { - "message": "Buradan talep et" - }, "month": { "message": "ay" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index d7107fe49eb5..e5c254032d02 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "Theo hồ sơ của chúng tôi, giá trị RPC URL đã gửi không khớp với một nhà cung cấp đã biết cho ID chuỗi này." }, - "missingSetting": { - "message": "Không tìm thấy chế độ cài đặt?" - }, - "missingSettingRequest": { - "message": "Yêu cầu tại đây" - }, "month": { "message": "tháng" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index ac14d273f82c..423c61a750bb 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -3944,12 +3944,6 @@ "mismatchedRpcUrl": { "message": "根据我们的记录,所提交的RPC URL值与此链 ID 的已知提供者不匹配。" }, - "missingSetting": { - "message": "找不到设置吗?" - }, - "missingSettingRequest": { - "message": "在这里请求" - }, "month": { "message": "月" }, diff --git a/test/jest/console-baseline-unit.json b/test/jest/console-baseline-unit.json index 500915f1ffd2..81a7876f37c1 100644 --- a/test/jest/console-baseline-unit.json +++ b/test/jest/console-baseline-unit.json @@ -1516,6 +1516,9 @@ "React: PropTypes validation failures": 1, "Reselect: Identity function warnings": 1 }, + "ui/pages/settings-v2/about-tab/about-info.test.tsx": { + "React: Act warnings (component updates not wrapped)": 1 + }, "ui/pages/settings-v2/assets-tab/assets-tab.test.tsx": { "React: componentWill* lifecycle deprecations": 1 }, @@ -1591,9 +1594,6 @@ "ui/pages/settings/developer-options-tab/developer-options-toggle-row-component.test.tsx": { "React: componentWill* lifecycle deprecations": 1 }, - "ui/pages/settings/info-tab/info-tab.test.tsx": { - "React: Act warnings (component updates not wrapped)": 1 - }, "ui/pages/settings/networks-tab/networks-form/networks-form.test.js": { "React: Act warnings (component updates not wrapped)": 1, "React: State updates on unmounted components": 1 diff --git a/ui/pages/settings/info-tab/info-tab.test.tsx b/ui/pages/settings-v2/about-tab/about-info.test.tsx similarity index 94% rename from ui/pages/settings/info-tab/info-tab.test.tsx rename to ui/pages/settings-v2/about-tab/about-info.test.tsx index 6757bcbe5287..0041592e3821 100644 --- a/ui/pages/settings/info-tab/info-tab.test.tsx +++ b/ui/pages/settings-v2/about-tab/about-info.test.tsx @@ -5,9 +5,9 @@ import { fireEvent } from '@testing-library/react'; import { renderWithProvider } from '../../../../test/lib/render-helpers-navigate'; import mockState from '../../../../test/data/mock-state.json'; import { enLocale as messages } from '../../../../test/lib/i18n-helpers'; -import InfoTab from '.'; +import AboutInfo from './about-info'; -describe('InfoTab', () => { +describe('AboutInfo', () => { const mockStore = configureMockStore([thunk])(mockState); describe('validate links', () => { let getByRole: (role: string, options?: { name: string }) => HTMLElement; @@ -15,7 +15,7 @@ describe('InfoTab', () => { let getByTestId: (testId: string) => HTMLElement; beforeEach(() => { - const renderResult = renderWithProvider(, mockStore); + const renderResult = renderWithProvider(, mockStore); getByRole = renderResult.getByRole; getByText = renderResult.getByText; getByTestId = renderResult.getByTestId; diff --git a/ui/pages/settings/info-tab/info-tab.tsx b/ui/pages/settings-v2/about-tab/about-info.tsx similarity index 98% rename from ui/pages/settings/info-tab/info-tab.tsx rename to ui/pages/settings-v2/about-tab/about-info.tsx index 576af43a24ef..7937b8554c31 100644 --- a/ui/pages/settings/info-tab/info-tab.tsx +++ b/ui/pages/settings-v2/about-tab/about-info.tsx @@ -25,10 +25,10 @@ import { MetaMetricsEventName, } from '../../../../shared/constants/metametrics'; import VisitSupportDataConsentModal from '../../../components/app/modals/visit-support-data-consent-modal'; -import { Divider } from '../../settings-v2/shared'; +import { Divider } from '../shared'; import { useBoolean } from '../../../hooks/useBoolean'; -export default function InfoTab(): React.ReactElement { +export default function AboutInfo(): React.ReactElement { const t = useI18nContext(); const { trackEvent } = useContext(MetaMetricsContext); diff --git a/ui/pages/settings-v2/about-tab/about-tab.tsx b/ui/pages/settings-v2/about-tab/about-tab.tsx index b15fdb367c74..84582b9f0865 100644 --- a/ui/pages/settings-v2/about-tab/about-tab.tsx +++ b/ui/pages/settings-v2/about-tab/about-tab.tsx @@ -1,10 +1,10 @@ import React from 'react'; -import InfoTab from '../../settings/info-tab/info-tab'; import { SettingsTab } from '../shared'; import { SettingItemConfig } from '../types'; +import AboutInfo from './about-info'; const ABOUT_US_SETTING_ITEMS: SettingItemConfig[] = [ - { id: 'about-us', component: InfoTab }, + { id: 'about-us', component: AboutInfo }, ]; const AboutTab = () => { diff --git a/ui/pages/settings/info-tab/index.js b/ui/pages/settings/info-tab/index.js deleted file mode 100644 index 7a0e00e1c24c..000000000000 --- a/ui/pages/settings/info-tab/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './info-tab'; diff --git a/ui/pages/settings/info-tab/info-tab.stories.js b/ui/pages/settings/info-tab/info-tab.stories.js deleted file mode 100644 index 34f855172d1c..000000000000 --- a/ui/pages/settings/info-tab/info-tab.stories.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import InfoTab from '.'; - -export default { - title: 'Pages/Settings/InfoTab', -}; - -export const DefaultStory = () => ; - -DefaultStory.storyName = 'Default'; diff --git a/ui/pages/settings/settings-search-list/index.js b/ui/pages/settings/settings-search-list/index.js deleted file mode 100644 index 5d5fec4bef17..000000000000 --- a/ui/pages/settings/settings-search-list/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import SettingsSearchList from './settings-search-list'; - -export default SettingsSearchList; diff --git a/ui/pages/settings/settings-search-list/settings-search-list.js b/ui/pages/settings/settings-search-list/settings-search-list.js deleted file mode 100644 index 4a3df13f922e..000000000000 --- a/ui/pages/settings/settings-search-list/settings-search-list.js +++ /dev/null @@ -1,104 +0,0 @@ -import React, { useContext, useEffect } from 'react'; -import PropTypes from 'prop-types'; -import classnames from 'clsx'; -import { highlightSearchedText } from '../../../helpers/utils/settings-search'; -import { I18nContext } from '../../../contexts/i18n'; -import { Icon, IconName } from '../../../components/component-library'; -import { Size } from '../../../helpers/constants/design-system'; - -export default function SettingsSearchList({ results, onClickSetting }) { - const t = useContext(I18nContext); - - useEffect(highlightSearchedText, [results]); - - return ( -
- {results.slice(0, 5).map((result) => { - const { icon, iconName, tabMessage, sectionMessage, route } = result; - return ( - Boolean(icon || tabMessage || sectionMessage) && ( -
-
onClickSetting(result)} - > - {iconName ? ( - - ) : ( - - )} - - {tabMessage(t)} - - - - {sectionMessage(t)} - -
-
- ) - ); - })} - {results.length === 0 && ( -
- - {t('settingsSearchMatchingNotFound')} - -
- )} -
- - {t('missingSetting')} - - - {t('missingSettingRequest')} - -
-
- ); -} - -SettingsSearchList.propTypes = { - results: PropTypes.array, - onClickSetting: PropTypes.func, -}; diff --git a/ui/pages/settings/settings-search/index.js b/ui/pages/settings/settings-search/index.js deleted file mode 100644 index 302b3e22e56a..000000000000 --- a/ui/pages/settings/settings-search/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import SettingsSearch from './settings-search'; - -export default SettingsSearch; diff --git a/ui/pages/settings/settings-search/settings-search.js b/ui/pages/settings/settings-search/settings-search.js deleted file mode 100644 index 5a18cb517612..000000000000 --- a/ui/pages/settings/settings-search/settings-search.js +++ /dev/null @@ -1,115 +0,0 @@ -import React, { useState, useContext } from 'react'; -import PropTypes from 'prop-types'; -import Fuse from 'fuse.js'; -import InputAdornment from '@material-ui/core/InputAdornment'; -import TextField from '../../../components/ui/text-field'; -import { I18nContext } from '../../../contexts/i18n'; -import { isEqualCaseInsensitive } from '../../../../shared/lib/string-utils'; -import { - Icon, - IconName, - IconSize, -} from '../../../components/component-library'; -import { IconColor } from '../../../helpers/constants/design-system'; - -export default function SettingsSearch({ - onSearch, - error, - settingsRoutesList, -}) { - const t = useContext(I18nContext); - - const [searchQuery, setSearchQuery] = useState(''); - - const [searchIconColor, setSearchIconColor] = useState(IconColor.iconMuted); - - const settingsRoutesListArray = Object.values(settingsRoutesList); - const settingsSearchFuse = new Fuse(settingsRoutesListArray, { - shouldSort: true, - threshold: 0.3, - location: 0, - distance: 100, - maxPatternLength: 32, - minMatchCharLength: 1, - keys: ['tabMessage', 'sectionMessage', 'descriptionMessage'], - getFn: (routeObject, path) => routeObject[path](t), - }); - - const handleSearch = (_searchQuery) => { - const sanitizedSearchQuery = _searchQuery.trimStart(); - setSearchQuery(sanitizedSearchQuery); - if (sanitizedSearchQuery === '') { - setSearchIconColor(IconColor.iconMuted); - } else { - setSearchIconColor(IconColor.iconDefault); - } - - const fuseSearchResult = settingsSearchFuse.search(sanitizedSearchQuery); - const addressSearchResult = settingsRoutesListArray.filter((routes) => { - return ( - routes.tabMessage && - sanitizedSearchQuery && - isEqualCaseInsensitive(routes.tab, sanitizedSearchQuery) - ); - }); - - const results = [...addressSearchResult, ...fuseSearchResult]; - onSearch({ searchQuery: sanitizedSearchQuery, results }); - }; - - const renderStartAdornment = () => { - return ( - - - - ); - }; - - const renderEndAdornment = () => { - return ( - <> - {searchQuery && ( - handleSearch('')} - style={{ cursor: 'pointer' }} - > - - - )} - - ); - }; - - return ( - handleSearch(e.target.value)} - error={error} - fullWidth - autoFocus - autoComplete="off" - startAdornment={renderStartAdornment()} - endAdornment={renderEndAdornment()} - theme="bordered" - /> - ); -} - -SettingsSearch.propTypes = { - onSearch: PropTypes.func, - error: PropTypes.string, - settingsRoutesList: PropTypes.array, -}; diff --git a/ui/pages/settings/settings-search/settings-search.stories.js b/ui/pages/settings/settings-search/settings-search.stories.js deleted file mode 100644 index 907879ef9790..000000000000 --- a/ui/pages/settings/settings-search/settings-search.stories.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from 'react'; -import SettingsSearch from './settings-search'; - -export default { - title: 'Pages/Settings/SettingsSearch', -}; - -export const SettingsSearchComponent = () => { - return ; -};