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
11 changes: 5 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,17 @@ jobs:
- name: 'Install Playwright Browsers'
run: yarn playwright install --with-deps

# Temporarily disabled while I figure out what's wrong with jlab 4
- name: 'Run tests for JupyterLab 4'
run: |
uv pip install pip "jupyterlab>=4"
export PYV=$(python --version | cut -d' ' -f2)
sh tests/jupyter/run.sh tests/jupyter --project=chromium-$PYV --project=firefox-$PYV
sh tests/jupyter/run.sh tests/jupyter --project=chromium-$PYV --project=firefox-$PYV --retries=3

- name: 'Run tests for JupyterLab 3'
run: |
uv pip install pip "jupyterlab<4"
export PYV=$(python --version | cut -d' ' -f2)
sh tests/jupyter/run.sh tests/jupyter --project=chromium-$PYV --project=firefox-$PYV
sh tests/jupyter/run.sh tests/jupyter --project=chromium-$PYV --project=firefox-$PYV

- name: 'Upload blob report'
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -127,12 +126,12 @@ jobs:
with:
python-version: "3.10"

- name: 'Install hatch'
run: pip install hatch
- name: 'Install build'
run: pip install build

- name: "Build wheel distribution"
run: |
hatch build -t wheel
python -m build --wheel

combine-report:
name: 'Generate combined report'
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

New notebook-based tutorials : [each tutorial](https://percevalw.github.io/metanno/latest/tutorials/) can now be downloaded as a Jupyter notebook and run "at home".

### New DataWidgetFactory !

- The `DatasetExplorerApp` factory moved to `metanno/recipes/data_widget_factory.py` and is now `DataWidgetFactory`
Expand All @@ -14,6 +16,12 @@
- `create_filters_view` for table filters
- **Automatic syncing between tables, forms, and text widgets (no more manual callbacks required)**
- Nested data support, ie `notes: [{"note_id": ..., "note_text": ..., "entities": [{"id": ..., "begin": ...}], ...}]` can be seen in two views using store keys `notes` and `notes.entities`
- New connection status bar to know if an app is connected, disconnected or offline.

### New Pret changes !

- Transactions, connection status, store rollbacks, Jupyter "Open in a new tab" button, and more.
- Check out [Pret's changelog](https://percevalw.github.io/pret/latest/changelog/) for more info.

## v1.0.0-beta.5 (2025-12-09)

Expand Down
30 changes: 13 additions & 17 deletions client/components/AnnotatedText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -528,40 +528,36 @@ export class AnnotatedText extends React.Component<TextData & TextMethods> {

constructor(props: TextData & TextMethods) {
super(props);
this.linesRef = [];
this.spansRef = {};
this.containerRef = React.createRef();

if (props.handle) {
const linesRef = this.linesRef;
const spansRef = this.spansRef;
// Problem: props.handle may be an object OR a mapping, I don't know when it is which
props.handle.current = {
scroll_to_line: (line: number, behavior: ScrollBehavior = "smooth") => {
if (line >= 0 && line < this.linesRef.length && this.linesRef[line]) {
this.linesRef[line].current?.scrollIntoView({
if (line >= 0 && line < linesRef.length && linesRef[line]) {
linesRef[line].current?.scrollIntoView({
behavior: behavior,
block: "center",
container: "nearest",
} as ScrollIntoViewOptions);
}
},
scroll_to_span: (
span_id: string,
behavior: ScrollBehavior = "smooth"
) => {
scroll_to_span: (span_id: string, behavior: ScrollBehavior = "smooth") => {
setTimeout(() => {
if (this.spansRef[span_id]) {
this.spansRef[span_id].current?.scrollIntoView({
behavior: behavior,
block: "center",
container: "nearest",
} as ScrollIntoViewOptions);
}
spansRef[span_id]?.current?.scrollIntoView({
behavior: behavior,
block: "center",
} as ScrollIntoViewOptions);
}, 10);
},
clear_current_mouse_selection: () => {
window.getSelection().removeAllRanges();
},
};
}
this.linesRef = [];
this.spansRef = {};
this.containerRef = React.createRef();
this.previousSelectedSpans = "";
this.tokenize = cachedReconcile(tokenize);
this.processStyles = memoize((styles) =>
Expand Down
Loading
Loading