Merge branch 'master' into editorColors

pull/1742/head
Liana Husikyan 3 years ago committed by GitHub
commit a7e5377a74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 20
      .circleci/config.yml
  2. 3
      .gitmodules
  3. 2
      apps/remix-ide/ci/publishIpfs
  4. 1
      apps/remix-ide/src/app/files/fileManager.js
  5. 6
      apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
  6. 8
      libs/remix-core-plugin/src/lib/compiler-fetch-and-compile.ts
  7. 4
      libs/remix-ui/tabs/.babelrc
  8. 1
      libs/remix-ui/tabs/react-tabs
  9. 22
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx
  10. 4
      libs/remix-ui/workspace/src/lib/actions/events.ts
  11. 6318
      package-lock.json

@ -72,8 +72,6 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -107,8 +105,6 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
@ -143,8 +139,6 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -178,8 +172,6 @@ jobs:
parallelism: 12
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npx nx build remix-ide --with-deps
@ -214,8 +206,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run:
@ -249,8 +239,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npx nx build remix-ide --with-deps
- run: npx nx build remix-ide-e2e-src-local-plugin
@ -285,8 +273,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npm run build:production
@ -315,8 +301,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- setup_remote_docker
- run: npm install
- run: npm run downloadsolc_assets
@ -343,8 +327,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run downloadsolc_assets
- run: npm run build:production
@ -373,8 +355,6 @@ jobs:
steps:
- checkout
- run: git submodule sync --recursive
- run: git submodule update --recursive --init
- run: npm install
- run: npm run build:libs
- run: npm run downloadsolc_assets

3
.gitmodules vendored

@ -1,3 +0,0 @@
[submodule "libs/remix-ui/tabs/react-tabs"]
path = libs/remix-ui/tabs/react-tabs
url = https://github.com/reactjs/react-tabs

