-
+
BETA TESTING
-
Our community supports us.
-
You can join Beta Testing before each release of Remix IDE. Help us test now and get a handle on new features!
+
Our community supports us.
+
You can join Beta Testing before each release of Remix IDE. Help us test now and get a handle on new features!
+
More
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx
index 84b2fb4f57..41a4d8f36c 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeaturedPlugins.tsx
@@ -5,6 +5,7 @@ import { ThemeContext, themes } from '../themeContext'
import Carousel from 'react-multi-carousel'
import 'react-multi-carousel/lib/styles.css'
import CustomNavButtons from './customNavButtons'
+const itemsToShow = 5
declare global {
interface Window {
_paq: any
@@ -20,16 +21,39 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
const themeFilter = useContext(ThemeContext)
const carouselRef = useRef(null)
+ const carouselRefDiv = useRef(null)
- // Todo doesn't work
useEffect(() => {
- window.addEventListener("scroll", handleScroll)
+ document.addEventListener("wheel", handleScroll)
return () => {
- window.removeEventListener("scroll", handleScroll)
+ document.removeEventListener("wheel", handleScroll)
}
}, [])
+ function isDescendant(parent, child) {
+ let node = child.parentNode;
+ while (node != null) {
+ if (node === parent) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+ return false;
+}
const handleScroll = (e) => {
+ if (isDescendant(carouselRefDiv.current, e.target)) {
+ e.stopPropagation()
+ let nextSlide = 0
+ if (e.wheelDelta < 0) {
+ nextSlide = carouselRef.current.state.currentSlide + 1;
+ if ((carouselRef.current.state.totalItems - carouselRef.current.state.currentSlide) * carouselRef.current.state.itemWidth + 5 < carouselRef.current.state.containerWidth) return // 5 is approx margins
+ carouselRef.current.goToSlide(nextSlide)
+ } else {
+ nextSlide = carouselRef.current.state.currentSlide - 1;
+ if (nextSlide < 0) nextSlide = 0
+ carouselRef.current.goToSlide(nextSlide)
+ }
+ }
}
const startSolidity = async () => {
@@ -61,17 +85,30 @@ function HomeTabFeaturedPlugins ({plugin}: HomeTabFeaturedPluginsProps) {
return (
Featured Plugins
-
+
}
+ focusOnSelect={true}
+ customButtonGroup={
+
+ }
arrows={false}
swipeable={false}
draggable={true}
showDots={false}
- responsive={{ desktop: { breakpoint: { max: 3000, min: 1024 }, items: 5} }}
+ responsive={
+ {
+ superLargeDesktop: {
+ breakpoint: { max: 4000, min: 3000 },
+ items: itemsToShow
+ },
+ desktop: {
+ breakpoint: { max: 3000, min: 1024 },
+ items: itemsToShow
+ }
+ }
+ }
renderButtonGroupOutside={true}
ssr={true} // means to render carousel on server-side.
keyBoardControl={true}
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
index f27f489198..b3bd1cd3b5 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
@@ -18,6 +18,41 @@ interface HomeTabGetStartedProps {
function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) {
const themeFilter = useContext(ThemeContext)
+ const carouselRef = useRef(null)
+ const carouselRefDiv = useRef(null)
+
+ useEffect(() => {
+ document.addEventListener("wheel", handleScroll)
+ return () => {
+ document.removeEventListener("wheel", handleScroll)
+ }
+ }, [])
+
+ function isDescendant(parent, child) {
+ let node = child.parentNode;
+ while (node != null) {
+ if (node === parent) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+ return false;
+}
+ const handleScroll = (e) => {
+ if (isDescendant(carouselRefDiv.current, e.target)) {
+ e.stopPropagation()
+ let nextSlide = 0
+ if (e.wheelDelta < 0) {
+ nextSlide = carouselRef.current.state.currentSlide + 1;
+ if ((carouselRef.current.state.totalItems - carouselRef.current.state.currentSlide) * carouselRef.current.state.itemWidth + 5 < carouselRef.current.state.containerWidth) return // 5 is approx margins
+ carouselRef.current.goToSlide(nextSlide)
+ } else {
+ nextSlide = carouselRef.current.state.currentSlide - 1;
+ if (nextSlide < 0) nextSlide = 0
+ carouselRef.current.goToSlide(nextSlide)
+ }
+ }
+ }
const createWorkspace = async (templateName) => {
await plugin.appManager.activatePlugin('filePanel')
@@ -36,16 +71,31 @@ function HomeTabGetStarted ({plugin}: HomeTabGetStartedProps) {
- Project Templates
-
+
- }
+
+ }
arrows={false}
swipeable={false}
draggable={true}
showDots={false}
- responsive={{ desktop: { breakpoint: { max: 3000, min: 1024 }, items: 5} }}
+ responsive={
+ {
+ superLargeDesktop: {
+ breakpoint: { max: 4000, min: 3000 },
+ items: 5
+ },
+ desktop: {
+ breakpoint: { max: 3000, min: 1024 },
+ items: 5,
+ partialVisibilityGutter: 0
+ }
+ }
+ }
renderButtonGroupOutside={true}
ssr={true} // means to render carousel on server-side.
keyBoardControl={true}
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx
index 0fdc6ab5ff..e9d1a345b3 100644
--- a/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/homeTabLearn.tsx
@@ -50,20 +50,20 @@ function HomeTabLearn ({plugin}: HomeTabLearnProps) {
setState((prevState) => {return { ...prevState, visibleTutorial: VisibleTutorial.Basics }})}>
- Remix Basics
+ Remix Basics
{(state.visibleTutorial === VisibleTutorial.Basics) &&
Introduction to Remix's interface and concepts used in Ethereum, as well as the basics of Solidity.
startLearnEthTutorial('basics')}>Get Started
}
setState((prevState) => {return { ...prevState, visibleTutorial: VisibleTutorial.Intermediate }})}>
- Remix Intermediate
+ Remix Intermediate
{(state.visibleTutorial === VisibleTutorial.Intermediate) && Using the web3.js to interact with a contract. Using Recorder tool.
startLearnEthTutorial('useofweb3js')}>Get Started
}
setState((prevState) => {return { ...prevState, visibleTutorial: VisibleTutorial.Advanced }})}>
- Remix Advanced
+ Remix Advanced
{(state.visibleTutorial === VisibleTutorial.Advanced) && Learn the Proxy Pattern and working with Libraries in Remix. Learn to use the Debugger.
startLearnEthTutorial('deploylibraries')}>Get Started
}
diff --git a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
index 803c9f7ec4..8a8470304d 100644
--- a/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx
@@ -23,7 +23,7 @@ function PluginButton ({ imgPath, envID, envText, callback, l2, description, rem
onClick={() => callback()}
>
-
+
diff --git a/libs/remix-ui/home-tab/src/lib/components/workspaceTemplate.tsx b/libs/remix-ui/home-tab/src/lib/components/workspaceTemplate.tsx
index ad079053a8..4610236f79 100644
--- a/libs/remix-ui/home-tab/src/lib/components/workspaceTemplate.tsx
+++ b/libs/remix-ui/home-tab/src/lib/components/workspaceTemplate.tsx
@@ -16,7 +16,7 @@ function WorkspaceTemplate ({ gsID, workspaceTitle, description, callback }: Wor
data-id={'landingPageStart' + gsID}
onClick={() => callback()}
>
-
+
{workspaceTitle}
{description}
diff --git a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css
index d6ced30e67..011a179161 100644
--- a/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css
+++ b/libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.css
@@ -1,11 +1,9 @@
.remixui_home_text {
- cursor: pointer;
font-size: 0.8rem;
font-weight: normal;
max-width: 300px;
}
.remixui_home_text:hover {
- cursor: pointer;
text-decoration: underline;
}
.remixui_home_homeContainer {