Skip to content

Commit b789f69

Browse files
committed
feat(help): add in-app User guide drawer; clarify desktop docs scope
Assisted-by: Claude Opus 4.7
1 parent 87f4408 commit b789f69

9 files changed

Lines changed: 577 additions & 4 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Computation engine (Sigima)
2+
3+
The engine that actually computes signals and images is
4+
[**Sigima**](https://github.com/DataLab-Platform/Sigima), a headless Python
5+
library shared between desktop DataLab and DataLab-Web. Whatever the host
6+
application, the algorithms, parameters and numerical results are the same.
7+
8+
## Where the documentation lives
9+
10+
There is **no separate Sigima documentation for the Web**, by design. The
11+
existing reference on the
12+
[DataLab project website](https://datalab-platform.com/) — even though its
13+
screenshots show the Qt desktop UI — describes the same parameters and the
14+
same outputs as those exposed here.
15+
16+
Useful entry points (desktop-framed but Web-relevant):
17+
18+
- [Signal processing reference](https://datalab-platform.com/en/features/signal/index.html)
19+
- [Image processing reference](https://datalab-platform.com/en/features/image/index.html)
20+
- [Sigima API reference](https://sigima.readthedocs.io/)
21+
22+
## How processings appear in DataLab-Web
23+
24+
The menu bar is populated **automatically** by introspecting Sigima's
25+
catalog (`build_signal_catalog()` / `build_image_catalog()`). When a new
26+
processing is added to Sigima upstream, it shows up in DataLab-Web at the
27+
next release without any UI code change.
28+
29+
## Parameter dialogs
30+
31+
Each processing's parameters are described by a
32+
[`guidata.DataSet`](https://guidata.readthedocs.io/) schema. DataLab-Web
33+
reads that schema and renders the dialog automatically — the same data
34+
model that the desktop application uses to draw its Qt forms.
35+
36+
## What the desktop docs do **not** cover
37+
38+
- The **runtime constraints** of the browser (memory limits, OPFS,
39+
cross-origin isolation) — see
40+
[Differences from desktop DataLab](differences-from-desktop.md).
41+
- DataLab-Web-specific UI affordances (Plotly toolbar, macro / notebook
42+
workers, plugin loader).
43+
- The TypeScript SDK for embedding DataLab-Web in another web app.
44+
45+
For everything else — operators, filters, fits, detection algorithms,
46+
units, ROI semantics, HDF5 file format — the desktop documentation is
47+
authoritative.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Differences from desktop DataLab
2+
3+
DataLab-Web shares the **computation engine** (Sigima) and the **processing
4+
catalog** with the desktop application: results are bit-for-bit identical for
5+
the same inputs. The differences listed below are about the **runtime
6+
environment** and a few UI surfaces, not about the science.
7+
8+
## Runtime
9+
10+
| Topic | Desktop DataLab | DataLab-Web |
11+
| --- | --- | --- |
12+
| Python | System CPython | Pyodide (CPython compiled to WebAssembly) |
13+
| GUI toolkit | Qt + PlotPy | React + TypeScript + Plotly.js |
14+
| Plotting | PlotPy (Qt) | Plotly.js |
15+
| Multi-threading | Native threads / processes | Web Workers (one per macro / notebook) |
16+
| File system | Native I/O | Browser file picker, drag-and-drop, OPFS |
17+
| Persistence | HDF5 on disk | HDF5 download / upload, IndexedDB workspace cache |
18+
| Remote control | XML-RPC, FastAPI Web API | In-browser proxy, optional postMessage SDK |
19+
20+
The first load downloads Pyodide (~10 MB) and installs Sigima via
21+
`micropip`; expect 30–60 s on a cold cache. Subsequent loads are served
22+
from the browser cache.
23+
24+
## What is intentionally different
25+
26+
- **No native dialogs**. File open / save go through the browser's own
27+
pickers; HDF5 workspaces are downloaded as files rather than written
28+
in place.
29+
- **No Qt-only widgets**. PlotPy interactive tools (rotation, polygon
30+
picker…) are not available; equivalent flows are reimplemented with
31+
Plotly + React when applicable.
32+
- **Plugins are JavaScript or Python**. JavaScript plugins live alongside
33+
the React app; Python plugins are installed into Pyodide at runtime.
34+
See [Plugins](#plugins).
35+
- **Macros and notebooks run in Web Workers**. They have their own Pyodide
36+
instance and communicate with the main runtime through a structured
37+
proxy (`MacroRuntime`, `proxyBridge`). Long-running computations no
38+
longer freeze the UI.
39+
- **Web API server is replaced by the in-browser SDK**. Embedding
40+
DataLab-Web in another web app is done via the
41+
[`@datalab-platform/web-sdk`](https://github.com/DataLab-Platform/web/tree/main/packages/sdk)
42+
package and `postMessage`, not HTTP / XML-RPC.
43+
44+
## What is intentionally **not** different
45+
46+
- The **object model** (`SignalObj`, `ImageObj`, ROI, groups) is identical.
47+
- The **processing catalog** is discovered from Sigima — every function
48+
registered there appears in the menu bar with the same parameters.
49+
- **Parameter dialogs** are auto-generated from the same guidata `DataSet`
50+
schemas as in the desktop app.
51+
- **HDF5 workspace files** are interoperable: a workspace saved in
52+
desktop DataLab can be opened in DataLab-Web (and vice versa, within
53+
the limits of available processings).
54+
55+
## Plugins
56+
57+
JavaScript plugins are loaded from `plugins/` at startup; Python plugins
58+
are installed via `micropip` and registered through the same hook system
59+
as the desktop app. See [Plugins](plugins.md) for the practical guide.
60+
61+
## Macros and notebooks
62+
63+
See [Notebooks](notebooks.md) for the architecture and behaviour of the
64+
notebook subsystem. Macros follow the same model: a dedicated Pyodide
65+
worker, a proxy bridge to the main runtime, structured cell results.

‎doc/userguide/welcome.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Welcome to DataLab-Web
2+
3+
DataLab-Web is the **browser-native** sibling of the DataLab desktop
4+
application. It runs the same scientific computation engine — **Sigima** —
5+
entirely client-side via [Pyodide](https://pyodide.org/) (CPython compiled to
6+
WebAssembly). No data leaves your browser.
7+
8+
## What you can do here
9+
10+
- Load **signals** (1D curves) and **images** (2D arrays) from the file
11+
system or drag-and-drop them into the workspace.
12+
- Apply the full Sigima processing catalog: arithmetic, filtering, FFT,
13+
fitting, peak detection, morphology, segmentation, ROI extraction…
14+
- Interact with results via [Plotly.js](https://plotly.com/javascript/)
15+
plots (zoom, pan, hover, export to PNG/SVG).
16+
- Organise objects into groups, switch between **Signal** and **Image**
17+
panels, persist your workspace as an HDF5 file.
18+
- Automate workflows with **macros** and **notebooks** running in dedicated
19+
Web Workers so the UI stays responsive.
20+
- Extend the application with **plugins** (Python or JavaScript) and a
21+
**TypeScript SDK** for embedding DataLab-Web in third-party apps.
22+
23+
## Where to find help
24+
25+
This in-app **User guide** focuses on what is specific to DataLab-Web. For
26+
everything that is shared with the desktop application — and that is the
27+
majority — refer to the
28+
[DataLab project website](https://datalab-platform.com/), keeping in mind
29+
its desktop-centric framing.
30+
31+
When in doubt, the **AI assistant** (open it from the right edge of the
32+
workspace) can answer most questions interactively.
33+
34+
## Reporting issues, contributing
35+
36+
DataLab-Web is open source. Issues and pull requests are welcome on
37+
[github.com/DataLab-Platform/web](https://github.com/DataLab-Platform/web).

‎src/App.tsx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ import {
6969
import { TextImportWizard } from "./components/TextImportWizard";
7070
import { SidePanel } from "./components/SidePanel";
7171
import { AIAssistantPanel } from "./components/AIAssistant/AIAssistantPanel";
72+
import { UserGuidePanel } from "./components/userguide/UserGuidePanel";
7273
import { AISettingsDialog } from "./components/AIAssistant/AISettingsDialog";
7374
import { Splitter } from "./components/Splitter";
7475
import { MacroPanel, type MacroPanelHandle } from "./components/MacroPanel";
@@ -314,6 +315,7 @@ export default function App() {
314315
} | null>(null);
315316
const [editingMeta, setEditingMeta] = useState<ObjectMeta | null>(null);
316317
const [helpView, setHelpView] = useState<HelpView | null>(null);
318+
const [userGuideOpen, setUserGuideOpen] = useState(false);
317319
const [h5BrowserFiles, setH5BrowserFiles] = useState<H5BrowserFile[] | null>(
318320
null,
319321
);
@@ -1957,6 +1959,7 @@ export default function App() {
19571959
onShowAbout: () => setHelpView("about"),
19581960
onShowShortcuts: () => setHelpView("shortcuts"),
19591961
onShowConsole: () => setHelpView("console"),
1962+
onOpenUserGuide: () => setUserGuideOpen(true),
19601963
}),
19611964
...buildViewActions({
19621965
showResultsOverlay,
@@ -2382,6 +2385,11 @@ export default function App() {
23822385
/>
23832386
</div>
23842387
)}
2388+
{userGuideOpen && (
2389+
<div className="userguide-floating-host">
2390+
<UserGuidePanel onClose={() => setUserGuideOpen(false)} />
2391+
</div>
2392+
)}
23852393
</div>
23862394
{showAISettings && (
23872395
<AISettingsDialog onClose={() => setShowAISettings(false)} />

‎src/actions/registry.ts‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export interface HelpActionCallbacks {
139139
onShowAbout: () => void;
140140
onShowShortcuts: () => void;
141141
onShowConsole: () => void;
142+
onOpenUserGuide: () => void;
142143
}
143144

144145
/** Wire Help / "?" menu actions. */
@@ -147,11 +148,19 @@ export function buildHelpActions(cb: HelpActionCallbacks): ActionDescriptor[] {
147148
const always = () => true;
148149
return [
149150
{
150-
id: "help.documentation",
151-
label: "Online documentation",
152-
menuPath: "Help/Online documentation",
151+
id: "help.userguide",
152+
label: "User guide",
153+
menuPath: "Help/User guide",
153154
iconUrl: getHelpIconUrl("libre-gui-help.svg"),
154155
enabled: always,
156+
run: cb.onOpenUserGuide,
157+
},
158+
{
159+
id: "help.documentation",
160+
label: "DataLab project website",
161+
menuPath: "Help/DataLab project website",
162+
iconUrl: getHelpIconUrl("libre-gui-globe.svg"),
163+
enabled: always,
155164
run: () =>
156165
window.open(
157166
"https://datalab-platform.com/",
Lines changed: 1 addition & 0 deletions
Loading

‎src/components/HelpDialog.tsx‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ function AboutView({ version }: { version: string }) {
117117
computation engine runs entirely client-side via Pyodide (CPython
118118
compiled to WebAssembly); no data leaves your browser.
119119
</p>
120+
<div className="help-about-doc-scope" role="note">
121+
<strong>About the online documentation.</strong> The{" "}
122+
<a
123+
href="https://datalab-platform.com/"
124+
target="_blank"
125+
rel="noopener noreferrer"
126+
>
127+
DataLab project website
128+
</a>{" "}
129+
is centred on the desktop application. Because DataLab-Web shares the
130+
same computation engine (Sigima) and the same processing catalog, most
131+
of that content remains directly relevant. Web-specific differences
132+
(in-browser execution via Pyodide, persistence, plugins, macros,
133+
notebooks) are not covered there.
134+
</div>
120135
<ul className="help-about-links">
121136
<li>
122137
<a
@@ -125,7 +140,13 @@ function AboutView({ version }: { version: string }) {
125140
rel="noopener noreferrer"
126141
>
127142
DataLab project website
128-
</a>
143+
</a>{" "}
144+
<span
145+
className="help-about-link-tag"
146+
title="Centred on the DataLab desktop application"
147+
>
148+
desktop-focused
149+
</span>
129150
</li>
130151
<li>
131152
<a

0 commit comments

Comments
 (0)