Skip to content

Commit 1691db2

Browse files
Darken bounding boxes, neuron icon in toolbar, Enter-to-submit help responses
- Bounding box wireframe: much darker/subtler blue (0.1,0.2,0.4 @ 30% alpha) - Cell Library toolbar icon: white neuron PNG instead of 🧬 emoji - Help response form: Enter to submit, "Copy State" button to grab current viewer URL, URL input row with copy button - ToolbarIcon interface: added img field for PNG icons Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 16fcb1a commit 1691db2

File tree

2 files changed

+47
-9
lines changed

2 files changed

+47
-9
lines changed

src/components/CellLibraryPanel.vue

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,16 @@ function openResponseUrl(url: string) {
467467
}
468468
}
469469
470+
/** Copy current neuroglancer viewer state URL to the response URL field. */
471+
function copyCurrentState() {
472+
try {
473+
// The current URL with fragment contains the full viewer state
474+
responseUrl.value = window.location.href;
475+
} catch {
476+
responseUrl.value = '';
477+
}
478+
}
479+
470480
function removeReq(req: HelpRequest) {
471481
helpStore.remove(req.id);
472482
helpStore.refreshPending();
@@ -581,17 +591,21 @@ const panelStyle = computed(() => ({
581591
<div v-if="respondingTo === req.id" class="nge-cl-response-form">
582592
<textarea
583593
v-model="responseNote"
584-
placeholder="Write your response..."
594+
placeholder="Write your response... (Enter to submit, Shift+Enter for newline)"
585595
class="nge-cl-response-textarea"
586596
rows="3"
587597
@keydown.stop @keyup.stop @keypress.stop
598+
@keydown.enter.exact.prevent="submitResponse(req)"
588599
></textarea>
589-
<input
590-
v-model="responseUrl"
591-
placeholder="Paste neuroglancer state URL (optional)"
592-
class="nge-cl-response-input"
593-
@keydown.stop @keyup.stop @keypress.stop
594-
/>
600+
<div class="nge-cl-response-url-row">
601+
<input
602+
v-model="responseUrl"
603+
placeholder="Neuroglancer state URL (optional)"
604+
class="nge-cl-response-input"
605+
@keydown.stop @keyup.stop @keypress.stop
606+
/>
607+
<button class="nge-cl-btn nge-cl-btn--copy-state" @click="copyCurrentState" title="Copy current viewer state URL">📋 State</button>
608+
</div>
595609
<select
596610
v-if="getAnnotationLayers().length > 0"
597611
v-model="responseAnnotationLayer"
@@ -1137,6 +1151,21 @@ const panelStyle = computed(() => ({
11371151
.nge-cl-response-input:focus {
11381152
border-color: rgba(74, 158, 255, 0.3);
11391153
}
1154+
.nge-cl-response-url-row {
1155+
display: flex;
1156+
gap: 4px;
1157+
align-items: stretch;
1158+
}
1159+
.nge-cl-response-url-row .nge-cl-response-input {
1160+
flex: 1;
1161+
min-width: 0;
1162+
}
1163+
.nge-cl-btn--copy-state {
1164+
font-size: 0.68em;
1165+
padding: 4px 8px;
1166+
white-space: nowrap;
1167+
flex-shrink: 0;
1168+
}
11401169
.nge-cl-btn--submit-response {
11411170
align-self: flex-end;
11421171
border-color: rgba(68, 170, 102, 0.25);

src/components/ExtensionBar.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import CellLibraryPanel from "components/CellLibraryPanel.vue";
1616
import ChatPanel from "components/ChatPanel.vue";
1717
import BatchProcessorPanel from "components/BatchProcessorPanel.vue";
1818
import NotificationFeedPanel from "components/NotificationFeedPanel.vue";
19+
import neuronIcon from '../../static/badges/pyr/neuron-icon-white.png';
1920
2021
import {loginSession, useLoginStore, useVolumesStore, useUserStatsStore, useSegmentAnnotationStore, useHelpRequestStore, useProofreadingQueueStore, useProofreadingBackendStore, useUserPreferencesStore} from '../store';
2122
import {useTutorialStore} from '../store-pyr';
@@ -95,6 +96,7 @@ interface ToolbarIcon {
9596
id: string;
9697
emoji: string;
9798
svg?: string;
99+
img?: string;
98100
label: string;
99101
action: () => void;
100102
badge?: () => number;
@@ -110,7 +112,7 @@ const toolbarDefs = computed<ToolbarIcon[]>(() => [
110112
{ id: 'recap', emoji: '📊', label: 'Your Week in Science', action: () => { showRecap.value = true; } },
111113
{ id: 'leaderboard', emoji: '🏆', label: 'Leaderboard', action: () => { showLeaderboard.value = true; } },
112114
{ id: 'quest', emoji: '🧠', label: 'Brain Quest', action: () => { showQueue.value = !showQueue.value; }, badge: () => queueStore.pendingCount() },
113-
{ id: 'cells', emoji: '🧬', label: 'Cell Library', action: () => { cellLibraryInitialTab.value = undefined; showCellLibrary.value = !showCellLibrary.value; } },
115+
{ id: 'cells', emoji: '🧬', img: neuronIcon, label: 'Cell Library', action: () => { cellLibraryInitialTab.value = undefined; showCellLibrary.value = !showCellLibrary.value; } },
114116
{ id: 'batch', emoji: '📦', label: 'Batch Processor', action: () => { showBatchProcessor.value = !showBatchProcessor.value; } },
115117
{ id: 'help', emoji: '🔍', label: 'Second Opinion Requests', action: () => { cellLibraryInitialTab.value = 'help'; showCellLibrary.value = true; }, badge: () => helpStore.pending.length },
116118
{ id: 'feed', emoji: '📡', label: 'Activity Feed', action: () => { showFeed.value = true; } },
@@ -241,7 +243,7 @@ function activateTool(toolType: 'multicut' | 'merge') {
241243
}"
242244
:title="icon.label"
243245
@click="icon.action()"
244-
><span v-if="icon.svg" v-html="icon.svg"></span><template v-else>{{ icon.emoji }}</template><span v-if="icon.badge && icon.badge() > 0" class="nge-toolbar-badge">{{ icon.badge() }}</span></button>
246+
><span v-if="icon.svg" v-html="icon.svg"></span><img v-else-if="icon.img" :src="icon.img" class="nge-toolbar-icon-img" /><template v-else>{{ icon.emoji }}</template><span v-if="icon.badge && icon.badge() > 0" class="nge-toolbar-badge">{{ icon.badge() }}</span></button>
245247
</div>
246248

247249
<!-- Merge/Split celebration burst -->
@@ -444,6 +446,13 @@ function activateTool(toolType: 'multicut' | 'merge') {
444446
}
445447
.nge-icon-btn--badge { position: relative; }
446448
449+
.nge-toolbar-icon-img {
450+
width: 16px;
451+
height: 16px;
452+
object-fit: contain;
453+
vertical-align: middle;
454+
opacity: 0.85;
455+
}
447456
.nge-toolbar-badge {
448457
position: absolute;
449458
top: 1px;

0 commit comments

Comments
 (0)