File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
remix-ide/src/app/components Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,20 @@ module.exports = {
8484 . waitForElementVisible ( '.codicon-layout-sidebar-right' )
8585 . waitForElementVisible ( '*[data-pinnedplugin="movePluginToRight-solidity"]' )
8686 } ,
87+ 'Click vertical icon of pinned plugin to unhide right side panel #group1' : function ( browser : NightwatchBrowser ) {
88+ browser
89+ . refreshPage ( )
90+ . waitForElementVisible ( '*[data-pinnedplugin="movePluginToLeft-udapp"]' )
91+ . waitForElementVisible ( '#right-side-panel' )
92+ . click ( '*[data-id="hideRightSidePanel"]' )
93+ . waitForElementVisible ( '.codicon-layout-sidebar-right-off' )
94+ . waitForElementNotVisible ( '#right-side-panel' )
95+ // Click the vertical icon for the pinned plugin (udapp)
96+ . click ( '*[data-id="verticalIconsKindudapp"]' )
97+ . waitForElementVisible ( '#right-side-panel' )
98+ . waitForElementVisible ( '.codicon-layout-sidebar-right' )
99+ . waitForElementVisible ( '*[data-pinnedplugin="movePluginToLeft-udapp"]' )
100+ } ,
87101 'Hide left side panel using toggle icon on top bar #group1' : function ( browser : NightwatchBrowser ) {
88102 browser
89103 . waitForElementVisible ( '#side-panel' )
Original file line number Diff line number Diff line change @@ -219,6 +219,26 @@ export class RightSidePanel extends AbstractPanel {
219219 }
220220
221221 highlight ( ) {
222+ // If the right side panel is hidden, unhide it when a pinned icon is clicked
223+ if ( this . isHidden ) {
224+ const pinnedPanel = document . querySelector ( '#right-side-panel' )
225+ this . isHidden = false
226+ this . hiddenPlugin = null
227+ pinnedPanel ?. classList . remove ( 'd-none' )
228+ this . emit ( 'rightSidePanelShown' )
229+ this . events . emit ( 'rightSidePanelShown' )
230+
231+ // Update localStorage
232+ const panelStates = JSON . parse ( window . localStorage . getItem ( 'panelStates' ) || '{}' )
233+ const currentPlugin = this . currentFocus ( )
234+ const pluginProfile = currentPlugin && this . plugins [ currentPlugin ] ? this . plugins [ currentPlugin ] . profile : null
235+ panelStates . rightSidePanel = {
236+ isHidden : false ,
237+ pluginProfile : pluginProfile
238+ }
239+ window . localStorage . setItem ( 'panelStates' , JSON . stringify ( panelStates ) )
240+ }
241+
222242 this . highlightStamp = Date . now ( )
223243 this . renderComponent ( )
224244 }
You can’t perform that action at this time.
0 commit comments