Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created Computations and Data Manager Experimental #1946

Merged
merged 59 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
afb642d
installed arquero
munteannatan Mar 11, 2024
2f50975
new zoom handler, touch enabled
munteannatan Mar 11, 2024
b3e807d
float64 expected
munteannatan Mar 11, 2024
a45a726
new hover handler uses arquero for parsing
munteannatan Mar 11, 2024
c615836
experimental swapping strategy
munteannatan Mar 11, 2024
4f5467d
some test changes
munteannatan Mar 11, 2024
72a55a3
lint
munteannatan Mar 11, 2024
0e91f3a
changed zoom altogether and updated tests
munteannatan Mar 12, 2024
c1b0adb
changed computations
munteannatan Mar 14, 2024
208a66e
removed arquero and added unit test
munteannatan Mar 15, 2024
07e0bbc
Change files
munteannatan Mar 15, 2024
cba3d20
fixed firefox tests
munteannatan Mar 18, 2024
85d961a
Merge branch 'main' into users/munteannatan/experimental-events
munteannatan Mar 18, 2024
3d7324b
typos
munteannatan Mar 18, 2024
805f105
replaced with experimental
munteannatan Mar 18, 2024
fa6993a
created test parameters and added arquero mention
munteannatan Mar 18, 2024
43b944e
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 19, 2024
1fc0fdc
removed arquero and used alternative
munteannatan Mar 19, 2024
39b82b5
added tests
munteannatan Mar 19, 2024
c8a6397
lint
munteannatan Mar 19, 2024
294e1e0
Change files
munteannatan Mar 19, 2024
ecfd8b3
test skip and fixes
munteannatan Mar 19, 2024
c5ca71e
removed event coordinator and made connect and disconnect internal api
munteannatan Mar 19, 2024
a8401b5
Merge branch 'main' into users/munteannatan/experimental-events
munteannatan Mar 19, 2024
5f7c4d8
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 19, 2024
e72f613
Merge branch 'main' into users/munteannatan/experimental-computations
munteannatan Mar 19, 2024
715ce26
internal public method
munteannatan Mar 19, 2024
16a5c7d
internal mark
munteannatan Mar 19, 2024
cd80eff
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 19, 2024
2a6ce73
package lock update
munteannatan Mar 20, 2024
5421f53
changed tests
munteannatan Mar 20, 2024
0483b04
created experimental check
munteannatan Mar 20, 2024
2c83beb
lint
munteannatan Mar 20, 2024
9d81c1f
test fixes
munteannatan Mar 20, 2024
a63188f
update package lock
munteannatan Mar 20, 2024
a76a981
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 20, 2024
bafba2d
arquero PR link
munteannatan Mar 20, 2024
c8d3a5a
test fixes and lint
munteannatan Mar 20, 2024
dc4ac9c
lint
munteannatan Mar 20, 2024
dac1089
switched renderers
munteannatan Mar 20, 2024
942ffe2
used generic types
munteannatan Mar 20, 2024
1f5ed84
forgot cast
munteannatan Mar 20, 2024
b70dfce
more type fixes
munteannatan Mar 20, 2024
f39337d
Merge branch 'main' into users/munteannatan/experimental-events
munteannatan Mar 20, 2024
5655594
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 21, 2024
6361929
type changes
munteannatan Mar 21, 2024
4a136d3
lint
munteannatan Mar 21, 2024
a951b22
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 21, 2024
864bbe0
lint
munteannatan Mar 21, 2024
a8974b2
removed generics from modules
munteannatan Mar 25, 2024
0dd1349
some type casts
munteannatan Mar 25, 2024
70ad078
lint
munteannatan Mar 25, 2024
66888e2
Merge branch 'main' into users/munteannatan/experimental-events
munteannatan Mar 25, 2024
42cb95f
Merge branch 'users/munteannatan/experimental-events' into users/munt…
munteannatan Mar 25, 2024
02adccf
Merge branch 'main' into users/munteannatan/experimental-computations
munteannatan Mar 25, 2024
f4c70b7
lint
munteannatan Mar 25, 2024
e80f7f6
Merge branch 'main' into users/munteannatan/experimental-computations
munteannatan Mar 27, 2024
6174c79
issue and test fixes
munteannatan Mar 27, 2024
b589a90
made experimental check in hover
munteannatan Mar 27, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Created new computations experimental module and tested it, created new data manager experimental and integrated with hover and old renderer",
"packageName": "@ni/nimble-components",
"email": "33986780+munteannatan@users.noreply.github.com",
"dependentChangeType": "patch"
}
62 changes: 49 additions & 13 deletions packages/nimble-components/src/wafer-map/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import type { Table } from 'apache-arrow';
import { template } from './template';
import { styles } from './styles';
import { DataManager } from './modules/data-manager';
import { DataManager as ExperimentalDataManager } from './modules/experimental/data-manager';
import { RenderingModule } from './modules/rendering';
import { EventCoordinator } from './modules/event-coordinator';
import {
HoverDie,
HoverDieOpacity,
WaferMapColorScale,
WaferMapColorScaleMode,
Expand All @@ -22,7 +23,10 @@ import {
} from './types';
import { WaferMapUpdateTracker } from './modules/wafer-map-update-tracker';
import { WaferMapValidator } from './modules/wafer-map-validator';
import { WorkerRenderer } from './modules/worker-renderer';
import { WorkerRenderer } from './modules/experimental/worker-renderer';
import { HoverHandler } from './modules/hover-handler';
import { HoverHandler as ExperimentalHoverHandler } from './modules/experimental/hover-handler';
import { ZoomHandler } from './modules/zoom-handler';

declare global {
interface HTMLElementTagNameMap {
Expand Down Expand Up @@ -88,7 +92,18 @@ export class WaferMap extends FoundationElement {
/**
* @internal
*/
public readonly dataManager = new DataManager(this);
public readonly stableDataManager = new DataManager(this);

/**
* @internal
*/
public readonly experimentalDataManager = new ExperimentalDataManager(this);

/**
* @internal
*/
public dataManager: DataManager | ExperimentalDataManager = this.stableDataManager;

/**
* @internal
*/
Expand Down Expand Up @@ -144,7 +159,7 @@ export class WaferMap extends FoundationElement {
/**
* @internal
*/
@observable public hoverDie: WaferMapDie | undefined;
@observable public hoverDie: WaferMapDie | HoverDie | undefined;

@observable public highlightedTags: string[] = [];
@observable public dies: WaferMapDie[] = [];
Expand All @@ -155,7 +170,13 @@ export class WaferMap extends FoundationElement {
values: []
};

private readonly eventCoordinator = new EventCoordinator(this);
private readonly hoverHandler = new HoverHandler(this);
private readonly experimentalHoverHandler = new ExperimentalHoverHandler(
this
);

private readonly zoomHandler = new ZoomHandler(this);

private readonly resizeObserver = this.createResizeObserver();
private readonly waferMapValidator = new WaferMapValidator(this);

Expand All @@ -168,12 +189,18 @@ export class WaferMap extends FoundationElement {
this.canvasContext = this.canvas.getContext('2d', {
willReadFrequently: true
})!;
this.hoverHandler.connect();
this.experimentalHoverHandler.connect();
this.zoomHandler.connect();
this.resizeObserver.observe(this);
this.waferMapUpdateTracker.trackAll();
}

public override disconnectedCallback(): void {
super.disconnectedCallback();
this.hoverHandler.disconnect();
this.experimentalHoverHandler.disconnect();
this.zoomHandler.disconnect();
this.resizeObserver.unobserve(this);
}

Expand All @@ -190,8 +217,16 @@ export class WaferMap extends FoundationElement {
if (this.validity.invalidDiesTableSchema) {
return;
}
// will switch the renderer after prerendering changes
// this.renderer = this.diesTable === undefined
// ? this.mainRenderer
// : this.workerRenderer;
if (this.waferMapUpdateTracker.requiresEventsUpdate) {
this.eventCoordinator.detachEvents();
// zoom translateExtent needs to be recalculated when canvas size changes
this.zoomHandler.disconnect();
this.dataManager = this.diesTable === undefined
? this.stableDataManager
: this.experimentalDataManager;
if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) {
this.dataManager.updateContainerDimensions();
this.renderer.updateSortedDiesAndDrawWafer();
Expand All @@ -211,12 +246,19 @@ export class WaferMap extends FoundationElement {
} else if (this.waferMapUpdateTracker.requiresDrawnWaferUpdate) {
this.renderer.drawWafer();
}
this.eventCoordinator.attachEvents();
this.zoomHandler.connect();
} else if (this.waferMapUpdateTracker.requiresRenderHoverUpdate) {
this.renderer.renderHover();
}
}

/**
* @internal
*/
public isExperimentalRenderer(): boolean {
return this.diesTable !== undefined;
}

private validate(): void {
this.waferMapValidator.validateGridDimensions();
this.waferMapValidator.validateDiesTableSchema();
Expand Down Expand Up @@ -291,17 +333,11 @@ export class WaferMap extends FoundationElement {

private diesChanged(): void {
this.waferMapUpdateTracker.track('dies');
this.renderer = this.diesTable === undefined
? this.mainRenderer
: this.workerRenderer;
this.waferMapUpdateTracker.queueUpdate();
}

private diesTableChanged(): void {
this.waferMapUpdateTracker.track('dies');
this.renderer = this.diesTable === undefined
? this.mainRenderer
: this.workerRenderer;
this.waferMapUpdateTracker.queueUpdate();
}

Expand Down

This file was deleted.

Loading