Skip to content

Commit e610b42

Browse files
Lenny HalsethLenny Halseth
authored andcommitted
Prevent blocked UI if surface is on and you remove all surface methods
Also fixes an issue if the source viewer is open and the selection changes to no treenodes, the source viewer would force-hide, preventing the user from closing the source viewer properly, which cascaded to other UI issues.
1 parent 0300bed commit e610b42

File tree

2 files changed

+29
-30
lines changed

2 files changed

+29
-30
lines changed

codepulse/src/main/resources/toserve/pages/projects/SurfaceDetector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
}
7676

7777
function toggleShowSurface() {
78-
if (!$surfaceButton.hasClass('hasResults')) {
78+
if (!$surfaceButton.hasClass('hasResults') && !isShowSurfaceOn()) {
7979
return
8080
}
8181

codepulse/src/main/webapp/projects.html

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -152,39 +152,38 @@ <h1 class="editable">
152152
<div id="treemap-container">
153153
<div class="widget-body">
154154
<!-- Treemap goes here -->
155-
<div id="source-popout">
156-
<script type="text/x-handlebars-template" id="source-popout-header-template">
157-
<h2>
158-
Related Source
159-
<a class="close">&times;</a>
160-
</h2>
161-
162-
{{!-- FILE --}}
163-
<div class="text-hardwrap">
164-
<strong>File</strong> {{sourceFilePath}}
165-
</div>
166-
<div class="text-hardwrap">
167-
<strong>Source</strong> {{sourceLabel}}
168-
</div>
169-
<div class="text-hardwrap">
170-
<strong>Traced Source Locations</strong> {{tracedSourceLocationCount}} of {{sourceLocationCount}} {{tracedSourceLocationPercentage}}
171-
</div>
172-
<div class="text-hardwrap">
173-
<i id="is-surface-method-button" data-node-id="{{nodeId}}" data-node-is-surface-method="false" class="im im-surface-off is-surface-method"></i>
174-
<span class="is-surface-method-label">Surface Method</span>
175-
</div>
176-
</script>
177-
178-
<header></header>
179-
<article>
180-
<div class="codemirror-parent"></div>
181-
</article>
182-
183-
</div>
184155
</div>
185156
<div class="no-selection-message">
186157
Select packages from the list on the left to display them in more detail here
187158
</div>
159+
<div id="source-popout">
160+
<script type="text/x-handlebars-template" id="source-popout-header-template">
161+
<h2>
162+
Related Source
163+
<a class="close">&times;</a>
164+
</h2>
165+
166+
{{!-- FILE --}}
167+
<div class="text-hardwrap">
168+
<strong>File</strong> {{sourceFilePath}}
169+
</div>
170+
<div class="text-hardwrap">
171+
<strong>Source</strong> {{sourceLabel}}
172+
</div>
173+
<div class="text-hardwrap">
174+
<strong>Traced Source Locations</strong> {{tracedSourceLocationCount}} of {{sourceLocationCount}} {{tracedSourceLocationPercentage}}
175+
</div>
176+
<div class="text-hardwrap">
177+
<i id="is-surface-method-button" data-node-id="{{nodeId}}" data-node-is-surface-method="false" class="im im-surface-off is-surface-method"></i>
178+
<span class="is-surface-method-label">Surface Method</span>
179+
</div>
180+
</script>
181+
182+
<header></header>
183+
<article>
184+
<div class="codemirror-parent"></div>
185+
</article>
186+
</div>
188187
</div>
189188
</div>
190189

0 commit comments

Comments
 (0)