- {
- plugin && plugin.profile.name !== 'filePanel' && (
-
-
-
- }>
-
-
-
-
-
- )
- }
{plugin?.profile?.maintainedBy?.toLowerCase() === 'remix' ? (
}>
@@ -75,13 +62,22 @@ const RemixUIPanelHeader = (props: RemixPanelProps) => {
{
plugin && plugin.profile.name !== 'filePanel' && (
-
-
- }>
-
-
-
-
+ <>
+
+
+ }>
+
+
+
+
+
+
+ }>
+
+
+
+
+ >
)
}
diff --git a/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx b/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx
index fa6760dc08..4a371ce915 100644
--- a/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx
+++ b/libs/remix-ui/panel/src/lib/plugins/panel-plugin.tsx
@@ -5,12 +5,15 @@ import './panel.css'
interface panelPLuginProps {
pluginRecord: PluginRecord,
initialState?: any,
+ highlightStamp?: number,
children?: any
}
const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => {
const localRef = useRef
(null)
const [view, setView] = useState()
+ const [showHighlight, setShowHighlight] = useState(false)
+
useEffect(() => {
const ref: any = panelRef || localRef
if (ref.current) {
@@ -19,9 +22,12 @@ const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => {
let view = props.pluginRecord.view
if (props.initialState) {
+ let hasInitialProps = false
+
view = React.Children.map((props.pluginRecord.view.props as any).children, child => {
- if (React.isValidElement(child) && typeof child.type === 'function') {
- // Safe to clone and pass `initialState`
+ if (React.isValidElement(child) && typeof child.type === 'function' && !hasInitialProps) {
+ hasInitialProps = true
+ // Safe to clone and pass `initialState`
return React.cloneElement(child, { ...props, initialState: props.initialState } as any)
}
return child
@@ -36,8 +42,20 @@ const RemixUIPanelPlugin = (props: panelPLuginProps, panelRef: any) => {
}
}, [])
+ useEffect(() => {
+ if (props.highlightStamp) setShowHighlight(true)
+ }, [props.highlightStamp])
+
+ useEffect(() => {
+ if (showHighlight) {
+ setTimeout(() => {
+ setShowHighlight(false)
+ }, 500)
+ }
+ }, [showHighlight])
+
return (
-
+
<>{view}>
)
diff --git a/libs/remix-ui/panel/src/lib/plugins/panel.css b/libs/remix-ui/panel/src/lib/plugins/panel.css
index 437471fabb..b872ff1ada 100644
--- a/libs/remix-ui/panel/src/lib/plugins/panel.css
+++ b/libs/remix-ui/panel/src/lib/plugins/panel.css
@@ -106,3 +106,7 @@ iframe {
.terminal-wrap.minimized.desktop {
}
+
+.highlight {
+ animation: highlight 2s forwards;
+}
diff --git a/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx b/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx
index 7ff51827bd..4e1fa59a2e 100644
--- a/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx
+++ b/libs/remix-ui/panel/src/lib/plugins/remix-ui-panel.tsx
@@ -9,6 +9,7 @@ export interface RemixPanelProps {
plugins: Record
,
header: JSX.Element,
pluginState?: any,
+ highlightStamp?: number
}
export function RemixPluginPanel(props: RemixPanelProps) {
@@ -18,7 +19,7 @@ export function RemixPluginPanel(props: RemixPanelProps) {
{Object.values(props.plugins).map((pluginRecord) => {
- return
+ return
})}
diff --git a/libs/remix-ui/renderer/src/lib/renderer.tsx b/libs/remix-ui/renderer/src/lib/renderer.tsx
index 00a7af8ab3..006de70049 100644
--- a/libs/remix-ui/renderer/src/lib/renderer.tsx
+++ b/libs/remix-ui/renderer/src/lib/renderer.tsx
@@ -75,8 +75,8 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => {
try {
const content = await plugin.call('fileManager', 'readFile', editorOptions.errFile)
const message = intl.formatMessage({ id: 'solidity.openaigptMessage' }, { content, messageText })
- await plugin.call('openaigpt', 'message', message)
- _paq.push(['trackEvent', 'ai', 'openai', 'explainSolidityError'])
+ await plugin.call('solcoder', 'error_explaining', message)
+ _paq.push(['trackEvent', 'ai', 'solcoder', 'error_explaining_SolidityError'])
} catch (err) {
console.error('unable to askGtp')
console.error(err)
@@ -111,7 +111,7 @@ export const Renderer = ({ message, opt = {}, plugin }: RendererProps) => {
onClick={() => { askGtp() }}
style={{ borderColor: "var(--ai)" }}
>
- ASK GPT
+ Ask RemixAI
diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
index f2dc284fae..6192777e31 100644
--- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
+++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx
@@ -297,7 +297,16 @@ export function UniversalDappUI(props: UdappProps) {
- {props.exEnvironment && props.exEnvironment.startsWith('injected') && {props.editInstance(props.instance)}}>}
+ {props.exEnvironment && props.exEnvironment.startsWith('injected') && (
+ }>
+ {
+ props.editInstance(props.instance)
+ }}
+ >
+
+ )}
{ props.isPinnedContract && props.instance.pinnedAt ? (
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 b5edd8a425..7936cda55e 100644
--- a/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
+++ b/libs/remix-ui/terminal/src/lib/remix-ui-terminal.tsx
@@ -235,10 +235,11 @@ export const RemixUiTerminal = (props: RemixUiTerminalProps) => {
try {
if (script.trim().startsWith('git')) {
// await this.call('git', 'execute', script) code might be used in the future
+ // TODO: rm gpt or redirect gpt to sol-pgt
} else if (script.trim().startsWith('gpt')) {
call('terminal', 'log',{ type: 'warn', value: `> ${script}` })
- await call('openaigpt', 'message', script)
- _paq.push(['trackEvent', 'ai', 'openai', 'askFromTerminal'])
+ await call('solcoder', 'solidity_answer', script)
+ _paq.push(['trackEvent', 'ai', 'solcoder', 'askFromTerminal'])
} else if (script.trim().startsWith('sol-gpt')) {
call('terminal', 'log',{ type: 'warn', value: `> ${script}` })
await call('solcoder', 'solidity_answer', script)
diff --git a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
index 7fb7dbea23..1d1dcf77c8 100644
--- a/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
+++ b/libs/remix-ui/terminal/src/lib/terminalWelcome.tsx
@@ -54,9 +54,6 @@ const TerminalWelcomeMessage = ({ packageJson, storage }) => {
ethers.js
{' '}
-
- gpt <your question here> {' '}
-
sol-gpt <your Solidity question here> {' '}
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
index 00fb539fa6..a7de212b38 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx
@@ -88,10 +88,10 @@ const Icon = ({ iconRecord, verticalIconPlugin, contextMenuAction, theme }: Icon
return (
<>
- {iconRecord.active &&
}
+ >
{
- ;(verticalIconPlugin as any).toggle(name)
+ if (iconRecord.pinned) {
+ verticalIconPlugin.call('pinnedPanel', 'highlight')
+ } else {
+ (verticalIconPlugin as any).toggle(name)
+ }
}}
{...{ plugin: name }}
onContextMenu={(e: any) => {
@@ -133,6 +137,10 @@ const Icon = ({ iconRecord, verticalIconPlugin, contextMenuAction, theme }: Icon
contextMenuAction={contextMenuAction}
/>
) : null}
+
>
)
diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/types/index.ts b/libs/remix-ui/vertical-icons-panel/src/lib/types/index.ts
index 754c897b8b..c95930ad4f 100644
--- a/libs/remix-ui/vertical-icons-panel/src/lib/types/index.ts
+++ b/libs/remix-ui/vertical-icons-panel/src/lib/types/index.ts
@@ -3,6 +3,7 @@ import { Profile } from '@remixproject/plugin-utils'
export type IconRecord = {
profile: Profile
active: boolean
+ pinned: boolean
class?: string
canbeDeactivated?: boolean
isRequired?: boolean
diff --git a/releaseDetails.json b/releaseDetails.json
index 75f4965ac0..db7cc4e491 100644
--- a/releaseDetails.json
+++ b/releaseDetails.json
@@ -1,10 +1,10 @@
{
- "version": "v0.49.0",
+ "version": "v0.50.0",
"title": "RELEASE HIGHLIGHTS",
- "highlight1": "Syntax highlighting for .toml files added",
- "highlight2": "'Deploy & Run Transactions' plugin's UI improved",
- "highlight3": "Remix AI model improved",
+ "highlight1": "Pin a plugin to the new right side panel",
+ "highlight2": "'zksync-ethers' NPM module supported in js/ts scripts",
+ "highlight3": "latest Solidity compiler version set to v0.8.26",
"highlight4": "",
"more": "Read More",
- "moreLink": "https://medium.com/remix-ide/remix-release-v0-49-0-b396ab7fff2b?source=friends_link&sk=2e3c6063841bbfa398e3e60d59d4fd48"
+ "moreLink": "https://medium.com/remix-ide/remix-release-v0-50-0-1b0ca47ce2d9?source=friends_link&sk=a1cec61a506047186cd8e0c4349cdb86"
}