Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions frontend/src/components/NGLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,28 +103,32 @@ export default function NGLinks() {

return (
<>
<Typography className="mb-6 text-foreground font-bold" type="h5">
Neuroglancer Links
</Typography>
<Typography className="mb-6 text-foreground">
Store your Neuroglancer states for easy sharing. Create a short link and
share it with internal collaborators. You can update the link later if
needed.
</Typography>
<div className="mb-4">
<Button onClick={handleOpenCreate}>
<HiOutlinePlus className="icon-default mr-2" />
New Link
</Button>
<div data-tour="nglinks-page">
<Typography className="mb-6 text-foreground font-bold" type="h5">
Neuroglancer Links
</Typography>
<Typography className="mb-6 text-foreground">
Store your Neuroglancer states for easy sharing. Create a short link
and share it with internal collaborators. You can update the link
later if needed.
</Typography>
<div className="mb-4">
<Button data-tour="nglinks-new-button" onClick={handleOpenCreate}>
<HiOutlinePlus className="icon-default mr-2" />
New Link
</Button>
</div>
<div data-tour="nglinks-table">
<TableCard
columns={ngLinksColumns}
data={allNGLinksQuery.data || []}
dataType="NG links"
errorState={allNGLinksQuery.error}
gridColsClass="grid-cols-[1.2fr_2.8fr_1.2fr_1fr_0.6fr]"
loadingState={allNGLinksQuery.isPending}
/>
</div>
</div>
<TableCard
columns={ngLinksColumns}
data={allNGLinksQuery.data || []}
dataType="NG links"
errorState={allNGLinksQuery.error}
gridColsClass="grid-cols-[1.2fr_2.8fr_1.2fr_1fr_0.6fr]"
loadingState={allNGLinksQuery.isPending}
/>
{showDialog ? (
<NGLinkDialog
editItem={editItem}
Expand Down
14 changes: 13 additions & 1 deletion frontend/src/components/tours/StartTour.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ export default function StartTour({
'nav-properties',
'datalinks-janelia-preferences',
'datalinks-general-preferences',
'conversion-jobs'
'conversion-jobs',
'nglinks-table'
];

completionStepIds.forEach(stepId => {
Expand Down Expand Up @@ -267,6 +268,17 @@ export default function StartTour({
}
];

workflowButtons.push({
text: 'Neuroglancer Links',
action: async function (this: any) {
const currentTour = shepherd.activeTour as Tour;
navigate('/nglinks');
await waitForElement('[data-tour="nglinks-page"]');
setupCompletionButtons(currentTour);
currentTour.show('nglinks-start');
}
});

// Only add File Conversion option if tasks are enabled
if (tasksEnabled) {
workflowButtons.push({
Expand Down
23 changes: 23 additions & 0 deletions frontend/src/components/tours/tourSteps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,29 @@ export const tourSteps: StepOptions[] = [
buttons: [backButton, takeAnotherTourButton, exitButton]
},

// NG Links workflow
{
id: 'nglinks-start',
title: 'Neuroglancer Links',
text: 'On this page, you can create and manage short links for Neuroglancer viewer states. Short links make it easy to share specific views with collaborators.',
attachTo: { element: '[data-tour="nglinks-page"]', on: 'top' },
buttons: [backButton, nextButton, exitButton]
},
{
id: 'nglinks-new-link',
title: 'Create a New Link',
text: 'Click this button to open the link creation dialog.<br><br>In <b>URL Mode</b>, paste a full Neuroglancer URL.<br><br>In <b>State Mode</b>, paste a Neuroglancer JSON state object and specify a base URL.<br><br>Optionally add a <b>Title</b> (appears in the browser tab) and a <b>Name</b> (used in the shortened link URL).',
attachTo: { element: '[data-tour="nglinks-new-button"]', on: 'bottom' },
buttons: [backButton, nextButton, exitButton]
},
{
id: 'nglinks-table',
title: 'Managing Your Links',
text: 'Your created links appear in this table. You can click a short link to open it in Neuroglancer, use the actions menu to copy, edit, or delete links.',
attachTo: { element: '[data-tour="nglinks-table"]', on: 'top' },
buttons: [backButton, takeAnotherTourButton, exitButton]
},

// File Conversion workflow
{
id: 'conversion-start',
Expand Down
Loading