From e3aa6b6d2a8b43a0fc79bbae54a4b4830b530d90 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 5 Jun 2024 13:25:24 +0100 Subject: [PATCH] refactor elements of homeTab as per review comments --- .../src/app/tabs/locales/en/home.json | 2 +- .../src/lib/components/homeTabFeatured.tsx | 2 +- .../src/lib/components/homeTabGetStarted.tsx | 4 +- .../src/lib/components/homeTabTitle.tsx | 142 ++++++++---------- .../home-tab/src/lib/remix-ui-home-tab.css | 10 +- 5 files changed, 78 insertions(+), 82 deletions(-) diff --git a/apps/remix-ide/src/app/tabs/locales/en/home.json b/apps/remix-ide/src/app/tabs/locales/en/home.json index 667e107078..c36b9bd3a3 100644 --- a/apps/remix-ide/src/app/tabs/locales/en/home.json +++ b/apps/remix-ide/src/app/tabs/locales/en/home.json @@ -49,7 +49,7 @@ "home.remixLinkedinProfile": "Remix Linkedin Profile", "home.remixMediumPosts": "Remix Medium Posts", "home.joinUsOnDiscord": "Join us on Discord", - "home.nativeIDE": "The Native IDE for Web3 Development.", + "home.nativeIDE": "Learn. Explore. Create", "home.website": "Website", "home.documentation": "Documentation", "home.remixPlugin": "Remix Plugin", diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index c40eaca016..0d101eed76 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -16,7 +16,7 @@ function HomeTabFeatured() { -
+
- */}
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx index 1765bbdd44..32e9434fba 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabTitle.tsx @@ -3,8 +3,55 @@ import React, { useEffect, useState, useRef, useContext } from 'react' import { FormattedMessage, useIntl } from 'react-intl' import { CustomTooltip } from '@remix-ui/helper' +import { Placement } from 'react-bootstrap/esm/Overlay' const _paq = (window._paq = window._paq || []) // eslint-disable-line +type HometabIconSection = { + textToolip: JSX.Element + urlLink: string + iconClass: 'fa-youtube'|'fa-x-twitter'|'fa-linkedin'|'fa-medium'|'fa-discord' + placement: Placement + matomoTrackingEntry: string[] +} + +const iconButtons: HometabIconSection[] = [ + { + textToolip: , + matomoTrackingEntry: ['trackEvent', 'hometab', 'socialMedia', 'youtube'], + urlLink: 'https://www.youtube.com/channel/UCjTUPyFEr2xDGN6Cg8nKDaA', + iconClass: 'fa-youtube', + placement: 'top' + }, + { + textToolip: , + matomoTrackingEntry: ['trackEvent', 'hometab', 'socialMedia', 'twitter'], + urlLink: 'https://twitter.com/EthereumRemix', + iconClass: 'fa-x-twitter', + placement: 'top' + }, + { + textToolip: , + matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'linkedin'], + urlLink: 'https://www.linkedin.com/company/ethereum-remix/', + iconClass: 'fa-linkedin', + placement: 'top' + }, + { + textToolip: , + matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'medium'], + urlLink: 'https://medium.com/remix-ide', + iconClass: 'fa-medium', + placement: 'top' + }, + { + textToolip: , + matomoTrackingEntry: ['trackEvent', 'hometab', 'socialmedia', 'discord'], + urlLink: 'https://discord.gg/mh9hFCKkEq', + iconClass: 'fa-discord', + placement: 'top' + } +] + function HomeTabTitle() { useEffect(() => { document.addEventListener('keyup', (e) => handleSearchKeyDown(e)) @@ -64,82 +111,24 @@ function HomeTabTitle() {
- } - tooltipTextClasses="border bg-light text-dark p-1 pr-3" - > - - - } - tooltipTextClasses="border bg-light text-dark p-1 pr-3" - > - - - } - tooltipTextClasses="border bg-light text-dark p-1 pr-3" - > - - - } - tooltipTextClasses="border bg-light text-dark p-1 pr-3" - > - - - - } - tooltipTextClasses="border bg-light text-dark p-1 pr-3" - > - - + {iconButtons.map((button, index) => ( + + + + ))}
@@ -163,7 +152,6 @@ function HomeTabTitle() { target="__blank" href="https://remix-plugin-docs.readthedocs.io/en/latest/" > - {/* */} Remix Desktop