Skip to content

Commit bc5c4fe

Browse files
authored
Merge branch 'master' into newaichat
2 parents 461153d + dc525db commit bc5c4fe

File tree

22 files changed

+96
-77
lines changed

22 files changed

+96
-77
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing
22

3-
Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.gg/XcvfUpZPsG).
3+
Everyone is welcome to contribute to Remix's codebase and please join our [Discord](https://discord.gg/7RvvZ4KX9P).
44

55
## Development
66
Remix libraries work closely with [Remix IDE](https://remix.ethereum.org). Each library has a README to explain its application.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[![GitHub contributors](https://img.shields.io/github/contributors/ethereum/remix-project?style=flat&logo=github)](https://github.com/ethereum/remix-project/graphs/contributors)
1313
[![Awesome Remix](https://img.shields.io/badge/Awesome--Remix-resources-green?logo=awesomelists)](https://github.com/ethereum/awesome-remix)
1414
[![GitHub](https://img.shields.io/github/license/ethereum/remix-project)](https://github.com/ethereum/remix-project/blob/master/LICENSE)
15-
[![Discord](https://img.shields.io/badge/join-discord-brightgreen.svg?style=flat&logo=discord)](https://discord.gg/XcvfUpZPsG)
15+
[![Discord](https://img.shields.io/badge/join-discord-brightgreen.svg?style=flat&logo=discord)](https://discord.gg/7RvvZ4KX9P)
1616
[![X Follow](https://img.shields.io/twitter/follow/ethereumremix?style=flat&logo=x&color=green)](https://x.com/ethereumremix)
1717

1818
</div>
@@ -267,4 +267,4 @@ parameters:
267267
- Curated list of Remix resources: https://github.com/ethereum/awesome-remix
268268
- Medium: https://medium.com/remix-ide
269269
- X: https://x.com/ethereumremix
270-
- Join Discord: https://discord.gg/XcvfUpZPsG
270+
- Join Discord: https://discord.gg/7RvvZ4KX9P

apps/remix-ide-e2e/src/tests/matomo.test.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ module.exports = {
7676
browser.execute(function () {
7777
localStorage.removeItem('config-v0.8:.remix.config')
7878
localStorage.setItem('showMatomo', 'true')
79-
localStorage.removeItem('matomo-perf-analytics-consent')
79+
localStorage.removeItem('matomo-analytics-consent')
8080
}, [])
8181
.refreshPage()
8282
.perform(done())
@@ -99,6 +99,12 @@ module.exports = {
9999
.pause(2000)
100100
.waitForElementPresent('*[data-id="beginnerbtn"]', 10000)
101101
.click('[data-id="beginnerbtn"]')
102+
.waitForElementVisible({
103+
selector: `//*[contains(text(), 'Welcome to Remix IDE')]`,
104+
locateStrategy: 'xpath'
105+
})
106+
.waitForElementVisible('*[id="remixTourSkipbtn"]')
107+
.click('*[id="remixTourSkipbtn"]')
102108
.clickLaunchIcon('settings')
103109
.waitForElementNotPresent('[id="settingsMatomoPerfAnalytics"]:checked')
104110
.execute(function () {
@@ -110,8 +116,6 @@ module.exports = {
110116
},
111117
'change settings #group2': function (browser: NightwatchBrowser) {
112118
browser
113-
.waitForElementVisible('*[id="remixTourSkipbtn"]')
114-
.click('*[id="remixTourSkipbtn"]')
115119
.waitForElementVisible('*[data-id="label-matomo-settings"]')
116120
.pause(1000)
117121
.click('*[data-id="label-matomo-settings"]')
@@ -133,7 +137,7 @@ module.exports = {
133137
browser.execute(function () {
134138
const oldTimestamp = new Date()
135139
oldTimestamp.setMonth(oldTimestamp.getMonth() - 7)
136-
localStorage.setItem('matomo-perf-analytics-consent', oldTimestamp.getTime().toString())
140+
localStorage.setItem('matomo-analytics-consent', oldTimestamp.getTime().toString())
137141
}, [])
138142
.refreshPage()
139143
.perform(done())
@@ -145,7 +149,7 @@ module.exports = {
145149
})
146150
.execute(function () {
147151

148-
const timestamp = window.localStorage.getItem('matomo-perf-analytics-consent');
152+
const timestamp = window.localStorage.getItem('matomo-analytics-consent');
149153
if (timestamp) {
150154

151155
const consentDate = new Date(Number(timestamp));
@@ -175,15 +179,15 @@ module.exports = {
175179
browser.execute(function () {
176180
const recentTimestamp = new Date()
177181
recentTimestamp.setMonth(recentTimestamp.getMonth() - 1)
178-
localStorage.setItem('matomo-perf-analytics-consent', recentTimestamp.getTime().toString())
182+
localStorage.setItem('matomo-analytics-consent', recentTimestamp.getTime().toString())
179183
}, [])
180184
.refreshPage()
181185
.perform(done())
182186
})
183187
// check if timestamp is younger than 6 months
184188
.execute(function () {
185189

186-
const timestamp = window.localStorage.getItem('matomo-perf-analytics-consent');
190+
const timestamp = window.localStorage.getItem('matomo-analytics-consent');
187191
if (timestamp) {
188192

189193
const consentDate = new Date(Number(timestamp));
@@ -217,7 +221,7 @@ module.exports = {
217221
browser.execute(function () {
218222
localStorage.removeItem('config-v0.8:.remix.config')
219223
localStorage.setItem('showMatomo', 'true')
220-
localStorage.removeItem('matomo-perf-analytics-consent')
224+
localStorage.removeItem('matomo-analytics-consent')
221225
}, [])
222226
.refreshPage()
223227
.perform(done())
@@ -233,7 +237,7 @@ module.exports = {
233237
.pause(2000)
234238
.execute(function () {
235239

236-
const timestamp = window.localStorage.getItem('matomo-perf-analytics-consent');
240+
const timestamp = window.localStorage.getItem('matomo-analytics-consent');
237241
if (timestamp) {
238242

239243
const consentDate = new Date(Number(timestamp));
@@ -259,7 +263,7 @@ module.exports = {
259263
browser.execute(function () {
260264
const oldTimestamp = new Date()
261265
oldTimestamp.setMonth(oldTimestamp.getMonth() - 7)
262-
localStorage.setItem('matomo-perf-analytics-consent', oldTimestamp.getTime().toString())
266+
localStorage.setItem('matomo-analytics-consent', oldTimestamp.getTime().toString())
263267
}, [])
264268
.refreshPage()
265269
.perform(done())
@@ -277,7 +281,7 @@ module.exports = {
277281
browser.execute(function () {
278282
const recentTimestamp = new Date()
279283
recentTimestamp.setMonth(recentTimestamp.getMonth() - 1)
280-
localStorage.setItem('matomo-perf-analytics-consent', recentTimestamp.getTime().toString())
284+
localStorage.setItem('matomo-analytics-consent', recentTimestamp.getTime().toString())
281285
}, [])
282286
.refreshPage()
283287
.perform(done())
@@ -296,7 +300,7 @@ module.exports = {
296300
localStorage.removeItem('config-v0.8:.remix.config')
297301
const recentTimestamp = new Date()
298302
recentTimestamp.setMonth(recentTimestamp.getMonth() - 1)
299-
localStorage.setItem('matomo-perf-analytics-consent', recentTimestamp.getTime().toString())
303+
localStorage.setItem('matomo-analytics-consent', recentTimestamp.getTime().toString())
300304
}, [])
301305
.refreshPage()
302306
.perform(done())
@@ -311,7 +315,7 @@ module.exports = {
311315
localStorage.removeItem('config-v0.8:.remix.config')
312316
const oldTimestamp = new Date()
313317
oldTimestamp.setMonth(oldTimestamp.getMonth() - 7)
314-
localStorage.setItem('matomo-perf-analytics-consent', oldTimestamp.getTime().toString())
318+
localStorage.setItem('matomo-analytics-consent', oldTimestamp.getTime().toString())
315319
}, [])
316320
.refreshPage()
317321
.perform(done())

apps/remix-ide-e2e/src/tests/providers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = {
7171
.clearValue('*[data-id="ganache-providerModalDialogModalBody-react"] input')
7272
.setValue('*[data-id="ganache-providerModalDialogModalBody-react"] input', 'https://scroll-rpc.publicnode.com')
7373
.modalFooterOKClick('ganache-provider')
74-
.pause(100)
74+
.pause(1000)
7575
.waitForElementPresent({ selector: `[data-id="selected-provider-ganache-provider"]`, timeout: 5000 })
7676
.pause(1000)
7777
},

apps/remix-ide-e2e/src/tests/script-runner.test.ts

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ const tests = {
2828
.click('button[data-id="script-config"]')
2929
.waitForElementVisible('[data-id="sr-loaded-default"]')
3030
.waitForElementVisible('[data-id="dependency-ethers-^5"]')
31-
.waitForElementVisible('[data-id="sr-load-ethers6"]')
31+
.waitForElementVisible('[data-id="sr-notloaded-ethers6"]')
3232
},
3333
'Should load script runner ethers6': function (browser: NightwatchBrowser) {
3434
browser
35-
.click('[data-id="sr-load-ethers6"]')
35+
.click('[data-id="sr-notloaded-ethers6"]')
3636
.waitForElementVisible('[data-id="sr-loaded-ethers6"]')
3737
.waitForElementPresent('[data-id="dependency-ethers-^6"]')
3838
},
@@ -74,6 +74,7 @@ const tests = {
7474
.waitForElementPresent('*[data-id="create-semaphore"]')
7575
.scrollAndClick('*[data-id="create-semaphore"]')
7676
.modalFooterOKClick('TemplatesSelection')
77+
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcircuits/semaphore.circom"]')
7778
.waitForElementVisible({
7879
locateStrategy: 'xpath',
7980
selector: "//li[@data-id='UIScriptRunner' and @role='tab']"
@@ -82,9 +83,37 @@ const tests = {
8283
locateStrategy: 'xpath',
8384
selector: "//li[@data-id='UIScriptRunner' and @role='tab']"
8485
})
85-
.waitForElementVisible('[data-id="sr-load-default"]')
86+
.waitForElementVisible('[data-id="sr-loaded-default"]')
8687
.waitForElementVisible('[data-id="dependency-ethers-^5"]')
87-
.waitForElementVisible('[data-id="sr-load-zksyncv6"]')
88+
.waitForElementVisible('[data-id="sr-notloaded-zksyncv6"]')
89+
},
90+
'open template that sets a config': function (browser: NightwatchBrowser) {
91+
browser
92+
.waitForElementVisible('*[data-id="workspacesMenuDropdown"]')
93+
.click('*[data-id="workspacesMenuDropdown"]')
94+
.click('*[data-id="workspacecreate"]')
95+
.waitForElementPresent('*[data-id="create-introToEIP7702"]')
96+
.scrollAndClick('*[data-id="create-introToEIP7702"]')
97+
.modalFooterOKClick('TemplatesSelection')
98+
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcontracts/Example7702.sol"]')
99+
.waitForElementVisible({
100+
locateStrategy: 'xpath',
101+
selector: "//li[@data-id='UIScriptRunner' and @role='tab']"
102+
})
103+
.click({
104+
locateStrategy: 'xpath',
105+
selector: "//li[@data-id='UIScriptRunner' and @role='tab']"
106+
})
107+
.waitForElementVisible('[data-id="sr-notloaded-default"]')
108+
.waitForElementVisible('[data-id="sr-loaded-ethers6"]')
109+
},
110+
'reset to default after template': function (browser: NightwatchBrowser) {
111+
browser
112+
.refreshPage()
113+
.waitForElementVisible('button[data-id="script-config"]')
114+
.click('button[data-id="script-config"]')
115+
.waitForElementVisible('[data-id="sr-notloaded-default"]')
116+
.waitForElementVisible('[data-id="sr-loaded-ethers6"]')
88117
},
89118
'switch to default workspace that should be on ethers6': function (browser: NightwatchBrowser) {
90119
browser
@@ -99,7 +128,9 @@ const tests = {
99128
})
100129
.waitForElementVisible('[data-id="sr-loaded-ethers6"]')
101130
.waitForElementPresent('[data-id="dependency-ethers-^6"]')
102-
}
131+
},
132+
133+
103134
}
104135

105136
module.exports = tests

apps/remix-ide-e2e/src/tests/transactionExecution.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ module.exports = {
261261
}) // wait for the udapp to load the list of accounts
262262
.click('*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]')
263263
.selectContract('MyResolver')
264+
.pause(5000)
264265
.createContract('')
265266
.clickInstance(0)
266267
.getAddressAtPosition(0, (address) => {

apps/remix-ide/src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class AppComponent {
227227

228228
const electronTracking = (window as any).electronAPI ? await (window as any).electronAPI.canTrackMatomo() : false
229229

230-
const lastMatomoCheck = window.localStorage.getItem('matomo-perf-analytics-consent')
230+
const lastMatomoCheck = window.localStorage.getItem('matomo-analytics-consent')
231231
const sixMonthsAgo = new Date();
232232
sixMonthsAgo.setMonth(sixMonthsAgo.getMonth() - 6);
233233

apps/remix-ide/src/app/plugins/script-runner-bridge.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,18 @@ export class ScriptRunnerBridgePlugin extends Plugin {
7878
this.renderComponent()
7979
})
8080

81+
this.plugin.on('fileManager', 'fileAdded', async (file: string) => {
82+
if (file && file === configFileName) {
83+
await this.loadCustomConfig()
84+
await this.loadConfigurations()
85+
this.renderComponent()
86+
}
87+
})
88+
8189
this.plugin.on('fileManager', 'fileSaved', async (file: string) => {
82-
if (file === configFileName && this.enableCustomScriptRunner) {
90+
if (file && file === configFileName) {
8391
await this.loadCustomConfig()
92+
await this.loadConfigurations()
8493
this.renderComponent()
8594
}
8695
})

apps/remix-ide/src/app/plugins/templates-selection/templates-selection-plugin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export class TemplatesSelectionPlugin extends ViewPlugin {
330330
>
331331
<div className='d-flex justify-content-between h-100 flex-column'>
332332
<span className='pt-4 px-1 h6 text-dark'>{template.description}</span>
333-
<span style={{ cursor: 'pointer' }} className='mt-2 btn btn-sm border align-items-left' onClick={() => template.onClick()}>{template.onClickLabel}</span>
333+
<span style={{ cursor: 'pointer' }} className='mt-2 mb-1 btn btn-sm border align-items-left' onClick={() => template.onClick()}>{template.onClickLabel}</span>
334334
</div>
335335
</RemixUIGridCell>}
336336
</RemixUIGridSection>

apps/remix-ide/src/app/plugins/templates-selection/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const templates = (intl: any, plugin: any): TemplateGroup[] => {
269269
tooltip: "Cookbook is a Smart Contract Search Tool. Click here to open Cookbook and browse Contracts.",
270270
onClick: async () => {
271271
await plugin.call('manager', 'activatePlugin', 'cookbookdev')
272-
plugin.call('menuicons', 'showContent', 'cookbookdev')
272+
await plugin.call('sidePanel', 'focus', 'cookbookdev')
273273
},
274274
onClickLabel: 'Open Cookbook Plugin',
275275
description: 'Discover more templates!',

0 commit comments

Comments
 (0)