Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
1e4ce4a7
Unverified
Commit
1e4ce4a7
authored
Apr 01, 2020
by
yann300
Committed by
GitHub
Apr 01, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2687 from ethereum/fix-collapsing-panel
Fixed collapsing solidity locals panel
parents
3a075e1d
92bb37c4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
TreeView.js
src/app/ui/TreeView.js
+8
-1
remixd.js
test-browser/tests/remixd.js
+1
-4
No files found.
src/app/ui/TreeView.js
View file @
1e4ce4a7
...
@@ -45,6 +45,7 @@ class TreeView {
...
@@ -45,6 +45,7 @@ class TreeView {
this
.
extractData
=
opts
.
extractData
||
this
.
extractDataDefault
this
.
extractData
=
opts
.
extractData
||
this
.
extractDataDefault
this
.
formatSelf
=
opts
.
formatSelf
||
this
.
formatSelfDefault
this
.
formatSelf
=
opts
.
formatSelf
||
this
.
formatSelfDefault
this
.
view
=
null
this
.
view
=
null
this
.
expandPath
=
[]
}
}
render
(
json
,
expand
)
{
render
(
json
,
expand
)
{
...
@@ -86,14 +87,20 @@ class TreeView {
...
@@ -86,14 +87,20 @@ class TreeView {
${
caret
}
${
caret
}
<span>
${
self
.
formatSelf
(
key
,
data
,
li
)}
</span>
<span>
${
self
.
formatSelf
(
key
,
data
,
li
)}
</span>
</div>`
</div>`
const
expanded
=
self
.
expandPath
.
includes
(
keyPath
)
li
.
appendChild
(
label
)
li
.
appendChild
(
label
)
if
(
data
.
children
)
{
if
(
data
.
children
)
{
var
list
=
yo
`<ul key=
${
keyPath
}
data-id="treeViewUlList
${
keyPath
}
" class=
${
css
.
ul_tv
}
>
${
children
}
</ul>`
var
list
=
yo
`<ul key=
${
keyPath
}
data-id="treeViewUlList
${
keyPath
}
" class=
${
css
.
ul_tv
}
>
${
children
}
</ul>`
list
.
style
.
display
=
'none'
list
.
style
.
display
=
expanded
?
'block'
:
'none'
caret
.
className
=
list
.
style
.
display
===
'none'
?
`fas fa-caret-right caret
${
css
.
caret_tv
}
`
:
`fas fa-caret-down caret
${
css
.
caret_tv
}
`
caret
.
className
=
list
.
style
.
display
===
'none'
?
`fas fa-caret-right caret
${
css
.
caret_tv
}
`
:
`fas fa-caret-down caret
${
css
.
caret_tv
}
`
caret
.
setAttribute
(
'data-id'
,
`treeViewToggle
${
keyPath
}
`
)
caret
.
setAttribute
(
'data-id'
,
`treeViewToggle
${
keyPath
}
`
)
label
.
onclick
=
function
()
{
label
.
onclick
=
function
()
{
self
.
expand
(
keyPath
)
self
.
expand
(
keyPath
)
if
(
self
.
isExpanded
(
keyPath
))
{
if
(
!
self
.
expandPath
.
includes
(
keyPath
))
self
.
expandPath
.
push
(
keyPath
)
}
else
{
self
.
expandPath
=
self
.
expandPath
.
filter
(
path
=>
path
!==
keyPath
)
}
}
}
label
.
oncontextmenu
=
function
(
event
)
{
label
.
oncontextmenu
=
function
(
event
)
{
self
.
event
.
trigger
(
'nodeRightClick'
,
[
keyPath
,
data
,
label
,
event
])
self
.
event
.
trigger
(
'nodeRightClick'
,
[
keyPath
,
data
,
label
,
event
])
...
...
test-browser/tests/remixd.js
View file @
1e4ce4a7
...
@@ -118,11 +118,8 @@ function runTests (browser, testData) {
...
@@ -118,11 +118,8 @@ function runTests (browser, testData) {
.
perform
(
function
(
done
)
{
.
perform
(
function
(
done
)
{
testImportFromRemixd
(
browser
,
()
=>
{
done
()
})
testImportFromRemixd
(
browser
,
()
=>
{
done
()
})
})
})
.
clickLaunchIcon
(
'fileExplorers'
).
click
(
'[data-path="localhost"]'
)
// collapse and expand
.
clickLaunchIcon
(
'fileExplorers'
)
.
waitForElementNotVisible
(
'[data-path="localhost/folder1"]'
)
.
click
(
'[data-path="localhost"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1"]'
)
.
click
(
'[data-path="localhost/folder1"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1/contract1.sol"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1/contract1.sol"]'
)
.
waitForElementVisible
(
'[data-path="localhost/folder1/renamed_contract_'
+
browserName
+
'.sol"]'
)
// check if renamed file is preset
.
waitForElementVisible
(
'[data-path="localhost/folder1/renamed_contract_'
+
browserName
+
'.sol"]'
)
// check if renamed file is preset
.
waitForElementNotPresent
(
'[data-path="localhost/folder1/contract_'
+
browserName
+
'.sol"]'
)
// check if renamed (old) file is not present
.
waitForElementNotPresent
(
'[data-path="localhost/folder1/contract_'
+
browserName
+
'.sol"]'
)
// check if renamed (old) file is not present
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment