Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update vids & tags #5066

Merged
merged 8 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/remix-ide/src/app/plugins/remixGuide.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.RGCellStyle {
min-height: 8.5rem;
max-width: 12rem;
min-width: 12rem;
max-height: 8.5rem;
}
26 changes: 15 additions & 11 deletions apps/remix-ide/src/app/plugins/remixGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { RemixUIGridView } from '@remix-ui/remix-ui-grid-view'
import { RemixUIGridSection } from '@remix-ui/remix-ui-grid-section'
import { RemixUIGridCell } from '@remix-ui/remix-ui-grid-cell'
import * as Data from './remixGuideData.json'
import './remixGuide.css'
//@ts-ignore
const _paq = (window._paq = window._paq || [])

Expand Down Expand Up @@ -98,13 +99,13 @@ export class RemixGuidePlugin extends ViewPlugin {
showUntagged={true}
showPin={false}
tagList={[
['beginner', 'danger'],
['advanced', 'warning'],
['Remix', 'primary'],
['Beginner', 'danger'],
['Advanced', 'warning'],
['AI', 'success'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the AI tag isn't used.. maybe remove it?

['plugins', 'secondary'],
['solidity', 'primary'],
['vyper', 'info'],
['L2', 'danger']
['Plugins', 'secondary'],
['Solidity', 'primary'],
['EVM', 'secondary']
]}
title={Data.title}
description={Data.description}
Expand All @@ -119,7 +120,9 @@ export class RemixGuidePlugin extends ViewPlugin {
return <RemixUIGridCell
plugin={this}
title={cell.title}
titleTooltip={cell.titleTooltip}
tagList={cell.tagList}
classList='RGCellStyle'
expandViewEl={
cell.expandViewElement
}
Expand All @@ -129,12 +132,13 @@ export class RemixGuidePlugin extends ViewPlugin {
this.showVideo = true
this.videoID = cell.expandViewElement.videoID
this.renderComponent()
_paq.push(['trackEvent', 'remixGuide', 'playGuide', cell.title])
}}
logo={cell.expandViewElement.logo}
>
<a href={"https://www.youtube.com/@" + cell.authorURL} target="__blank">
<img src={"//img.youtube.com/vi/" + this.videoID + "/0.jpg"} style={{ height: '70px', width: '70px' }}></img>
</a>
<img
src={"//img.youtube.com/vi/" + cell.expandViewElement.videoID + "/0.jpg"}
style={{ height: '100px', width: 'fit-content', cursor: 'pointer' }}
></img>
</RemixUIGridCell>
})}
</RemixUIGridSection>
Expand All @@ -157,7 +161,7 @@ export class RemixGuidePlugin extends ViewPlugin {
<iframe style={{ minHeight: "500px", minWidth: "1000px" }} width="1000" height="500" src={"https://www.youtube.com/embed/" + this.videoID + "?si=ZdckOaSPR7VsLj_2"} allowFullScreen></iframe>
</div>
<div className="modal-footer d-flex flex-column">
<button onClick={() => {
<button className="btn btn-secondary" onClick={() => {
this.showVideo = false
this.renderComponent()
}}>Close</button>
Expand Down
253 changes: 235 additions & 18 deletions apps/remix-ide/src/app/plugins/remixGuideData.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,261 @@
{
"logo": "assets/img/YouTubeLogo.webp",
"title": "Remix Guide",
"description": "Streamlined access to categorized video tutorials for mastering Remix IDE. From fundamentals to advanced techniques, level up your development skills with ease.",
"sections": [
{
"title": "Basics",
"hScrollable": "true",
"title": "Remix Basics",
"hScrollable": "false",
"cells": [
{
"title": "first item",
"title": "Intro to Remix",
"titleTooltip": "Example tooltip",
"tagList": [
"L2",
"AI"
"Remix",
"Beginner"
],
"authorURL": "EatTheBlocks",
"expandViewElement": {
"videoID": "vH8T3In6ZkE",
"logo": "https://yt3.ggpht.com/9NFZbC9mkA152sSWJJgNBls6GlBdknsF-9gi6ZVk_xsHjmc82j3q1Pd5a--GCnOKUrP-YtNbHls=s48-c-k-c0x00ffffff-no-rj"
"videoID": "vH8T3In6ZkE"
}
},
{
"title": "second item",
"title": "Workspaces",
"tagList": [
"solidity",
"AI"
"Remix",
"Beginner"
],
"expandViewElement": {
"videoID": "vH8T3In6ZkE",
"logo": "https://yt3.ggpht.com/9NFZbC9mkA152sSWJJgNBls6GlBdknsF-9gi6ZVk_xsHjmc82j3q1Pd5a--GCnOKUrP-YtNbHls=s48-c-k-c0x00ffffff-no-rj"
"videoID": "_VepN5pcA0k"
}
},
{
"title": "third item",
"title": "Remixd",
"tagList": [
"vyper",
"AI"
"Remix",
"Beginner"
],
"expandViewElement": {
"videoID": "vH8T3In6ZkE",
"logo": "https://yt3.ggpht.com/9NFZbC9mkA152sSWJJgNBls6GlBdknsF-9gi6ZVk_xsHjmc82j3q1Pd5a--GCnOKUrP-YtNbHls=s48-c-k-c0x00ffffff-no-rj"
"videoID": "2OAx2UoLYEI"
}
},
{
"title": "Verifying w/ Etherscan",
"tagList": [
"Remix",
"Solidity",
"Plugins"
],
"expandViewElement": {
"videoID": "hEJ1OlT8jQ4"
}
},
{
"title": "Essential Features",
"tagList": [
"Remix",
"Plugins"
],
"expandViewElement": {
"videoID": "rBExlmWLCBA"
}
},
{
"title": "Remix w/ Hardhat",
"tagList": [
"Remix"
],
"expandViewElement": {
"videoID": "8adSqvhvumQ"
}
}
]
},
{
"title": "Solidity Basics",
"hScrollable": "false",
"cells": [
{
"title": "Hello World",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "g_t0Td4Kr6M"
}
},
{
"title": "Events",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "nopo9KwwRg4"
}
},
{
"title": "Functions",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "71cmPaD_AnQ"
}
},
{
"title": "Payable Functions",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "yD9EL1QN40Q"
}
},
{
"title": "State Variables",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "4XQsHBJScEk"
}
},
{
"title": "Gas & Gas Price",
"tagList": [
"Solidity",
"Beginner"
],
"expandViewElement": {
"videoID": "oTS9uxU6cAM"
}
}
]
},
{
"title": "Remix Techniques",
"hScrollable": "false",
"cells": [
{
"title": "Proxy Contracts",
"tagList": [
"Remix",
"Solidity"
],
"expandViewElement": {
"videoID": "YJZV9uiDbJI"
}
},
{
"title": "Compile & Run",
"tagList": [
"Remix"
],
"expandViewElement": {
"videoID": "ZR8sh7MRDQ4"
}
},
{
"title": "Scripts",
"tagList": [
"Remix"
],
"expandViewElement": {
"videoID": "Eh1qgOurDxU"
}
},
{
"title": "Txn Recorder",
"tagList": [
"Remix"
],
"expandViewElement": {
"videoID": "GchvmIRSxUo"
}
},
{
"title": "Solidity Static Analyzers",
"tagList": [
"Remix",
"Solidity"
],
"expandViewElement": {
"videoID": "0frxvI-r5oU"
}
},
{
"title": "Eth Doc Generator",
"tagList": [
"Remix",
"Solidity"
],
"expandViewElement": {
"videoID": "UkMqdI7TGxw"
}
}
]
},
{
"title": "Low Level Solidity Videos",
"hScrollable": "false",
"cells": [
{
"title": "EVM Storage",
"tagList": [
"EVM",
"Solidity",
"Advanced"
],
"expandViewElement": {
"videoID": "vTeav5Rinco"
}
},
{
"title": "Transient Storage",
"tagList": [
"EVM",
"Solidity",
"Advanced"
],
"expandViewElement": {
"videoID": "0-hiB5I39Mk"
}
},
{
"title": "Bit Masking",
"tagList": [
"EVM",
"Solidity",
"Advanced"
],
"expandViewElement": {
"videoID": "luCjY2IQEuw"
}
},
{
"title": "Structs in Storage",
"tagList": [
"EVM",
"Solidity",
"Advanced"
],
"expandViewElement": {
"videoID": "xWkOlxerVJw"
}
},
{
"title": "Arrays in Storage",
"tagList": [
"EVM",
"Solidity",
"Advanced"
],
"expandViewElement": {
"videoID": "74vyHBD_L1E"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide/src/remixAppManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ let requiredModules = [
'dgit',
'pinnedPanel',
'pluginStateLogger',
'remixGuide',
//'remixGuide',
'environmentExplorer',
'templateSelection',
'matomo',
Expand Down
12 changes: 10 additions & 2 deletions libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ interface RemixUIGridCellProps {
pinStateCallback?: any
logo?: string
logos?: string[]
logoURL?: string
title: string
titleTooltip?: string
hideTitle?: boolean
tagList?: string[] // max 8, others will be ignored
classList?: string
Expand Down Expand Up @@ -77,13 +79,19 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
<div className={ `${pinned ? "" : "border-dark "}` + "d-flex mx-0 p-2 bg-light border border-secondary remixui_grid_cell_container " + props.classList || ''} data-id={"remixUIGS" + props.title}>
<div className="d-flex remixui_grid_cell w-100 flex-column">
{ !props.hideTitle && <div className='d-flex flex-row pb-1 mb-1 align-items-end' style={{ minWidth: '8rem', height: '1rem' }}>
{ props.logo && <img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/> }
{ props.logo ? props.logoURL !== '' ?
<a href={props.logoURL} target="__blank">
<img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/>
</a> :
<img className='remixui_grid_view_logo mr-1' src={props.logo} style={{ width: '1rem', height: '1rem' }}/> :
<></>
}
{ props.logos && props.logos.map((logo) => <img className='remixui_grid_view_logo mr-1' src={logo} style={{ width: '1rem', height: '1rem' }}/>)}
{ props.title &&
<CustomTooltip
placement="top"
tooltipId={`overlay-tooltip-new${props.title}`}
tooltipText={ props.title }
tooltipText={ props.titleTooltip ? props.titleTooltip : props.title }
>
<label
className='m-0 p-0 text-uppercase align-items-left font-weight-bold text-truncate overflow-hidden whitespace-nowra'
Expand Down
Loading