@ -3,7 +3,7 @@
const IpfsHttpClient = require('ipfs-http-client')
const { globSource } = IpfsHttpClient
console.log('current folder', process.cwd())
const folder = process.cwd() + '/temp_publish_docker';
const folder = process.cwd() + '/dist/apps/remix-ide';
(async () => {
const host = 'ipfs.remixproject.org'

@ -141,6 +141,7 @@ class FileManager extends Plugin {
const provider = this.fileProviderOf('/')
// emit rootFolderChanged so that File Explorer reloads the file tree
provider.event.emit('rootFolderChanged', provider.workspace || '/')
this.emit('rootFolderChanged', provider.workspace || '/')
}
/**

@ -310,10 +310,10 @@ class ContractDropdownUI {
const data = self.runView.compilersArtefacts.getCompilerAbstract(contractObject.contract.file)
self.runView.compilersArtefacts.addResolvedContract(helper.addressToString(address), data)
if (self.ipfsCheckedState) {
_paq.push(['trackEvent', 'udapp', 'DeployAndPublish', this.networkName, this.networkId])
_paq.push(['trackEvent', 'udapp', 'DeployAndPublish', this.networkName + '_' + this.networkId])
publishToStorage('ipfs', self.runView.fileProvider, self.runView.fileManager, selectedContract)
} else {
_paq.push(['trackEvent', 'udapp', 'DeployOnly', this.networkName, this.networkId])
_paq.push(['trackEvent', 'udapp', 'DeployOnly', this.networkName + '_' + this.networkId])
}
}
@ -347,7 +347,7 @@ class ContractDropdownUI {
}
deployContract (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) {
_paq.push(['trackEvent', 'udapp', 'DeployContractTo', this.networkName, this.networkId])
_paq.push(['trackEvent', 'udapp', 'DeployContractTo', this.networkName + '_' + this.networkId])
const { statusCb } = callbacks
if (!contractMetadata || (contractMetadata && contractMetadata.autoDeployLib)) {
return this.blockchain.deployContractAndLibraries(selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb)

@ -67,11 +67,9 @@ export class FetchAndCompile extends Plugin {
}
}
let name = network.name.toLowerCase()
name = name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main"
let data
try {
data = await this.call('source-verification', 'fetchByNetwork', contractAddress, name.toLowerCase())
data = await this.call('source-verification', 'fetchByNetwork', contractAddress, network.id)
} catch (e) {
setTimeout(_ => this.emit('notFound', contractAddress), 0) // plugin framework returns a time out error although it actually didn't find the source...
this.unresolvedAddresses.push(contractAddress)
@ -84,7 +82,7 @@ export class FetchAndCompile extends Plugin {
}
// set the solidity contract code using metadata
await this.call('fileManager', 'setFile', `${targetPath}/${name}/${contractAddress}/metadata.json`, JSON.stringify(data.metadata, null, '\t'))
await this.call('fileManager', 'setFile', `${targetPath}/${network.id}/${contractAddress}/metadata.json`, JSON.stringify(data.metadata, null, '\t'))
const compilationTargets = {}
for (let file in data.metadata.sources) {
const urls = data.metadata.sources[file].urls
@ -96,7 +94,7 @@ export class FetchAndCompile extends Plugin {
// nothing to do, the compiler callback will handle those
} else {
file = file.replace('browser/', '') // should be fixed in the remix IDE end.
const path = `${targetPath}/${name}/${contractAddress}/${file}`
const path = `${targetPath}/${network.id}/${contractAddress}/${file}`
await this.call('fileManager', 'setFile', path, source.content)
compilationTargets[path] = { content: source.content }
}

@ -1,4 +1,4 @@
{
"presets": [["@nrwl/web/babel", { "useBuiltIns": "usage" }]],
"plugins": ["@babel/plugin-proposal-class-properties"]
"presets": ["@nrwl/react/babel"],
"plugins": []
}

@ -1 +0,0 @@
Subproject commit 5a1fb0dc4b79f811e63e2f029786ff36b68bcbf4

@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect, useReducer } from 'react' // eslint-disable-line
import { Tab, Tabs, TabList, TabPanel } from '../../react-tabs/src/index'
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'
import './remix-ui-tabs.css'
/* eslint-disable-next-line */
@ -21,6 +21,8 @@ export const TabsUI = (props: TabsUIProps) => {
const [selectedIndex, setSelectedIndex] = useState(-1)
const currentIndexRef = useRef(-1)
const tabsRef = useRef({})
const tabsElement = useRef(null)
const tabs = useRef(props.tabs)
tabs.current = props.tabs // we do this to pass the tabs list to the onReady callbacks
@ -53,11 +55,22 @@ export const TabsUI = (props: TabsUIProps) => {
currentIndexRef.current = index
setSelectedIndex(index)
}
const transformScroll = (event) => {
if (!event.deltaY) {
return
}
event.currentTarget.scrollLeft += event.deltaY + event.deltaX
event.preventDefault()
}
useEffect(() => {
props.onReady({
activateTab,
active
})
return () => { tabsElement.current.removeEventListener('wheel', transformScroll) }
}, [])
return (
@ -70,8 +83,13 @@ export const TabsUI = (props: TabsUIProps) => {
<Tabs
className="tab-scroll"
selectedIndex={selectedIndex}
domRef={(domEl) => {
if (tabsElement.current) return
tabsElement.current = domEl
tabsElement.current.addEventListener('wheel', transformScroll)
}}
>
<TabList className="d-flex flex-row justify-content-center align-items-center">
<TabList className="d-flex flex-row align-items-center">
{props.tabs.map((tab, i) => <Tab className="py-1" key={tab.name}>{renderTab(tab, i)}</Tab>)}
</TabList>
{props.tabs.map((tab) => <TabPanel key={tab.name} ></TabPanel>)}

@ -41,6 +41,10 @@ export const listenOnPluginEvents = (filePanelPlugin) => {
plugin.on('remixd', 'rootFolderChanged', async (path: string) => {
rootFolderChanged(path)
})
plugin.on('fileManager', 'rootFolderChanged', async (path: string) => {
rootFolderChanged(path)
})
}
export const listenOnProviderEvents = (provider) => (reducerDispatch: React.Dispatch<any>) => {

6318
package-lock.json generated

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save