From 823dc818f61df5301cd5158e204770a86335d1ee Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Tue, 17 Jan 2023 17:29:20 +0200 Subject: [PATCH 1/7] Updated the WaferDie Interface to add an extra "tooltip" field --- .../src/wafer-map/tests/computations.spec.ts | 2 +- .../src/wafer-map/tests/data-generator.ts | 17 +- .../src/wafer-map/tests/data-manager.spec.ts | 2 +- .../tests/prerendering.coloring.spec.ts | 20 +- .../tests/prerendering.labeling.spec.ts | 2 +- .../tests/prerendering.positioning.spec.ts | 2 +- .../src/wafer-map/tests/sets.ts | 224 +++++++++++++++--- .../src/wafer-map/tests/types.spec.ts | 2 +- .../src/wafer-map/tests/utilities.ts | 36 +-- .../src/wafer-map/tests/wafer-map.spec.ts | 18 +- .../nimble-components/src/wafer-map/types.ts | 1 + 11 files changed, 264 insertions(+), 62 deletions(-) diff --git a/packages/nimble-components/src/wafer-map/tests/computations.spec.ts b/packages/nimble-components/src/wafer-map/tests/computations.spec.ts index 06264e2791..b12c3cdaa5 100644 --- a/packages/nimble-components/src/wafer-map/tests/computations.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/computations.spec.ts @@ -2,7 +2,7 @@ import { Computations } from '../modules/computations'; import { Margin, WaferMapQuadrant } from '../types'; import { getWaferMapDies } from './utilities'; -describe('Computations module', () => { +describe('Wafermap Computations module', () => { let computationsModule: Computations; describe('with 100 square canvas', () => { diff --git a/packages/nimble-components/src/wafer-map/tests/data-generator.ts b/packages/nimble-components/src/wafer-map/tests/data-generator.ts index 8c9801e496..3560161d09 100644 --- a/packages/nimble-components/src/wafer-map/tests/data-generator.ts +++ b/packages/nimble-components/src/wafer-map/tests/data-generator.ts @@ -19,6 +19,19 @@ const generateStringValue = ( return valueToString(value); }; +export const generateDieContent = ( + x: number, + y: number, + value: string +): WaferMapDie => { + return { + x, + y, + value, + tooltip: `Placeholder tooltip value for Die x: ${x} y: ${y}` + }; +}; + export const generateWaferData = ( numDies: number, valueGenerator?: IValueGenerator @@ -43,7 +56,7 @@ export const generateWaferData = ( j-- ) { stringValue = generateStringValue(i, j, valueGenerator); - diesSet.push({ x: i, y: j, value: stringValue }); + diesSet.push(generateDieContent(i, j, stringValue)); } // generate points right of centerX for ( @@ -53,7 +66,7 @@ export const generateWaferData = ( j++ ) { stringValue = generateStringValue(i, j, valueGenerator); - diesSet.push({ x: i, y: j, value: stringValue }); + diesSet.push(generateDieContent(i, j, stringValue)); } } } diff --git a/packages/nimble-components/src/wafer-map/tests/data-manager.spec.ts b/packages/nimble-components/src/wafer-map/tests/data-manager.spec.ts index a21de022ec..71346b87c2 100644 --- a/packages/nimble-components/src/wafer-map/tests/data-manager.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/data-manager.spec.ts @@ -6,7 +6,7 @@ import { getWaferMapDies } from './utilities'; -describe('Data manager', () => { +describe('Wafermap Data manager', () => { let dataManagerModule: DataManager; const axisLocation: WaferMapQuadrant = WaferMapQuadrant.topLeft; const canvasDimensions = { width: 100, height: 110 }; diff --git a/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts b/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts index e3f930df6a..a7d8476cb6 100644 --- a/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts @@ -2,7 +2,7 @@ import { Prerendering } from '../modules/prerendering'; import { WaferMapColorScaleMode } from '../types'; import { getLinearScale, getWaferMapDies } from './utilities'; -describe('Prerendering module', () => { +describe('Wafermap Prerendering module', () => { let prerenderingModule: Prerendering; const emptyDieColor = 'rgba(218,223,236,1)'; const nanDieColor = 'rgba(122,122,122,1)'; @@ -193,7 +193,14 @@ describe('Prerendering module', () => { beforeEach(() => { prerenderingModule = new Prerendering( - [{ x: 0, y: 0, value: 'NaN' }], + [ + { + x: 0, + y: 0, + value: 'NaN', + tooltip: 'Placeholder tooltip value' + } + ], { colors: [], values: [] }, highlightedValues, getLinearScale([], []), @@ -223,7 +230,14 @@ describe('Prerendering module', () => { beforeEach(() => { prerenderingModule = new Prerendering( - [{ x: 0, y: 0, value: undefined as unknown as string }], + [ + { + x: 0, + y: 0, + value: undefined as unknown as string, + tooltip: 'Placeholder tooltip value' + } + ], { colors: [], values: [] }, highlightedValues, getLinearScale([], []), diff --git a/packages/nimble-components/src/wafer-map/tests/prerendering.labeling.spec.ts b/packages/nimble-components/src/wafer-map/tests/prerendering.labeling.spec.ts index 0f6e4f985c..f937a5b721 100644 --- a/packages/nimble-components/src/wafer-map/tests/prerendering.labeling.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/prerendering.labeling.spec.ts @@ -7,7 +7,7 @@ import { getWaferMapDiesAsNaN } from './utilities'; -describe('Prerendering module', () => { +describe('Wafermap Prerendering module', () => { let prerenderingModule: Prerendering; describe('with die input and small die height', () => { diff --git a/packages/nimble-components/src/wafer-map/tests/prerendering.positioning.spec.ts b/packages/nimble-components/src/wafer-map/tests/prerendering.positioning.spec.ts index e66352de3a..39e59ea374 100644 --- a/packages/nimble-components/src/wafer-map/tests/prerendering.positioning.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/prerendering.positioning.spec.ts @@ -2,7 +2,7 @@ import { Prerendering } from '../modules/prerendering'; import { WaferMapColorScaleMode } from '../types'; import { getLinearScale, getWaferMapDies } from './utilities'; -describe('Prerendering module', () => { +describe('Wafermap Prerendering module', () => { let prerenderingModule: Prerendering; describe('with die input and margin', () => { diff --git a/packages/nimble-components/src/wafer-map/tests/sets.ts b/packages/nimble-components/src/wafer-map/tests/sets.ts index 6c8a36a7e6..8bb719b7fb 100644 --- a/packages/nimble-components/src/wafer-map/tests/sets.ts +++ b/packages/nimble-components/src/wafer-map/tests/sets.ts @@ -9,40 +9,200 @@ export const highLightedValueSets = [ export const wafermapDieSets: WaferMapDie[][] = [ [ - { x: 0, y: 0, value: '100' }, - { x: 0, y: 1, value: '50' }, - { x: 0, y: 2, value: '12' }, - { x: 0, y: 3, value: '99' }, - { x: 1, y: 0, value: '78' }, - { x: 1, y: 1, value: '88' }, - { x: 1, y: 2, value: '68' }, - { x: 1, y: 3, value: '99' }, - { x: 2, y: 0, value: '99' }, - { x: 2, y: 1, value: '80' }, - { x: 2, y: 2, value: '99' }, - { x: 2, y: 3, value: '100' }, - { x: 3, y: 0, value: '40' }, - { x: 3, y: 1, value: '10' }, - { x: 3, y: 2, value: '15' }, - { x: 3, y: 3, value: '30' } + { + x: 0, + y: 0, + value: '100', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 0' + }, + { + x: 0, + y: 1, + value: '50', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 1' + }, + { + x: 0, + y: 2, + value: '12', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 2' + }, + { + x: 0, + y: 3, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 3' + }, + { + x: 1, + y: 0, + value: '78', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 0' + }, + { + x: 1, + y: 1, + value: '88', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + }, + { + x: 1, + y: 2, + value: '68', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 2' + }, + { + x: 1, + y: 3, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 3' + }, + { + x: 2, + y: 0, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 0' + }, + { + x: 2, + y: 1, + value: '80', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 1' + }, + { + x: 2, + y: 2, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 2' + }, + { + x: 2, + y: 3, + value: '100', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 3' + }, + { + x: 3, + y: 0, + value: '40', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 0' + }, + { + x: 3, + y: 1, + value: '10', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 1' + }, + { + x: 3, + y: 2, + value: '15', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 2' + }, + { + x: 3, + y: 3, + value: '30', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 3' + } ], [ - { x: 0, y: 0, value: '16' }, - { x: 0, y: 1, value: '50' }, - { x: 0, y: 2, value: '13' }, - { x: 0, y: 3, value: '65' }, - { x: 1, y: 0, value: '78' }, - { x: 1, y: 1, value: '88' }, - { x: 1, y: 2, value: '99' }, - { x: 1, y: 3, value: '99' }, - { x: 2, y: 0, value: '99' }, - { x: 2, y: 1, value: '80' }, - { x: 2, y: 2, value: '99' }, - { x: 2, y: 3, value: '100' }, - { x: 3, y: 0, value: '70' }, - { x: 3, y: 1, value: '75' }, - { x: 3, y: 2, value: '70' }, - { x: 3, y: 3, value: '72' } + { + x: 0, + y: 0, + value: '16', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 0' + }, + { + x: 0, + y: 1, + value: '50', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 1' + }, + { + x: 0, + y: 2, + value: '13', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 2' + }, + { + x: 0, + y: 3, + value: '65', + tooltip: 'Placeholder tooltip value for Die x: 0 y: 3' + }, + { + x: 1, + y: 0, + value: '78', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 0' + }, + { + x: 1, + y: 1, + value: '88', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + }, + { + x: 1, + y: 2, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 2' + }, + { + x: 1, + y: 3, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 3' + }, + { + x: 2, + y: 0, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 0' + }, + { + x: 2, + y: 1, + value: '80', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 1' + }, + { + x: 2, + y: 2, + value: '99', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 2' + }, + { + x: 2, + y: 3, + value: '100', + tooltip: 'Placeholder tooltip value for Die x: 2 y: 3' + }, + { + x: 3, + y: 0, + value: '70', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 0' + }, + { + x: 3, + y: 1, + value: '75', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 1' + }, + { + x: 3, + y: 2, + value: '70', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 2' + }, + { + x: 3, + y: 3, + value: '72', + tooltip: 'Placeholder tooltip value for Die x: 3 y: 3' + } ] ]; diff --git a/packages/nimble-components/src/wafer-map/tests/types.spec.ts b/packages/nimble-components/src/wafer-map/tests/types.spec.ts index bf1fe7822a..681766b07b 100644 --- a/packages/nimble-components/src/wafer-map/tests/types.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/types.spec.ts @@ -1,6 +1,6 @@ import type { WaferMapOrientation, WaferMapQuadrant } from '../types'; -describe('WaferMap type', () => { +describe('Wafermap Types', () => { it('WaferMapQuadrant fails compile if assigning arbitrary string values', () => { // @ts-expect-error This expect will fail if the enum-like type is missing "as const" const value: WaferMapQuadrant = 'hello'; diff --git a/packages/nimble-components/src/wafer-map/tests/utilities.ts b/packages/nimble-components/src/wafer-map/tests/utilities.ts index 7df2d82c0f..a4d9b348c6 100644 --- a/packages/nimble-components/src/wafer-map/tests/utilities.ts +++ b/packages/nimble-components/src/wafer-map/tests/utilities.ts @@ -3,24 +3,24 @@ import type { WaferMapColorScale, WaferMapDie } from '../types'; export function getWaferMapDies(): WaferMapDie[] { return [ - { value: '1', x: 2, y: 3 }, - { value: '2', x: 2, y: 4 }, - { value: '3', x: 3, y: 2 }, - { value: '4', x: 3, y: 3 }, - { value: '5', x: 3, y: 4 }, - { value: '6', x: 3, y: 5 }, - { value: '7', x: 4, y: 1 }, - { value: '8', x: 4, y: 2 }, - { value: '9', x: 4, y: 3 }, - { value: '10', x: 4, y: 4 }, - { value: '11', x: 4, y: 5 }, - { value: '12', x: 4, y: 6 }, - { value: '13', x: 5, y: 2 }, - { value: '14', x: 5, y: 3 }, - { value: '15', x: 5, y: 4 }, - { value: '16', x: 5, y: 5 }, - { value: '17', x: 6, y: 3 }, - { value: '18', x: 6, y: 4 } + { value: '1', x: 2, y: 3, tooltip: 'Placeholder tooltip value' }, + { value: '2', x: 2, y: 4, tooltip: 'Placeholder tooltip value' }, + { value: '3', x: 3, y: 2, tooltip: 'Placeholder tooltip value' }, + { value: '4', x: 3, y: 3, tooltip: 'Placeholder tooltip value' }, + { value: '5', x: 3, y: 4, tooltip: 'Placeholder tooltip value' }, + { value: '6', x: 3, y: 5, tooltip: 'Placeholder tooltip value' }, + { value: '7', x: 4, y: 1, tooltip: 'Placeholder tooltip value' }, + { value: '8', x: 4, y: 2, tooltip: 'Placeholder tooltip value' }, + { value: '9', x: 4, y: 3, tooltip: 'Placeholder tooltip value' }, + { value: '10', x: 4, y: 4, tooltip: 'Placeholder tooltip value' }, + { value: '11', x: 4, y: 5, tooltip: 'Placeholder tooltip value' }, + { value: '12', x: 4, y: 6, tooltip: 'Placeholder tooltip value' }, + { value: '13', x: 5, y: 2, tooltip: 'Placeholder tooltip value' }, + { value: '14', x: 5, y: 3, tooltip: 'Placeholder tooltip value' }, + { value: '15', x: 5, y: 4, tooltip: 'Placeholder tooltip value' }, + { value: '16', x: 5, y: 5, tooltip: 'Placeholder tooltip value' }, + { value: '17', x: 6, y: 3, tooltip: 'Placeholder tooltip value' }, + { value: '18', x: 6, y: 4, tooltip: 'Placeholder tooltip value' } ]; } diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts index 1fb0701d67..81f041a048 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts @@ -77,7 +77,14 @@ describe('WaferMap', () => { }); it('will render once after dies change', () => { - element.dies = [{ x: 1, y: 1, value: '1' }]; + element.dies = [ + { + x: 1, + y: 1, + value: '1', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + } + ]; DOM.processUpdates(); expect(spy).toHaveBeenCalledTimes(1); }); @@ -96,7 +103,14 @@ describe('WaferMap', () => { element.dieLabelsSuffix = '%'; element.colorScaleMode = WaferMapColorScaleMode.ordinal; element.highlightedValues = ['1']; - element.dies = [{ x: 1, y: 1, value: '1' }]; + element.dies = [ + { + x: 1, + y: 1, + value: '1', + tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + } + ]; element.colorScale = { colors: ['red'], values: ['1'] }; DOM.processUpdates(); expect(spy).toHaveBeenCalledTimes(1); diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index 944419c2bd..945ecb13c4 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -30,6 +30,7 @@ export interface WaferMapDie { value: string; x: number; y: number; + tooltip: string; } export interface WaferMapColorScale { From 8908e4e07156f91e46ad85e341f4c3dc7cabac90 Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Tue, 17 Jan 2023 17:47:40 +0200 Subject: [PATCH 2/7] Change files --- ...le-components-95871031-15d3-48ad-952f-7c70831fb3d0.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json diff --git a/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json b/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json new file mode 100644 index 0000000000..c8cb570479 --- /dev/null +++ b/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json @@ -0,0 +1,7 @@ +{ + "type": "major", + "comment": "Updated the WaferDie Interface to add an extra \"tooltip\" field", + "packageName": "@ni/nimble-components", + "email": "denis.stavila@ni.com", + "dependentChangeType": "patch" +} From fd845b5d05271679bb082545c5eab6a2d2b473d5 Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Wed, 18 Jan 2023 17:15:49 +0200 Subject: [PATCH 3/7] Updated the change file --- ...imble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json b/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json index c8cb570479..25a38a70bc 100644 --- a/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json +++ b/change/@ni-nimble-components-95871031-15d3-48ad-952f-7c70831fb3d0.json @@ -1,7 +1,7 @@ { - "type": "major", + "type": "patch", "comment": "Updated the WaferDie Interface to add an extra \"tooltip\" field", "packageName": "@ni/nimble-components", - "email": "denis.stavila@ni.com", + "email": "35329597+DStavilaNI@users.noreply.github.com", "dependentChangeType": "patch" } From 580e75332358265313991a7f1c4e12d005b80c51 Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Wed, 18 Jan 2023 17:25:46 +0200 Subject: [PATCH 4/7] Set the tooltip as an optional field for the WaferMapDie interface --- .../tests/prerendering.coloring.spec.ts | 6 ++-- .../src/wafer-map/tests/utilities.ts | 36 +++++++++---------- .../src/wafer-map/tests/wafer-map.spec.ts | 18 ++-------- .../nimble-components/src/wafer-map/types.ts | 2 +- 4 files changed, 23 insertions(+), 39 deletions(-) diff --git a/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts b/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts index a7d8476cb6..c37064f1a0 100644 --- a/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/prerendering.coloring.spec.ts @@ -197,8 +197,7 @@ describe('Wafermap Prerendering module', () => { { x: 0, y: 0, - value: 'NaN', - tooltip: 'Placeholder tooltip value' + value: 'NaN' } ], { colors: [], values: [] }, @@ -234,8 +233,7 @@ describe('Wafermap Prerendering module', () => { { x: 0, y: 0, - value: undefined as unknown as string, - tooltip: 'Placeholder tooltip value' + value: undefined as unknown as string } ], { colors: [], values: [] }, diff --git a/packages/nimble-components/src/wafer-map/tests/utilities.ts b/packages/nimble-components/src/wafer-map/tests/utilities.ts index a4d9b348c6..7df2d82c0f 100644 --- a/packages/nimble-components/src/wafer-map/tests/utilities.ts +++ b/packages/nimble-components/src/wafer-map/tests/utilities.ts @@ -3,24 +3,24 @@ import type { WaferMapColorScale, WaferMapDie } from '../types'; export function getWaferMapDies(): WaferMapDie[] { return [ - { value: '1', x: 2, y: 3, tooltip: 'Placeholder tooltip value' }, - { value: '2', x: 2, y: 4, tooltip: 'Placeholder tooltip value' }, - { value: '3', x: 3, y: 2, tooltip: 'Placeholder tooltip value' }, - { value: '4', x: 3, y: 3, tooltip: 'Placeholder tooltip value' }, - { value: '5', x: 3, y: 4, tooltip: 'Placeholder tooltip value' }, - { value: '6', x: 3, y: 5, tooltip: 'Placeholder tooltip value' }, - { value: '7', x: 4, y: 1, tooltip: 'Placeholder tooltip value' }, - { value: '8', x: 4, y: 2, tooltip: 'Placeholder tooltip value' }, - { value: '9', x: 4, y: 3, tooltip: 'Placeholder tooltip value' }, - { value: '10', x: 4, y: 4, tooltip: 'Placeholder tooltip value' }, - { value: '11', x: 4, y: 5, tooltip: 'Placeholder tooltip value' }, - { value: '12', x: 4, y: 6, tooltip: 'Placeholder tooltip value' }, - { value: '13', x: 5, y: 2, tooltip: 'Placeholder tooltip value' }, - { value: '14', x: 5, y: 3, tooltip: 'Placeholder tooltip value' }, - { value: '15', x: 5, y: 4, tooltip: 'Placeholder tooltip value' }, - { value: '16', x: 5, y: 5, tooltip: 'Placeholder tooltip value' }, - { value: '17', x: 6, y: 3, tooltip: 'Placeholder tooltip value' }, - { value: '18', x: 6, y: 4, tooltip: 'Placeholder tooltip value' } + { value: '1', x: 2, y: 3 }, + { value: '2', x: 2, y: 4 }, + { value: '3', x: 3, y: 2 }, + { value: '4', x: 3, y: 3 }, + { value: '5', x: 3, y: 4 }, + { value: '6', x: 3, y: 5 }, + { value: '7', x: 4, y: 1 }, + { value: '8', x: 4, y: 2 }, + { value: '9', x: 4, y: 3 }, + { value: '10', x: 4, y: 4 }, + { value: '11', x: 4, y: 5 }, + { value: '12', x: 4, y: 6 }, + { value: '13', x: 5, y: 2 }, + { value: '14', x: 5, y: 3 }, + { value: '15', x: 5, y: 4 }, + { value: '16', x: 5, y: 5 }, + { value: '17', x: 6, y: 3 }, + { value: '18', x: 6, y: 4 } ]; } diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts index 81f041a048..1fb0701d67 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map.spec.ts @@ -77,14 +77,7 @@ describe('WaferMap', () => { }); it('will render once after dies change', () => { - element.dies = [ - { - x: 1, - y: 1, - value: '1', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' - } - ]; + element.dies = [{ x: 1, y: 1, value: '1' }]; DOM.processUpdates(); expect(spy).toHaveBeenCalledTimes(1); }); @@ -103,14 +96,7 @@ describe('WaferMap', () => { element.dieLabelsSuffix = '%'; element.colorScaleMode = WaferMapColorScaleMode.ordinal; element.highlightedValues = ['1']; - element.dies = [ - { - x: 1, - y: 1, - value: '1', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' - } - ]; + element.dies = [{ x: 1, y: 1, value: '1' }]; element.colorScale = { colors: ['red'], values: ['1'] }; DOM.processUpdates(); expect(spy).toHaveBeenCalledTimes(1); diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index 945ecb13c4..947c6ea62d 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -30,7 +30,7 @@ export interface WaferMapDie { value: string; x: number; y: number; - tooltip: string; + tooltip?: string; } export interface WaferMapColorScale { From fce3186dc11f904f467123224a9793b9bacfd79f Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Thu, 19 Jan 2023 13:05:23 +0200 Subject: [PATCH 5/7] Changed the "tooltip" field to "metadata" with type "unknown" --- .../src/wafer-map/tests/data-generator.ts | 2 +- .../src/wafer-map/tests/sets.ts | 64 +++++++++---------- .../nimble-components/src/wafer-map/types.ts | 2 +- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/packages/nimble-components/src/wafer-map/tests/data-generator.ts b/packages/nimble-components/src/wafer-map/tests/data-generator.ts index 3560161d09..83f6fd23b2 100644 --- a/packages/nimble-components/src/wafer-map/tests/data-generator.ts +++ b/packages/nimble-components/src/wafer-map/tests/data-generator.ts @@ -28,7 +28,7 @@ export const generateDieContent = ( x, y, value, - tooltip: `Placeholder tooltip value for Die x: ${x} y: ${y}` + metadata: `Placeholder metadata value for Die x: ${x} y: ${y}` }; }; diff --git a/packages/nimble-components/src/wafer-map/tests/sets.ts b/packages/nimble-components/src/wafer-map/tests/sets.ts index 8bb719b7fb..bef41922d0 100644 --- a/packages/nimble-components/src/wafer-map/tests/sets.ts +++ b/packages/nimble-components/src/wafer-map/tests/sets.ts @@ -13,97 +13,97 @@ export const wafermapDieSets: WaferMapDie[][] = [ x: 0, y: 0, value: '100', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 0' + metadata: 'Placeholder metadata value for Die x: 0 y: 0' }, { x: 0, y: 1, value: '50', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 1' + metadata: 'Placeholder metadata value for Die x: 0 y: 1' }, { x: 0, y: 2, value: '12', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 2' + metadata: 'Placeholder metadata value for Die x: 0 y: 2' }, { x: 0, y: 3, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 3' + metadata: 'Placeholder metadata value for Die x: 0 y: 3' }, { x: 1, y: 0, value: '78', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 0' + metadata: 'Placeholder metadata value for Die x: 1 y: 0' }, { x: 1, y: 1, value: '88', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + metadata: 'Placeholder metadata value for Die x: 1 y: 1' }, { x: 1, y: 2, value: '68', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 2' + metadata: 'Placeholder metadata value for Die x: 1 y: 2' }, { x: 1, y: 3, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 3' + metadata: 'Placeholder metadata value for Die x: 1 y: 3' }, { x: 2, y: 0, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 0' + metadata: 'Placeholder metadata value for Die x: 2 y: 0' }, { x: 2, y: 1, value: '80', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 1' + metadata: 'Placeholder metadata value for Die x: 2 y: 1' }, { x: 2, y: 2, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 2' + metadata: 'Placeholder metadata value for Die x: 2 y: 2' }, { x: 2, y: 3, value: '100', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 3' + metadata: 'Placeholder metadata value for Die x: 2 y: 3' }, { x: 3, y: 0, value: '40', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 0' + metadata: 'Placeholder metadata value for Die x: 3 y: 0' }, { x: 3, y: 1, value: '10', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 1' + metadata: 'Placeholder metadata value for Die x: 3 y: 1' }, { x: 3, y: 2, value: '15', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 2' + metadata: 'Placeholder metadata value for Die x: 3 y: 2' }, { x: 3, y: 3, value: '30', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 3' + metadata: 'Placeholder metadata value for Die x: 3 y: 3' } ], [ @@ -111,97 +111,97 @@ export const wafermapDieSets: WaferMapDie[][] = [ x: 0, y: 0, value: '16', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 0' + metadata: 'Placeholder metadata value for Die x: 0 y: 0' }, { x: 0, y: 1, value: '50', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 1' + metadata: 'Placeholder metadata value for Die x: 0 y: 1' }, { x: 0, y: 2, value: '13', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 2' + metadata: 'Placeholder metadata value for Die x: 0 y: 2' }, { x: 0, y: 3, value: '65', - tooltip: 'Placeholder tooltip value for Die x: 0 y: 3' + metadata: 'Placeholder metadata value for Die x: 0 y: 3' }, { x: 1, y: 0, value: '78', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 0' + metadata: 'Placeholder metadata value for Die x: 1 y: 0' }, { x: 1, y: 1, value: '88', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 1' + metadata: 'Placeholder metadata value for Die x: 1 y: 1' }, { x: 1, y: 2, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 2' + metadata: 'Placeholder metadata value for Die x: 1 y: 2' }, { x: 1, y: 3, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 1 y: 3' + metadata: 'Placeholder metadata value for Die x: 1 y: 3' }, { x: 2, y: 0, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 0' + metadata: 'Placeholder metadata value for Die x: 2 y: 0' }, { x: 2, y: 1, value: '80', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 1' + metadata: 'Placeholder metadata value for Die x: 2 y: 1' }, { x: 2, y: 2, value: '99', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 2' + metadata: 'Placeholder metadata value for Die x: 2 y: 2' }, { x: 2, y: 3, value: '100', - tooltip: 'Placeholder tooltip value for Die x: 2 y: 3' + metadata: 'Placeholder metadata value for Die x: 2 y: 3' }, { x: 3, y: 0, value: '70', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 0' + metadata: 'Placeholder metadata value for Die x: 3 y: 0' }, { x: 3, y: 1, value: '75', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 1' + metadata: 'Placeholder metadata value for Die x: 3 y: 1' }, { x: 3, y: 2, value: '70', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 2' + metadata: 'Placeholder metadata value for Die x: 3 y: 2' }, { x: 3, y: 3, value: '72', - tooltip: 'Placeholder tooltip value for Die x: 3 y: 3' + metadata: 'Placeholder metadata value for Die x: 3 y: 3' } ] ]; diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index 947c6ea62d..5328add07d 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -30,7 +30,7 @@ export interface WaferMapDie { value: string; x: number; y: number; - tooltip?: string; + metadata?: unknown; } export interface WaferMapColorScale { From f40d834aaacb73b06b537f37c8d10dde66440d91 Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Fri, 20 Jan 2023 11:49:43 +0200 Subject: [PATCH 6/7] Applied PR feedback --- packages/nimble-components/src/wafer-map/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index 5328add07d..d9f827c2a9 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -30,6 +30,7 @@ export interface WaferMapDie { value: string; x: number; y: number; + // This field is not used by the wafer-map and is only for optionally storing arbitrary metadata. metadata?: unknown; } From 8b283f76a6a7105c834acb104da192023c2562f9 Mon Sep 17 00:00:00 2001 From: DStavilaNI Date: Fri, 20 Jan 2023 11:50:16 +0200 Subject: [PATCH 7/7] Applied PR feedback --- packages/nimble-components/src/wafer-map/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index d9f827c2a9..8a59c1e724 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -30,7 +30,7 @@ export interface WaferMapDie { value: string; x: number; y: number; - // This field is not used by the wafer-map and is only for optionally storing arbitrary metadata. + // The metadata field is not used by the wafer-map and is only for optionally storing arbitrary metadata. metadata?: unknown; }