Skip to content

Commit 7ec10c0

Browse files
Merge branch 'main' into fix-definitions-in-requirements
2 parents 70d610c + f0a5de8 commit 7ec10c0

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

guide_testing_suite.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pipelines:
3838
CellExplorerRecordingInterface:
3939
folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed
4040

41-
4241
CellExplorerUnits:
4342
CellExplorerRecordingInterface:
4443
folder_path: ephy_testing_data/cellexplorer/dataset_4/Peter_MS22_180629_110319_concat_stubbed
@@ -48,3 +47,12 @@ pipelines:
4847
IntanSingleFileRecording:
4948
IntanRecordingInterface:
5049
file_path: ephy_testing_data/intan/intan_rhd_test_1.rhd
50+
51+
BrukerTiffMultiChannelSinglePlane:
52+
BrukerTiffSinglePlaneConverter:
53+
folder_path: ophys_testing_data/imaging_datasets/BrukerTif/NCCR32_2023_02_20_Into_the_void_t_series_baseline-000
54+
55+
DeepLabCut:
56+
DeepLabCutInterface:
57+
file_path: behavior_testing_data/DLC/m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5
58+
config_file_path: behavior_testing_data/DLC/config.yaml

nwb-guide.spec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ tmp_ret = collect_all('tifffile')
4646
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
4747
tmp_ret = collect_all('dlc2nwb')
4848
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
49-
49+
tmp_ret = collect_all('ndx-pose')
50+
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
5051

5152
block_cipher = None
5253

src/renderer/src/stories/Dashboard.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ export class Dashboard extends LitElement {
202202
}
203203

204204
setMain(page) {
205+
window.getSelection().empty(); // Remove user selection before transitioning
206+
205207
// Update Previous Page
206208
const info = page.info;
207209
const previous = this.page;

src/renderer/src/stories/table/Cell.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,9 @@ export class TableCell extends LitElement {
219219
else if (this.schema.format === "date-time") {
220220
cls = DateTimeCell
221221
this.type = "date-time"
222-
} else if (this.schema.type === "object") {
222+
}
223+
224+
else if (this.schema.type === "object") {
223225
cls = NestedInputCell
224226
this.type = "table"
225227
}

src/renderer/src/stories/table/cells/base.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,33 @@ export class TableCellBase extends LitElement {
201201

202202
set(value: any, runOnChange = true) {
203203

204-
if (document.execCommand) {
204+
// Ensure all operations are undoable
205+
if (typeof InputEvent === 'function') {
205206
this.#editable.setAttribute('contenteditable', '')
206207
this.#editable.focus();
207-
document.execCommand('selectAll');
208-
document.execCommand('insertText', false, value);
208+
209+
const range = document.createRange();
210+
range.selectNodeContents(this.#editable);
211+
const sel = window.getSelection()!;
212+
sel.removeAllRanges();
213+
sel.addRange(range);
214+
215+
const inputEvent = new InputEvent('input', {
216+
bubbles: true,
217+
cancelable: false,
218+
data: value,
219+
inputType: 'insertText',
220+
});
221+
222+
this.#editable.dispatchEvent(inputEvent);
223+
209224
this.setText(value, undefined, runOnChange)
210225
this.#editable.blur();
211226
this.#editable.removeAttribute('contenteditable')
212227
}
213228

214-
else this.setText(value, undefined, runOnChange) // Ensure value is still set
229+
230+
else this.setText(value, undefined, runOnChange) // Just set value
215231
}
216232

217233
#render(property: 'renderer' | 'editor') {

tests/e2e/workflow.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ export default async function runWorkflow(name, workflow, identifier) {
379379
const page = dashboard.page
380380
const firstSessionForm = page.forms[0].form
381381
firstSessionForm.accordions["NWBFile"].toggle(true)
382-
window.getSelection().empty() // Remove annoying user-select highlight
383382
})
384383

385384
await takeScreenshot(join(identifier, 'metadata-nwbfile'), 100)

0 commit comments

Comments
 (0)