Skip to content

Commit b6ae0e0

Browse files
authored
Merge pull request #1942 from ethereum/rmOptimism
dragbar z-index fixed, removed Optimism, added Cairo
2 parents 4fdf4ad + 1a98bfd commit b6ae0e0

File tree

9 files changed

+66
-75
lines changed

9 files changed

+66
-75
lines changed
6.45 KB
Loading

apps/remix-ide/src/remixAppManager.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,6 @@ export class RemixAppManager extends PluginManager {
145145
pattern: [],
146146
sticky: true
147147
})
148-
await this.call('filePanel', 'registerContextMenuItem', {
149-
id: 'optimism-compiler',
150-
name: 'compileCustomAction',
151-
label: 'Compile with Optimism',
152-
type: [],
153-
extension: ['.sol'],
154-
path: [],
155-
pattern: [],
156-
sticky: true
157-
})
158148
}
159149
}
160150

libs/remix-core-plugin/src/lib/compiler-artefacts.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ export class CompilerArtefacts extends Plugin {
4848
saveCompilationPerFileResult(file, source, languageVersion, data)
4949
})
5050

51-
this.on('optimism-compiler', 'compilationFinished', (file, source, languageVersion, data) => {
52-
this.compilersArtefacts.__last = new CompilerAbstract(languageVersion, data, source)
53-
saveCompilationPerFileResult(file, source, languageVersion, data)
54-
})
55-
5651
this.on('solidityUnitTesting', 'compilationFinished', (file, source, languageVersion, data) => {
5752
this.compilersArtefacts.__last = new CompilerAbstract(languageVersion, data, source)
5853
saveCompilationPerFileResult(file, source, languageVersion, data)

libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
left: 0px;
88
top: 0px;
99
width: 0.3em;
10-
z-index: 9999;
10+
z-index: 1000;
1111
}
1212

1313
.overlay {
@@ -17,7 +17,7 @@
1717
width: 100vw;
1818
height: 100vh;
1919
display: block;
20-
z-index: 9998;
20+
z-index: 1000;
2121
}
2222

2323
.dragbar:hover,

libs/remix-ui/home-tab/src/lib/components/pluginButton.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,26 @@ interface PluginButtonProps {
66
imgPath: string,
77
envID: string,
88
envText: string,
9-
callback: any
9+
callback: any,
10+
l2?: boolean
1011
}
1112

12-
function PluginButton ({ imgPath, envID, envText, callback }: PluginButtonProps) {
13+
function PluginButton ({ imgPath, envID, envText, callback, l2 }: PluginButtonProps) {
1314
const themeFilter = useContext(ThemeContext)
1415

1516
return (
16-
<button
17-
className="btn border-secondary d-flex mr-3 text-nowrap justify-content-center flex-column align-items-center remixui_envButton"
18-
data-id={'landingPageStart' + envText}
19-
onClick={() => callback()}
20-
>
21-
<img className="m-2 align-self-center remixui_envLogo" id={envID} src={imgPath} alt="" style={ { filter: themeFilter.filter } } />
22-
<label className="text-uppercase text-dark remixui_cursorStyle">{envText}</label>
23-
</button>
17+
<div>
18+
<button
19+
className="btn border-secondary d-flex mr-3 text-nowrap justify-content-center flex-column align-items-center remixui_home_envButton"
20+
data-id={'landingPageStart' + envText}
21+
onClick={() => callback()}
22+
>
23+
<img className="m-2 align-self-center remixui_home_envLogo" id={envID} src={imgPath} alt="" style={ { filter: themeFilter.filter } } />
24+
<label className="text-uppercase text-dark remixui_home_cursorStyle">{envText}</label>
25+
</button>
26+
{ l2 && <label className="bg-light mx-1 px-1 mb-0 mx-2 position-relative remixui_home_l2Label">L2</label> }
27+
28+
</div>
2429
)
2530
}
2631

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,85 @@
1-
.remixui_text {
1+
.remixui_home_text {
22
cursor: pointer;
33
font-weight: normal;
44
max-width: 300px;
55
}
6-
.remixui_text:hover {
6+
.remixui_home_text:hover {
77
cursor: pointer;
88
text-decoration: underline;
99
}
10-
.remixui_homeContainer {
10+
.remixui_home_homeContainer {
1111
overflow-y: hidden;
1212
overflow-y: auto;
1313
flex-grow: 3;
1414
}
15-
.remixui_hpLogoContainer {
15+
.remixui_home_hpLogoContainer {
1616
margin: 30px;
1717
padding-right: 90px;
1818
}
19-
.remixui_mediaBadge {
19+
.remixui_home_mediaBadge {
2020
font-size: 2em;
2121
height: 2em;
2222
width: 2em;
2323
}
24-
.remixui_mediaBadge:focus {
24+
.remixui_home_mediaBadge:focus {
2525
outline: none;
2626
}
27-
.remixui_image {
27+
.remixui_home_image {
2828
height: 1em;
2929
width: 1em;
3030
text-align: center;
3131
}
32-
.remixui_logoImg {
32+
.remixui_home_logoImg {
3333
height: 10em;
3434
}
35-
.remixui_rightPanel {
35+
.remixui_home_rightPanel {
3636
right: 0;
3737
position: absolute;
3838
z-index: 3;
3939
}
40-
.remixui_remixHomeMedia {
40+
.remixui_home_remixHomeMedia {
4141
overflow-y: auto;
4242
overflow-x: hidden;
4343
}
44-
.remixui_panels {
44+
.remixui_home_panels {
4545
box-shadow: 0px 0px 13px -7px;
4646
}
47-
.remixui_labelIt {
47+
.remixui_home_labelIt {
4848
margin-bottom: 0;
4949
}
50-
.remixui_bigLabelSize {
50+
.remixui_home_bigLabelSize {
5151
font-size: 13px;
5252
}
53-
.remixui_seeAll {
53+
.remixui_home_seeAll {
5454
margin-top: 7px;
5555
white-space: nowrap;
5656
}
57-
.remixui_importFrom p {
57+
.remixui_home_importFrom p {
5858
margin-right: 10px;
5959
}
60-
.remixui_logoContainer img{
60+
.remixui_home_logoContainer img{
6161
height: 150px;
6262
opacity: 0.7;
6363
}
64-
.remixui_envLogo {
64+
.remixui_home_envLogo {
6565
height: 16px;
6666
}
67-
.remixui_cursorStyle {
67+
.remixui_home_cursorStyle {
6868
cursor: pointer;
6969
}
70-
.remixui_envButton {
70+
.remixui_home_envButton {
7171
width: 120px;
7272
height: 70px;
7373
}
74-
.remixui_media {
74+
.remixui_home_media {
7575
overflow: hidden;
7676
max-width: 400px;
7777
transition: .5s ease-out;
7878
z-index: 1000;
7979
}
80-
.remixui_migrationBtn {
80+
.remixui_home_migrationBtn {
8181
width: 100px;
8282
}
83+
.remixui_home_l2Label {
84+
bottom: 10px;
85+
}

libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
150150
plugin.verticalIcons.select('solidity')
151151
_paq.push(['trackEvent', 'pluginManager', 'userActivate', 'solidity'])
152152
}
153-
const startOptimism = async () => {
154-
await plugin.appManager.activatePlugin('optimism-compiler')
155-
plugin.verticalIcons.select('optimism-compiler')
156-
_paq.push(['trackEvent', 'pluginManager', 'userActivate', 'optimism-compiler'])
153+
const startCairo = async () => {
154+
await plugin.appManager.activatePlugin('cairo_compiler')
155+
plugin.verticalIcons.select('cairo_compiler')
156+
_paq.push(['trackEvent', 'pluginManager', 'userActivate', 'cairo_compiler'])
157157
}
158158
const startSolhint = async () => {
159159
await plugin.appManager.activatePlugin(['solidity', 'solhint'])
@@ -232,7 +232,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
232232
<label style={ { fontSize: 'xxx-large', height: 'auto', alignSelf: 'flex-end' } }>Remix IDE</label>
233233
</div>
234234
<div className="mr-4 d-flex">
235-
<img className="mt-4 mb-2 remixui_logoImg" src="assets/img/guitarRemiCroped.webp" onClick={ () => playRemi() } alt=""></img>
235+
<img className="mt-4 mb-2 remixui_home_logoImg" src="assets/img/guitarRemiCroped.webp" onClick={ () => playRemi() } alt=""></img>
236236
<audio
237237
id="remiAudio"
238238
muted={false}
@@ -241,14 +241,14 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
241241
></audio>
242242
</div>
243243
</div>
244-
<div className="row remixui_hpSections mx-2 mr-4" data-id="landingPageHpSections">
244+
<div className="row mx-2 mr-4" data-id="landingPageHpSections">
245245
<div className="ml-3">
246246
<div className="mb-5">
247247
<h4>Featured Plugins</h4>
248248
<div className="d-flex flex-row pt-2">
249249
<ThemeContext.Provider value={ state.themeQuality }>
250250
<PluginButton imgPath="assets/img/solidityLogo.webp" envID="solidityLogo" envText="Solidity" callback={() => startSolidity()} />
251-
<PluginButton imgPath="assets/img/optimismLogo.webp" envID="optimismLogo" envText="Optimism" callback={() => startOptimism()} />
251+
<PluginButton imgPath="assets/img/cairoLogo.webp" envID="CairoLogo" envText="Cairo compiler" l2={true} callback={() => startCairo()} />
252252
<PluginButton imgPath="assets/img/solhintLogo.webp" envID="solhintLogo" envText="Solhint linter" callback={() => startSolhint()} />
253253
<PluginButton imgPath="assets/img/learnEthLogo.webp" envID="learnEthLogo" envText="LearnEth" callback={() => startLearnEth()} />
254254
<PluginButton imgPath="assets/img/sourcifyLogo.webp" envID="sourcifyLogo" envText="Sourcify" callback={() => startSourceVerify()} />
@@ -261,11 +261,11 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
261261
<h4>File</h4>
262262
<p className="mb-1">
263263
<i className="mr-2 far fa-file"></i>
264-
<span className="ml-1 mb-1 remixui_text" onClick={() => createNewFile()}>New File</span>
264+
<span className="ml-1 mb-1 remixui_home_text" onClick={() => createNewFile()}>New File</span>
265265
</p>
266266
<p className="mb-1">
267267
<i className="mr-2 far fa-file-alt"></i>
268-
<span className="ml-1 remixui_labelIt remixui_bigLabelSize} remixui_text">
268+
<span className="ml-1 remixui_home_labelIt remixui_home_bigLabelSize remixui_home_text">
269269
Open Files
270270
<input title="open file" type="file" onChange={(event) => {
271271
event.stopPropagation()
@@ -275,7 +275,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
275275
</p>
276276
<p className="mb-1">
277277
<i className="mr-1 far fa-hdd"></i>
278-
<span className="ml-1 remixui_text" onClick={() => connectToLocalhost()}>Connect to Localhost</span>
278+
<span className="ml-1 remixui_home_text" onClick={() => connectToLocalhost()}>Connect to Localhost</span>
279279
</p>
280280
<p className="mt-3 mb-0"><label>LOAD FROM:</label></p>
281281
<div className="btn-group">
@@ -289,28 +289,28 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
289289
<h4>Resources</h4>
290290
<p className="mb-1">
291291
<i className="mr-2 fas fa-book"></i>
292-
<a className="remixui_text" target="__blank" href="https://remix-ide.readthedocs.io/en/latest/#">Documentation</a>
292+
<a className="remixui_home_text" target="__blank" href="https://remix-ide.readthedocs.io/en/latest/#">Documentation</a>
293293
</p>
294294
<p className="mb-1">
295295
<i className="mr-2 fab fa-gitter"></i>
296-
<a className="remixui_text" target="__blank" href="https://gitter.im/ethereum/remix">Gitter channel</a>
296+
<a className="remixui_home_text" target="__blank" href="https://gitter.im/ethereum/remix">Gitter channel</a>
297297
</p>
298298
<p className="mb-1">
299-
<img id='remixHhomeWebsite' className="mr-2 remixui_image" src={ plugin.profile.icon } style={ { filter: state.themeQuality.filter } } alt=''></img>
300-
<a className="remixui_text" target="__blank" href="https://remix-project.org">Featuring website</a>
299+
<img id='remixHhomeWebsite' className="mr-2 remixui_home_image" src={ plugin.profile.icon } style={ { filter: state.themeQuality.filter } } alt=''></img>
300+
<a className="remixui_home_text" target="__blank" href="https://remix-project.org">Featuring website</a>
301301
</p>
302302
<p className="mb-1">
303-
<i className="mr-2 fab fa-ethereum remixui_image"></i>
304-
<span className="remixui_text" onClick={() => switchToPreviousVersion()}>Old experience</span>
303+
<i className="mr-2 fab fa-ethereum remixui_home_image"></i>
304+
<span className="remixui_home_text" onClick={() => switchToPreviousVersion()}>Old experience</span>
305305
</p>
306306
</div>
307307
</div>
308308
</div>
309309
</div>
310-
<div className="d-flex flex-column remixui_rightPanel">
310+
<div className="d-flex flex-column remixui_home_rightPanel">
311311
<div className="d-flex pr-3 py-2 align-self-end" id="remixIDEMediaPanelsTitle">
312312
<button
313-
className="btn-info p-2 m-1 border rounded-circle remixui_mediaBadge fab fa-twitter"
313+
className="btn-info p-2 m-1 border rounded-circle remixui_home_mediaBadge fab fa-twitter"
314314
id="remixIDEHomeTwitterbtn"
315315
title="Twitter"
316316
onClick={(e) => {
@@ -321,7 +321,7 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
321321
}}
322322
></button>
323323
<button
324-
className="btn-danger p-2 m-1 border rounded-circle remixui_mediaBadge fab fa-medium"
324+
className="btn-danger p-2 m-1 border rounded-circle remixui_home_mediaBadge fab fa-medium"
325325
id="remixIDEHomeMediumbtn"
326326
title="Medium blogs"
327327
onClick={(e) => {
@@ -332,9 +332,9 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
332332
}}
333333
></button>
334334
</div>
335-
<div className="mr-3 d-flex bg-light remixui_panels" style={ { visibility: state.showMediaPanel === 'none' ? 'hidden' : 'visible' } } id="remixIDEMediaPanels">
336-
<div id="remixIDE_MediumBlock" className="p-2 mx-1 mt-3 mb-0 remixui_remixHomeMedia" style={ { maxHeight: maxHeight } }>
337-
<div id="medium-widget" className="px-3 remixui_media" hidden={state.showMediaPanel !== 'medium'} style={ { maxHeight: elHeight } }>
335+
<div className="mr-3 d-flex bg-light remixui_home_panels" style={ { visibility: state.showMediaPanel === 'none' ? 'hidden' : 'visible' } } id="remixIDEMediaPanels">
336+
<div id="remixIDE_MediumBlock" className="p-2 mx-1 mt-3 mb-0 remixui_home_remixHomeMedia" style={ { maxHeight: maxHeight } }>
337+
<div id="medium-widget" className="px-3 remixui_home_media" hidden={state.showMediaPanel !== 'medium'} style={ { maxHeight: elHeight } }>
338338
<div
339339
id="retainable-rss-embed"
340340
data-rss="https://medium.com/feed/remix-ide"
@@ -348,8 +348,8 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
348348
</div>
349349
</div>
350350
</div>
351-
<div id="remixIDE_TwitterBlock" className="p-2 mx-1 mt-3 mb-0 remixui_remixHomeMedia" hidden={state.showMediaPanel !== 'twitter'} style={ { maxHeight: maxHeight, marginRight: '28px' } } >
352-
<div className="remixui_media" style={ { minHeight: elHeight } } >
351+
<div id="remixIDE_TwitterBlock" className="p-2 mx-1 mt-3 mb-0 remixui_home_remixHomeMedia" hidden={state.showMediaPanel !== 'twitter'} style={ { maxHeight: maxHeight, marginRight: '28px' } } >
352+
<div className="remixui_home_media" style={ { minHeight: elHeight } } >
353353
<a className="twitter-timeline"
354354
data-width="330"
355355
data-theme={ state.themeQuality.name }

libs/remix-ui/panel/src/lib/dragbar/dragbar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
left: 0px;
88
top: 0px;
99
height: 0.3em;
10-
z-index: 9999;
10+
z-index: 1000;
1111
}
1212

1313
.overlay {

libs/remix-ui/run-tab/src/lib/actions/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ const setupEvents = () => {
7474

7575
plugin.on('yulp', 'compilationFinished', (file, source, languageVersion, data) => broadcastCompilationResult(file, source, languageVersion, data))
7676

77-
plugin.on('optimism-compiler', 'compilationFinished', (file, source, languageVersion, data) => broadcastCompilationResult(file, source, languageVersion, data))
78-
7977
plugin.on('udapp', 'setEnvironmentModeReducer', (env: { context: string, fork: string }, from: string) => {
8078
dispatch(displayPopUp(plugin.REACT_API.envToasterContent(env, from)))
8179
setExecutionContext(env, plugin.REACT_API.web3Dialog())

0 commit comments

Comments
 (0)