Skip to content

Commit

Permalink
Merge branch 'master' into completion_enabled_default
Browse files Browse the repository at this point in the history
  • Loading branch information
STetsing authored Dec 20, 2024
2 parents 205b4d2 + ef14a31 commit c86c559
Show file tree
Hide file tree
Showing 54 changed files with 686 additions and 546 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Then, create a `index.js` file like this,
import panelJson from './panel.json';
import enJson from '../en';

// There may have some un-translated content. Always fill in the gaps with EN JSON.
// There may have some untranslated content. Always fill in the gaps with EN JSON.
// No need for a defaultMessage prop when render a FormattedMessage component.
export default Object.assign({}, enJson, {
...panelJson,
Expand All @@ -84,7 +84,7 @@ If you search `FormattedMessage` or `intl.formatMessage` in this project, you wi

**Why?**

Each non-english language will be filled in the gaps with english. Even though there may be some un-translated content, it will always use english as defaultMessage. That's why we don't need to provide a `defaultMessage` prop each time we render a `FormattedMessage` component.
Each non-english language will be filled in the gaps with english. Even though there may be some untranslated content, it will always use english as defaultMessage. That's why we don't need to provide a `defaultMessage` prop each time we render a `FormattedMessage` component.

But in some cases, the `id` prop may not be static. For example,
```jsx
Expand Down
4 changes: 3 additions & 1 deletion apps/remix-ide-e2e/src/commands/selectAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ class SelectAccount extends EventEmitter {
command (this: NightwatchBrowser, account?: string): NightwatchBrowser {
if (account) {
this.api
.click(`select[data-id="runTabSelectAccount"] [value="${account}"]`)
.click(`*[data-id="runTabSelectAccount"]`) //open the dropdown
.waitForElementVisible(`*[data-id="${account}"]`)
.click(`*[data-id="${account}"]`) //close the dropdown
.perform(() => {
this.emit('complete')
})
Expand Down
58 changes: 29 additions & 29 deletions apps/remix-ide-e2e/src/commands/switchEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,35 @@ import EventEmitter from 'events'
class switchEnvironment extends EventEmitter {
command (this: NightwatchBrowser, provider: string): NightwatchBrowser {
this.api.useCss().waitForElementVisible('[data-id="settingsSelectEnvOptions"]')
.perform((done) => {
this.api.isPresent({ selector: `[data-id="selected-provider-${provider}"]`, suppressNotFoundErrors: true, timeout: 5000}, (result) => {
if (result.value) {
done()
} else {
browser.perform(() => {
this.api
.click('[data-id="settingsSelectEnvOptions"] button') // open dropdown
.isPresent({ selector: `[data-id="dropdown-item-${provider}"]`, suppressNotFoundErrors: true, timeout: 5000}, (result) => {
console.log(result)
this.api.click('[data-id="settingsSelectEnvOptions"] button') // close dropdown
if (!result.value) {
this.api.pinGrid(provider, true)
.click('[data-id="settingsSelectEnvOptions"] button')
.waitForElementVisible(`[data-id="dropdown-item-${provider}"]`)
.click(`[data-id="dropdown-item-${provider}"]`)
.perform(() => done())
} else {
browser.click('[data-id="settingsSelectEnvOptions"] button')
.waitForElementVisible(`[data-id="dropdown-item-${provider}"]`)
.click(`[data-id="dropdown-item-${provider}"]`)
.perform(() => done())
}
})
})
}
})
}).perform(() => this.emit('complete'))
.perform((done) => {
this.api.isPresent({ selector: `[data-id="selected-provider-${provider}"]`, suppressNotFoundErrors: true, timeout: 5000 }, (result) => {
if (result.value) {
done()
} else {
browser.perform(() => {
this.api
.click('[data-id="settingsSelectEnvOptions"] button') // open dropdown
.isPresent({ selector: `[data-id="dropdown-item-${provider}"]`, suppressNotFoundErrors: true, timeout: 5000 }, (result) => {
console.log(result)
this.api.click('[data-id="settingsSelectEnvOptions"] button') // close dropdown
if (!result.value) {
this.api.pinGrid(provider, true)
.click('[data-id="settingsSelectEnvOptions"] button')
.waitForElementVisible(`[data-id="dropdown-item-${provider}"]`)
.click(`[data-id="dropdown-item-${provider}"]`)
.perform(() => done())
} else {
browser.click('[data-id="settingsSelectEnvOptions"] button')
.waitForElementVisible(`[data-id="dropdown-item-${provider}"]`)
.click(`[data-id="dropdown-item-${provider}"]`)
.perform(() => done())
}
})
})
}
})
}).perform(() => this.emit('complete'))

return this
}
}
Expand Down
1 change: 1 addition & 0 deletions apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module.exports = {
browser.pause(500)
.clickLaunchIcon('udapp')
.selectAccount('0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c')
.pause()
.setValue('input[placeholder="uint8 _numProposals"]', '2')
.click('*[data-id="Deploy - transact (not payable)"]')
.waitForElementPresent('*[data-id="universalDappUiContractActionWrapper"]', 60000)
Expand Down
4 changes: 2 additions & 2 deletions apps/remix-ide-e2e/src/tests/publishContract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module.exports = {
.openFile('ipfs/QmXYUS1ueS22EqNVRaKuZa31EgHLjKZ8uTM8vWhQLxa3pw')
},

/* Disabling the test until refactoring and the new swarm usage

'Publish on Swarm': '' + function (browser: NightwatchBrowser) {
browser
.click('#publishOnSwarm')
Expand All @@ -54,7 +54,7 @@ module.exports = {
})
.click('[data-id="publishToStorage-modal-footer-ok-react"]')
},
*/


'Should publish contract metadata to ipfs on deploy': function (browser: NightwatchBrowser) {
browser
Expand Down
11 changes: 6 additions & 5 deletions apps/remix-ide-e2e/src/tests/terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,10 @@ module.exports = {
browser
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.click('*[data-id="runTabSelectAccount"]')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
selector: '*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
timeout: 240000
})
.executeScriptInTerminal(`web3.eth.getCode('0x180587b00c8642e2c7ac3a758712d97e6f7bdcc7')`) // mainnet contract
Expand Down Expand Up @@ -361,10 +362,10 @@ module.exports = {
Resolver resolver = ens.resolver(node);
console.log(resolver.addr(node));
}
`
`
if (runMasterTests) {
const path = "//*[@class='view-line' and contains(.,'resolveENS') and contains(.,'view')]//span//span[contains(.,'(')]"

browser
// .clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
Expand Down Expand Up @@ -401,8 +402,8 @@ module.exports = {
.waitForElementVisible('#editorView')
.pause(10000) // the parser need to parse the code
.useXpath()
.scrollToLine(3)
.click(path)
.scrollToLine(3)
.click(path)
.perform(function () {
const actions = this.actions({ async: true });
return actions
Expand Down
4 changes: 3 additions & 1 deletion apps/remix-ide-e2e/src/tests/transactionExecution.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,13 @@ module.exports = {
.setSolidityCompilerVersion('soljson-v0.8.17+commit.8df45f5f.js')
.clickLaunchIcon('udapp')
.switchEnvironment('vm-mainnet-fork')
.click('*[data-id="runTabSelectAccount"]')
.waitForElementPresent({
locateStrategy: 'css selector',
selector: 'select[data-id="runTabSelectAccount"] option[value="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]',
selector: `*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]`,
timeout: 250000
}) // wait for the udapp to load the list of accounts
.click('*[data-id="0xdD870fA1b7C4700F2BD7f44238821C26f7392148"]')
.selectContract('MyResolver')
.createContract('')
.clickInstance(0)
Expand Down
14 changes: 13 additions & 1 deletion apps/remix-ide-e2e/src/tests/url.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,5 +340,17 @@ module.exports = {
.getEditorValue((content) => {
browser.assert.ok(content.indexOf('contract Lock {') !== -1, 'content does contain "contract Lock {"')
})
}
},

'Load remix with an iframe plugin #group4': function (browser: NightwatchBrowser) {
browser
.url('http://127.0.0.1:8080?activate=contract-verification')
.refreshPage()
.waitForElementVisible(
{
selector: '//*[contains(@data-id, "sidePanelSwapitTitle") and text()="Contract Verification"]',
locateStrategy: 'xpath'
}
)
}
}
8 changes: 4 additions & 4 deletions apps/remix-ide/meetings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Each other native plugin can request a guided tour with:
Other type of plugin may be able to the native plugin guided tour but we won't push this if the integration is not working out of the box.
We rather update the remix-plugin doc saying that `guided tour framework name` is the preferred one.

## web site
## website

we commit to have a public web site for general info about us.
It won't be a branded web site.
we commit to have a public website for general info about us.
It won't be a branded website.
We are asking a designer for improving the Liana's logo.
We don't need to have a framework (hugo, hexo) if that's too much overhead.
@liana is testing out the easiest solution.
Expand Down Expand Up @@ -98,7 +98,7 @@ first steps :
- put all the public link to the local package
- basic electron wrapper

## out reach beyond community
## outreach beyond community

We agree it is something interesting to explore,
It is not 100% dev tool nor remix so we should organize call with other people from EF at least
Expand Down
7 changes: 4 additions & 3 deletions apps/remix-ide/src/app/plugins/remixGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ export class RemixGuidePlugin extends ViewPlugin {
title={Data.title}
description={Data.description}
>
{ Data.sections.map(section => {
{ Data.sections.map((section, index) => {
return <RemixUIGridSection
plugin={this}
title={section.title}
hScrollable={true}
key={index}
>
{ section.cells.map(cell => {
{ section.cells.map((cell, index) => {
return <RemixUIGridCell
plugin={this}
title={cell.title}
Expand All @@ -128,7 +129,7 @@ export class RemixGuidePlugin extends ViewPlugin {
expandViewEl={
cell.expandViewElement
}
key={cell.title}
key={cell.title || index}
id={cell.title}
handleExpand={() => {
this.showVideo = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ export class TemplatesSelectionPlugin extends ViewPlugin {
tooltipTitle={template.tooltip}
hScrollable={false}
>
{template.items.map(item => {
{template.items.map((item, index) => {
return <RemixUIGridCell
plugin={this}
title={item.displayName}
key={item.name}
key={item.name || index}
id={item.name}
searchKeywords={[item.displayName, item.description, template.name]}
tagList={item.tagList}
Expand Down
Loading

0 comments on commit c86c559

Please sign in to comment.