Skip to content

Commit e067fa8

Browse files
committed
fix panel initial state
1 parent db8010b commit e067fa8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

apps/remix-ide/src/app/components/right-side-panel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ export class RightSidePanel extends AbstractPanel {
7373
}
7474

7575
async pinView (profile, view) {
76-
if (this.hiddenPlugin) {
76+
// Only show the panel if we're pinning a different plugin than the one that's currently hidden
77+
if (this.hiddenPlugin && this.hiddenPlugin.name !== profile.name) {
7778
const pinnedPanel = document.querySelector('#right-side-panel')
7879
pinnedPanel?.classList.remove('d-none')
7980
this.hiddenPlugin = null

apps/remix-ide/src/app/components/side-panel.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ export class SidePanel extends AbstractPanel {
3535

3636
if (panelStates.leftSidePanel) {
3737
this.isHidden = panelStates.leftSidePanel.isHidden || false
38+
// Apply d-none class to hide the panel on reload if it was hidden
39+
if (this.isHidden) {
40+
const sidePanel = document.querySelector('#side-panel')
41+
sidePanel?.classList.add('d-none')
42+
}
3843
} else {
3944
// Initialize with default state if not found
4045
this.isHidden = false

0 commit comments

Comments
 (0)