From 3b4788e8d15ec1871644bada612150c996323381 Mon Sep 17 00:00:00 2001 From: lianahus Date: Thu, 17 Feb 2022 12:06:14 +0100 Subject: [PATCH 1/3] autocomplete commands after 1 symbol instead of 3 --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx index f5a2a8868a..73b5b3e424 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx @@ -382,7 +382,7 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => { const handleAutoComplete = () => (
2)) && autoCompletState.data._options.length > 0 ? 'block' : 'none' }} + style={{ display: (autoCompletState.showSuggestions && autoCompletState.userInput !== '' && (autoCompletState.userInput.length > 0)) && autoCompletState.data._options.length > 0 ? 'block' : 'none' }} >
{autoCompletState.data._options.map((item, index) => { From de2f10ba099c1561b834580da0d62000ae7c2ade Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 18 Feb 2022 11:51:24 +0100 Subject: [PATCH 2/3] edited terminal's welcome text --- apps/remix-ide/src/lib/commands.js | 57 ------------------- libs/remix-ui/terminal/src/lib/commands.ts | 1 - .../terminal/src/lib/terminalWelcome.tsx | 4 +- 3 files changed, 3 insertions(+), 59 deletions(-) delete mode 100644 apps/remix-ide/src/lib/commands.js diff --git a/apps/remix-ide/src/lib/commands.js b/apps/remix-ide/src/lib/commands.js deleted file mode 100644 index 0f6ca3f897..0000000000 --- a/apps/remix-ide/src/lib/commands.js +++ /dev/null @@ -1,57 +0,0 @@ -const allPrograms = [ - { ethers: 'The ethers.js library is a compact and complete JavaScript library for Ethereum.' }, - { remix: 'Ethereum IDE and tools for the web.' }, - { web3: 'The web3.js library is a collection of modules which contain specific functionality for the ethereum ecosystem.' }, - { swarmgw: 'This library can be used to upload/download files to Swarm via https://swarm-gateways.net/.' } -] - -const allCommands = [ - { 'remix.execute(filepath)': 'Run the script specified by file path. If filepath is empty, script currently displayed in the editor is executed.' }, - { 'remix.exeCurrent()': 'Run the script currently displayed in the editor.' }, - { 'remix.help()': 'Display this help message.' }, - { 'remix.loadgist(id)': 'Load a gist in the file explorer.' }, - { 'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm or ipfs.' }, - - { 'swarmgw.get(url, cb)': 'Download files from Swarm via https://swarm-gateways.net/' }, - { 'swarmgw.put(content, cb)': 'Upload files to Swarm via https://swarm-gateways.net/' }, - - { 'ethers.Contract': 'This API provides a graceful connection to a contract deployed on the blockchain, simplifying calling and querying its functions and handling all the binary protocol and conversion as necessarily.' }, - { 'ethers.HDNode': 'A Hierarchical Deterministic Wallet represents a large tree of private keys which can reliably be reproduced from an initial seed.' }, - { 'ethers.Interface': 'The Interface Object is a meta-class that accepts a Solidity (or compatible) Application Binary Interface (ABI) and populates functions to deal with encoding and decoding the parameters to pass in and results returned.' }, - { 'ethers.providers': 'A Provider abstracts a connection to the Ethereum blockchain, for issuing queries and sending state changing transactions.' }, - { 'ethers.SigningKey': 'The SigningKey interface provides an abstraction around the secp256k1 elliptic curve cryptography library.' }, - { 'ethers.utils': 'The utility functions exposed in both the ethers umbrella package and the ethers-utils.' }, - { 'ethers.utils.AbiCoder': 'Create a new ABI Coder object' }, - { 'ethers.utils.RLP': 'This encoding method is used internally for several aspects of Ethereum, such as encoding transactions and determining contract addresses.' }, - { 'ethers.Wallet': 'A wallet manages a private/public key pair which is used to cryptographically sign transactions and prove ownership on the Ethereum network.' }, - { 'ethers.version': 'Contains the version of the ethers container object.' }, - - { 'web3.eth': 'Eth module for interacting with the Ethereum network.' }, - { 'web3.eth.accounts': 'The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.' }, - { 'web3.eth.abi': 'The web3.eth.abi functions let you de- and encode parameters to ABI (Application Binary Interface) for function calls to the EVM (Ethereum Virtual Machine).' }, - { 'web3.eth.ens': 'The web3.eth.ens functions let you interacting with ENS.' }, - { 'web3.eth.Iban': 'The web3.eth.Iban function lets convert Ethereum addresses from and to IBAN and BBAN.' }, - { 'web3.eth.net': 'Net module for interacting with network properties.' }, - { 'web3.eth.personal': 'Personal module for interacting with the Ethereum accounts.' }, - { 'web3.eth.subscribe': 'The web3.eth.subscribe function lets you subscribe to specific events in the blockchain.' }, - { 'web3.givenProvider': 'When using web3.js in an Ethereum compatible browser, it will set with the current native provider by that browser. Will return the given provider by the (browser) environment, otherwise null.' }, - { 'web3.modules': 'Contains the version of the web3 container object.' }, - { 'web3.providers': 'Contains the current available providers.' }, - { 'web3.shh': 'Shh module for interacting with the whisper protocol' }, - { 'web3.utils': 'This package provides utility functions for Ethereum dapps and other web3.js packages.' }, - { 'web3.version': 'Contains the version of the web3 container object.' }, - - { 'web3.eth.clearSubscriptions();': 'Resets subscriptions.' }, - { 'web3.eth.Contract(jsonInterface[, address][, options])': 'The web3.eth.Contract object makes it easy to interact with smart contracts on the ethereum blockchain.' }, - { 'web3.eth.accounts.create([entropy]);': 'The web3.eth.accounts contains functions to generate Ethereum accounts and sign transactions and data.' }, - { 'web3.eth.getAccounts();': 'Retrieve the list of accounts' }, - { 'web3.eth.accounts.privateKeyToAccount(privateKey [, ignoreLength ]);': 'Get the account from the private key' }, - { 'web3.eth.accounts.signTransaction(tx, privateKey [, callback]);': 'Sign Transaction' }, - { 'web3.eth.accounts.recoverTransaction(rawTransaction);': 'Sign Transaction' }, - { 'web3.eth.accounts.hashMessage(message);': 'Hash message' } -] - -module.exports = { - allPrograms, - allCommands -} diff --git a/libs/remix-ui/terminal/src/lib/commands.ts b/libs/remix-ui/terminal/src/lib/commands.ts index cc3b5e6963..0dc02b371b 100644 --- a/libs/remix-ui/terminal/src/lib/commands.ts +++ b/libs/remix-ui/terminal/src/lib/commands.ts @@ -8,7 +8,6 @@ export const allPrograms = [ export const allCommands = [ { 'remix.execute(filepath)': 'Run the script specified by file path. If filepath is empty, script currently displayed in the editor is executed.' }, { 'remix.exeCurrent()': 'Run the script currently displayed in the editor.' }, - // { 'remix.help()': 'Display this help message.' }, { 'remix.loadgist(id)': 'Load a gist in the file explorer.' }, // { 'remix.loadurl(url)': 'Load the given url in the file explorer. The url can be of type github, swarm or ipfs.' }, diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx index f222aca38e..2b2eba1c86 100644 --- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx +++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx @@ -16,12 +16,14 @@ const TerminalWelcomeMessage = ({ packageJson }) => { - Right click on a JavaScript file in the file explorer and then click \`Run\` +
The following libraries are accessible:
+
Type the library name to see available commands.
) } From c4068ce358c7127057d30135e2dfa1d5f4523f46 Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 18 Feb 2022 12:06:04 +0100 Subject: [PATCH 3/3] style --- libs/remix-ui/terminal/src/lib/remix-ui-terminal.css | 3 +++ libs/remix-ui/terminal/src/lib/terminalWelcome.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css index 0ffe440548..13402e45ee 100644 --- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css +++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.css @@ -53,6 +53,9 @@ element.style { .remix_ui_terminal_block > pre { max-height : 200px; } +.remix_ui_terminal_welcome { + font-weight: bold; +} .remix_ui_terminal_cli { white-space : nowrap; line-height : 1.7em; diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx index 2b2eba1c86..8a18545f67 100644 --- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx +++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx @@ -3,7 +3,7 @@ import React from 'react' // eslint-disable-line const TerminalWelcomeMessage = ({ packageJson }) => { return (
-
- Welcome to Remix {packageJson} -

+
Welcome to Remix {packageJson}

You can use this terminal to:
  • Check transactions details and start debugging.