From 7e249c550a41b0440fff21c32e23b5e8e544c959 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 6 Nov 2025 21:31:42 +0530 Subject: [PATCH 1/4] hide hidden on reload --- .../src/app/components/pinned-panel.tsx | 28 ++++++++++++++++--- .../app/src/lib/remix-app/remix-app.tsx | 4 +-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 47c9255dbda..6892465923b 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -20,6 +20,7 @@ const pinnedPanel = { export class PinnedPanel extends AbstractPanel { dispatch: React.Dispatch = () => {} loggedState: Record + pinnedPanelState: Record // pluginProfile, isClosed highlightStamp: number closedPlugin: any @@ -36,6 +37,9 @@ export class PinnedPanel extends AbstractPanel { super.remove(name) } }) + + let pinnedPanelState = window.localStorage.getItem('pinnedPanelState') + if (!pinnedPanelState) window.localStorage.setItem('pinnedPanelState', JSON.stringify({})) } async pinView (profile, view) { @@ -51,11 +55,25 @@ export class PinnedPanel extends AbstractPanel { } this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name) this.addView(profile, view) - this.plugins[profile.name].pinned = true - this.plugins[profile.name].active = true + let pinnedPanelState = window.localStorage.getItem('pinnedPanelState') + let isClosed = false + if (pinnedPanelState) { + pinnedPanelState = JSON.parse(pinnedPanelState) + if (pinnedPanelState['isClosed']) { + isClosed = true + await this.closePlugin(profile) + } + else { + this.plugins[profile.name].pinned = true + this.plugins[profile.name].active = true + } + } else { + this.plugins[profile.name].pinned = true + this.plugins[profile.name].active = true + } this.renderComponent() - this.events.emit('pinnedPlugin', profile) - this.emit('pinnedPlugin', profile) + this.events.emit('pinnedPlugin', profile, isClosed) + this.emit('pinnedPlugin', profile, isClosed) } async unPinView (profile) { @@ -77,6 +95,7 @@ export class PinnedPanel extends AbstractPanel { const pinnedPanel = document.querySelector('#pinned-panel') pinnedPanel.classList.add('d-none') this.closedPlugin = profile + window.localStorage.setItem('pinnedPanelState', JSON.stringify({pluginProfile: profile, isClosed: true})) this.events.emit('pluginClosed', profile) this.emit('pluginClosed', profile) } @@ -85,6 +104,7 @@ export class PinnedPanel extends AbstractPanel { const pinnedPanel = document.querySelector('#pinned-panel') pinnedPanel.classList.remove('d-none') this.closedPlugin = null + window.localStorage.setItem('pinnedPanelState', JSON.stringify({pluginProfile: profile, isClosed: false})) this.events.emit('pluginMaximized', profile) this.emit('pluginMaximized', profile) } diff --git a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx index 47416e46e6e..c99c6d37c7c 100644 --- a/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/remix-app.tsx @@ -125,8 +125,8 @@ const RemixApp = (props: IRemixAppUi) => { setLocale(nextLocale) }) - props.app.pinnedPanel.events.on('pinnedPlugin', () => { - setHidePinnedPanel(false) + props.app.pinnedPanel.events.on('pinnedPlugin', (profile, isClosed) => { + if (!isClosed) setHidePinnedPanel(false) }) props.app.pinnedPanel.events.on('unPinnedPlugin', () => { From 73b5ed8259879056b29156cc23f333b004b50856 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 7 Nov 2025 16:23:09 +0530 Subject: [PATCH 2/4] fix maximize --- apps/remix-ide/src/app/components/pinned-panel.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index 6892465923b..aae701e413f 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -55,6 +55,8 @@ export class PinnedPanel extends AbstractPanel { } this.loggedState = await this.call('pluginStateLogger', 'getPluginState', profile.name) this.addView(profile, view) + this.plugins[profile.name].pinned = true + this.plugins[profile.name].active = true let pinnedPanelState = window.localStorage.getItem('pinnedPanelState') let isClosed = false if (pinnedPanelState) { @@ -63,13 +65,6 @@ export class PinnedPanel extends AbstractPanel { isClosed = true await this.closePlugin(profile) } - else { - this.plugins[profile.name].pinned = true - this.plugins[profile.name].active = true - } - } else { - this.plugins[profile.name].pinned = true - this.plugins[profile.name].active = true } this.renderComponent() this.events.emit('pinnedPlugin', profile, isClosed) From c4bc8a4369a692521c30d40624da785da2a68797 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Fri, 7 Nov 2025 19:53:50 +0530 Subject: [PATCH 3/4] add e2e --- apps/remix-ide-e2e/src/tests/pinned_plugin.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/pinned_plugin.test.ts b/apps/remix-ide-e2e/src/tests/pinned_plugin.test.ts index e8e0af546c8..153ef9650c8 100644 --- a/apps/remix-ide-e2e/src/tests/pinned_plugin.test.ts +++ b/apps/remix-ide-e2e/src/tests/pinned_plugin.test.ts @@ -35,6 +35,17 @@ module.exports = { .click('*[data-id="restoreClosedPlugin"]') .waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]') }, + 'Close Solidity Compiler Plugin, reload IDE, it should be closed and restore it #group1': function (browser: NightwatchBrowser) { + browser + .waitForElementVisible('*[data-id="closePinnedPlugin"]') + .click('*[data-id="closePinnedPlugin"]') + .waitForElementNotVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]') + .waitForElementVisible('*[data-id="restoreClosedPlugin"') + .refresh() + .waitForElementVisible('*[data-id="restoreClosedPlugin"') + .click('*[data-id="restoreClosedPlugin"]') + .waitForElementVisible('*[data-pinnedplugin="movePluginToLeft-solidity"]') + }, 'Swap pinned Solidity Compiler Plugin with RemixAI Assistant when pinned plugin is closed #group1': function (browser: NightwatchBrowser) { browser .refreshPage() From 51f73b6529aa8c47433de410bd9a142651096cb8 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 10 Nov 2025 15:28:04 +0530 Subject: [PATCH 4/4] fixed linting --- apps/remix-ide/src/app/components/pinned-panel.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/remix-ide/src/app/components/pinned-panel.tsx b/apps/remix-ide/src/app/components/pinned-panel.tsx index aae701e413f..a92de36208c 100644 --- a/apps/remix-ide/src/app/components/pinned-panel.tsx +++ b/apps/remix-ide/src/app/components/pinned-panel.tsx @@ -20,7 +20,7 @@ const pinnedPanel = { export class PinnedPanel extends AbstractPanel { dispatch: React.Dispatch = () => {} loggedState: Record - pinnedPanelState: Record // pluginProfile, isClosed + pinnedPanelState: Record // pluginProfile, isClosed highlightStamp: number closedPlugin: any @@ -38,7 +38,7 @@ export class PinnedPanel extends AbstractPanel { } }) - let pinnedPanelState = window.localStorage.getItem('pinnedPanelState') + const pinnedPanelState = window.localStorage.getItem('pinnedPanelState') if (!pinnedPanelState) window.localStorage.setItem('pinnedPanelState', JSON.stringify({})) } @@ -61,7 +61,7 @@ export class PinnedPanel extends AbstractPanel { let isClosed = false if (pinnedPanelState) { pinnedPanelState = JSON.parse(pinnedPanelState) - if (pinnedPanelState['isClosed']) { + if (pinnedPanelState['isClosed']) { isClosed = true await this.closePlugin(profile) } @@ -90,7 +90,7 @@ export class PinnedPanel extends AbstractPanel { const pinnedPanel = document.querySelector('#pinned-panel') pinnedPanel.classList.add('d-none') this.closedPlugin = profile - window.localStorage.setItem('pinnedPanelState', JSON.stringify({pluginProfile: profile, isClosed: true})) + window.localStorage.setItem('pinnedPanelState', JSON.stringify({ pluginProfile: profile, isClosed: true })) this.events.emit('pluginClosed', profile) this.emit('pluginClosed', profile) } @@ -99,7 +99,7 @@ export class PinnedPanel extends AbstractPanel { const pinnedPanel = document.querySelector('#pinned-panel') pinnedPanel.classList.remove('d-none') this.closedPlugin = null - window.localStorage.setItem('pinnedPanelState', JSON.stringify({pluginProfile: profile, isClosed: false})) + window.localStorage.setItem('pinnedPanelState', JSON.stringify({ pluginProfile: profile, isClosed: false })) this.events.emit('pluginMaximized', profile) this.emit('pluginMaximized', profile) }