From 755823b11215aa2a2c48f296546d0cb8acf6f64c Mon Sep 17 00:00:00 2001 From: m-akinc <7282195+m-akinc@users.noreply.github.com> Date: Wed, 20 Mar 2024 19:13:17 -0500 Subject: [PATCH 01/11] Small change to design token naming scheme (#1947) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## ๐Ÿคจ Rationale I encountered a couple design tokens with names that felt inconsistent: `buttonFillActivePrimaryColor` `buttonFillAccentActiveColor` It seemed like the appearance variant ("accent" or "primary") should be in the same relative position within the name, but our naming convention dictated these names instead. ## ๐Ÿ‘ฉโ€๐Ÿ’ป Implementation Treat common state descriptors ("active", "disabled", "hover", and "selected") as a separate category of name segment than other distinguishing descriptors (like "accent" and "primary"). So instead of our old structure: `[element]-[part]-[state]-[token_type]` we now have: `[element]-[part]-[state]-[variant]-[token_type]` Luckily, the only existing token that violates this updated naming scheme is `buttonFillAccentActiveColor` (which should instead be `buttonFillActiveAccentColor`) and that token is being removed in [another PR](https://github.com/ni/nimble/pull/1934). ## ๐Ÿงช Testing N/A ## โœ… Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj --- ...le-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json | 7 +++++++ packages/nimble-components/CONTRIBUTING.md | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json diff --git a/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json b/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json new file mode 100644 index 0000000000..1a72346f40 --- /dev/null +++ b/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Small change to design token naming scheme", + "packageName": "@ni/nimble-components", + "email": "7282195+m-akinc@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/packages/nimble-components/CONTRIBUTING.md b/packages/nimble-components/CONTRIBUTING.md index 607712adff..8366356817 100644 --- a/packages/nimble-components/CONTRIBUTING.md +++ b/packages/nimble-components/CONTRIBUTING.md @@ -490,12 +490,13 @@ To modify the generated tokens, complete these steps: Public names for theme-aware tokens are specified in `src/theme-provider/design-token-names.ts`. Use the following structure when creating new tokens. -`[element]-[part]-[state]-[token_type]` +`[element]-[part]-[interaction_states]-[remaining_states]-[token_type]` 1. Where **element** is the type to which the token applies (e.g. 'application', 'body', or 'title-plus-1'). 2. Where **part** is the specific part of the element to which the token applies (e.g. 'border', 'background', or shadow). -3. Where **state** is the more specific state descriptor (e.g. 'selected' or 'disabled'). Multiple states should be sorted alphabetically. -4. Where **token_type** is the token category (e.g. 'color', 'font', 'font-color', 'height', 'width', or 'size'). +3. Where **interaction_states** is one or more interaction states (e.g. 'active', 'disabled', 'hover', or 'selected'). Multiple values should be sorted alphabetically. +4. Where **remaining_states** the remaining, non-interaction states (e.g. 'accent', 'primary, or 'large'). Multiple values should be sorted alphabetically. +5. Where **token_type** is the token category (e.g. 'color', 'font', 'font-color', 'height', 'width', or 'size'). ### Size ramp From 9c16eb3e4337d67898ef7cc7c5ec745a1dd696f6 Mon Sep 17 00:00:00 2001 From: rajsite Date: Thu, 21 Mar 2024 00:31:13 +0000 Subject: [PATCH 02/11] applying package updates [skip ci] --- ...ents-6a977921-7b82-4c0c-936b-fb4e855c103e.json | 7 ------- packages/nimble-components/CHANGELOG.json | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json diff --git a/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json b/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json deleted file mode 100644 index 1a72346f40..0000000000 --- a/change/@ni-nimble-components-6a977921-7b82-4c0c-936b-fb4e855c103e.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Small change to design token naming scheme", - "packageName": "@ni/nimble-components", - "email": "7282195+m-akinc@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index 8b2a7bfc67..7c3c87ef3a 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Thu, 21 Mar 2024 00:31:13 GMT", + "version": "22.1.1", + "tag": "@ni/nimble-components_v22.1.1", + "comments": { + "none": [ + { + "author": "7282195+m-akinc@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "755823b11215aa2a2c48f296546d0cb8acf6f64c", + "comment": "Small change to design token naming scheme" + } + ] + } + }, { "date": "Wed, 20 Mar 2024 16:45:59 GMT", "version": "22.1.1", From 7e52ce24569e94af5282b4b77f34608211cf74c9 Mon Sep 17 00:00:00 2001 From: mollykreis <20542556+mollykreis@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:08:18 -0500 Subject: [PATCH 03/11] Fix sizing test in WebKit (#1954) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request ## ๐Ÿคจ Rationale Resolves #1939 ## ๐Ÿ‘ฉโ€๐Ÿ’ป Implementation I updated the test to use sizes that cause the columns to be whole numbers to avoid rounding precision issues as was previously seen. Additionally, the fractional widths now compute to values without repeating decimals, which contributes to the final widths being more consistent across browsers. ## ๐Ÿงช Testing Ran `npm run test-chrome && npm run test-firefox && npm run test-webkit` with the test at hand focused and verified that the test passes in all three browsers ## โœ… Checklist - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --- ...nts-f0730b00-2a69-4d06-8241-d97c34bf98b1.json | 7 +++++++ .../src/table/tests/table-column-sizing.spec.ts | 16 +++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json diff --git a/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json b/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json new file mode 100644 index 0000000000..177079b66d --- /dev/null +++ b/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Fix column sizing test to pass in webkit", + "packageName": "@ni/nimble-components", + "email": "20542556+mollykreis@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts index 56012c72c5..3b32cfa666 100644 --- a/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts +++ b/packages/nimble-components/src/table/tests/table-column-sizing.spec.ts @@ -495,16 +495,18 @@ describe('Table Interactive Column Sizing', () => { expect(pageObject.isHorizontalScrollbarVisible()).toBeTrue(); }); - // WebKit skipped, see https://github.com/ni/nimble/issues/1939 - it('sizing table with a horizontal scrollbar does not change column widths until sized beyond current column pixel widths #SkipWebkit', async () => { - // create horizontal scrollbar with total column width of 450 - pageObject.dragSizeColumnByRightDivider(2, [100]); + it('sizing table with a horizontal scrollbar does not change column widths until sized beyond current column pixel widths', async () => { + // Create a horizontal scrollbar with a total column width of 500. This updates the columns' + // current fractional widths to 0.8, 0.8, 2, and 0.4, which keeps the columns widths as + // integers when the table is resized later in the test. Otherwise, different browsers + // may have slightly different rounding behaviors. + pageObject.dragSizeColumnByRightDivider(2, [150]); // size table below threshhold of total column widths await pageObject.sizeTableToGivenRowWidth(425, element); - expect(pageObject.getTotalCellRenderedWidth()).toBe(450); - // size table 50 pixels beyond total column widths - await pageObject.sizeTableToGivenRowWidth(500, element); expect(pageObject.getTotalCellRenderedWidth()).toBe(500); + // size table 100 pixels beyond total column widths + await pageObject.sizeTableToGivenRowWidth(600, element); + expect(pageObject.getTotalCellRenderedWidth()).toBe(600); expect(pageObject.isHorizontalScrollbarVisible()).toBeFalse(); }); From ab05b69d516175867402d8399015e38cfe078209 Mon Sep 17 00:00:00 2001 From: rajsite Date: Thu, 21 Mar 2024 16:25:39 +0000 Subject: [PATCH 04/11] applying package updates [skip ci] --- ...ents-f0730b00-2a69-4d06-8241-d97c34bf98b1.json | 7 ------- packages/nimble-components/CHANGELOG.json | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 7 deletions(-) delete mode 100644 change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json diff --git a/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json b/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json deleted file mode 100644 index 177079b66d..0000000000 --- a/change/@ni-nimble-components-f0730b00-2a69-4d06-8241-d97c34bf98b1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Fix column sizing test to pass in webkit", - "packageName": "@ni/nimble-components", - "email": "20542556+mollykreis@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index 7c3c87ef3a..bfdac4cd9d 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Thu, 21 Mar 2024 16:25:39 GMT", + "version": "22.1.1", + "tag": "@ni/nimble-components_v22.1.1", + "comments": { + "none": [ + { + "author": "20542556+mollykreis@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "7e52ce24569e94af5282b4b77f34608211cf74c9", + "comment": "Fix column sizing test to pass in webkit" + } + ] + } + }, { "date": "Thu, 21 Mar 2024 00:31:13 GMT", "version": "22.1.1", From b93385a27672ebc03e18a864e8fa268727595c66 Mon Sep 17 00:00:00 2001 From: Fred Visser <1458528+fredvisser@users.noreply.github.com> Date: Thu, 21 Mar 2024 11:54:37 -0500 Subject: [PATCH 05/11] Add BodyPlus1 font token (and Body_2 base token) (#1944) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request ## ๐Ÿคจ Rationale in PR #1836 **BodyEmphasizedPlus1** font was added to try and address #1831. This PR fixes #1831 by adding a token for **BodyPlus1** and updating the previously added token name in a breaking change to be **BodyPlus1Emphasized**. Also updated the token suffixes list to treat `DisabledFontColor` as a `token_type` ## ๐Ÿ‘ฉโ€๐Ÿ’ป Implementation Followed the Theme-aware tokens contributing docs. ## ๐Ÿงช Testing Manual review of Storybook token stories. ## โœ… Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Milan Raj --- ...-6e819e6f-2633-43f7-8e29-c38c7850ee59.json | 7 ++ ...-22976edc-9923-4946-87ba-6eee7aef6eed.json | 7 ++ .../theme-provider/design-token-comments.ts | 42 ++++++---- .../src/theme-provider/design-token-names.ts | 47 ++++++----- .../src/theme-provider/design-tokens.ts | 81 ++++++++++++------- .../theme-provider/tests/tokens.stories.ts | 1 + .../styledictionary/properties/fonts.json | 11 +++ .../styledictionary/properties/sizes.json | 3 + 8 files changed, 136 insertions(+), 63 deletions(-) create mode 100644 change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json create mode 100644 change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json diff --git a/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json b/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json new file mode 100644 index 0000000000..f29be2e94a --- /dev/null +++ b/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json @@ -0,0 +1,7 @@ +{ + "type": "major", + "comment": "Breaking change: Renamed bodyEmphasizedPlus1 to bodyPlus1Emphasized to align with token conventions. Also, added bodyPlus1 font token", + "packageName": "@ni/nimble-components", + "email": "1458528+fredvisser@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json b/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json new file mode 100644 index 0000000000..b29cdc7260 --- /dev/null +++ b/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "Add Body_2 base font token", + "packageName": "@ni/nimble-tokens", + "email": "1458528+fredvisser@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/nimble-components/src/theme-provider/design-token-comments.ts b/packages/nimble-components/src/theme-provider/design-token-comments.ts index 7e38139d14..945379c8bf 100644 --- a/packages/nimble-components/src/theme-provider/design-token-comments.ts +++ b/packages/nimble-components/src/theme-provider/design-token-comments.ts @@ -210,6 +210,14 @@ export const comments: { readonly [key in TokenName]: string | null } = { 'Font line height for the "Placeholder" base token', placeholderFallbackFontFamily: 'Fallback font family for the "Placeholder" base token', + bodyFont: 'Font shorthand for the "Body" base token', + bodyFontColor: 'Font color for the "Body" base token', + bodyDisabledFontColor: 'Disabled font color for the "Body" base token', + bodyFontFamily: 'Font family for the "Body" base token', + bodyFontSize: 'Font size for the "Body" base token', + bodyFontWeight: 'Font weight for the "Body" base token', + bodyFontLineHeight: 'Font line height for the "Body" base token', + bodyFallbackFontFamily: 'Fallback font family for the "Body" base token', bodyEmphasizedFont: 'Font shorthand for the "BodyEmphasized" base token', bodyEmphasizedFontColor: 'Font color for the "BodyEmphasized" base token', bodyEmphasizedDisabledFontColor: @@ -221,30 +229,32 @@ export const comments: { readonly [key in TokenName]: string | null } = { 'Font line height for the "BodyEmphasized" base token', bodyEmphasizedFallbackFontFamily: 'Fallback font family for the "BodyEmphasized" base token', - bodyEmphasizedPlus1Font: + bodyPlus1Font: 'Font shorthand for the "Body_2" base token', + bodyPlus1FontColor: 'Font color for the "Body_2" base token', + bodyPlus1DisabledFontColor: + 'Disabled font color for the "Body_2" base token', + bodyPlus1FontFamily: 'Font family for the "Body_2" base token', + bodyPlus1FontSize: 'Font size for the "Body_2" base token', + bodyPlus1FontWeight: 'Font weight for the "Body_2" base token', + bodyPlus1FontLineHeight: 'Font line height for the "Body_2" base token', + bodyPlus1FallbackFontFamily: + 'Fallback font family for the "Body_2" base token', + bodyPlus1EmphasizedFont: 'Font shorthand for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FontColor: + bodyPlus1EmphasizedFontColor: 'Font color for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1DisabledFontColor: + bodyPlus1EmphasizedDisabledFontColor: 'Disabled font color for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FontFamily: + bodyPlus1EmphasizedFontFamily: 'Font family for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FontSize: + bodyPlus1EmphasizedFontSize: 'Font size for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FontWeight: + bodyPlus1EmphasizedFontWeight: 'Font weight for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FontLineHeight: + bodyPlus1EmphasizedFontLineHeight: 'Font line height for the "BodyEmphasized_2" base token', - bodyEmphasizedPlus1FallbackFontFamily: + bodyPlus1EmphasizedFallbackFontFamily: 'Fallback font family for the "BodyEmphasized_2" base token', - bodyFont: 'Font shorthand for the "Body" base token', - bodyFontColor: 'Font color for the "Body" base token', - bodyDisabledFontColor: 'Disabled font color for the "Body" base token', - bodyFontFamily: 'Font family for the "Body" base token', - bodyFontSize: 'Font size for the "Body" base token', - bodyFontWeight: 'Font weight for the "Body" base token', - bodyFontLineHeight: 'Font line height for the "Body" base token', - bodyFallbackFontFamily: 'Fallback font family for the "Body" base token', groupHeaderFont: 'Font shorthand for the "Group_Header_1" base token', groupHeaderFontColor: 'Font color for the "Group_Header_1" base token', groupHeaderDisabledFontColor: diff --git a/packages/nimble-components/src/theme-provider/design-token-names.ts b/packages/nimble-components/src/theme-provider/design-token-names.ts index 3725fadbba..02900b47d5 100644 --- a/packages/nimble-components/src/theme-provider/design-token-names.ts +++ b/packages/nimble-components/src/theme-provider/design-token-names.ts @@ -169,25 +169,6 @@ export const tokenNames: { readonly [key in TokenName]: string } = { placeholderFontWeight: 'placeholder-font-weight', placeholderFontLineHeight: 'placeholder-font-line-height', placeholderFallbackFontFamily: 'placeholder-fallback-font-family', - bodyEmphasizedFont: 'body-emphasized-font', - bodyEmphasizedFontColor: 'body-emphasized-font-color', - bodyEmphasizedDisabledFontColor: 'body-emphasized-disabled-font-color', - bodyEmphasizedFontFamily: 'body-emphasized-font-family', - bodyEmphasizedFontSize: 'body-emphasized-font-size', - bodyEmphasizedFontWeight: 'body-emphasized-font-weight', - bodyEmphasizedFontLineHeight: 'body-emphasized-font-line-height', - bodyEmphasizedFallbackFontFamily: 'body-emphasized-fallback-font-family', - bodyEmphasizedPlus1Font: 'body-emphasized-plus-1-font', - bodyEmphasizedPlus1FontColor: 'body-emphasized-plus-1-font-color', - bodyEmphasizedPlus1DisabledFontColor: - 'body-emphasized-plus-1-disabled-font-color', - bodyEmphasizedPlus1FontFamily: 'body-emphasized-plus-1-font-family', - bodyEmphasizedPlus1FontSize: 'body-emphasized-plus-1-font-size', - bodyEmphasizedPlus1FontWeight: 'body-emphasized-plus-1-font-weight', - bodyEmphasizedPlus1FontLineHeight: - 'body-emphasized-plus-1-font-line-height', - bodyEmphasizedPlus1FallbackFontFamily: - 'body-emphasized-plus-1-fallback-font-family', bodyFont: 'body-font', bodyFontColor: 'body-font-color', bodyDisabledFontColor: 'body-disabled-font-color', @@ -196,6 +177,33 @@ export const tokenNames: { readonly [key in TokenName]: string } = { bodyFontWeight: 'body-font-weight', bodyFontLineHeight: 'body-font-line-height', bodyFallbackFontFamily: 'body-fallback-font-family', + bodyEmphasizedFont: 'body-emphasized-font', + bodyEmphasizedFontColor: 'body-emphasized-font-color', + bodyEmphasizedDisabledFontColor: 'body-emphasized-disabled-font-color', + bodyEmphasizedFontFamily: 'body-emphasized-font-family', + bodyEmphasizedFontSize: 'body-emphasized-font-size', + bodyEmphasizedFontWeight: 'body-emphasized-font-weight', + bodyEmphasizedFontLineHeight: 'body-emphasized-font-line-height', + bodyEmphasizedFallbackFontFamily: 'body-emphasized-fallback-font-family', + bodyPlus1Font: 'body-plus-1-font', + bodyPlus1FontColor: 'body-plus-1-font-color', + bodyPlus1DisabledFontColor: 'body-plus-1-disabled-font-color', + bodyPlus1FontFamily: 'body-plus-1-font-family', + bodyPlus1FontSize: 'body-plus-1-font-size', + bodyPlus1FontWeight: 'body-plus-1-font-weight', + bodyPlus1FontLineHeight: 'body-plus-1-font-line-height', + bodyPlus1FallbackFontFamily: 'body-plus-1-fallback-font-family', + bodyPlus1EmphasizedFont: 'body-plus-1-emphasized-font', + bodyPlus1EmphasizedFontColor: 'body-plus-1-emphasized-font-color', + bodyPlus1EmphasizedDisabledFontColor: + 'body-plus-1-emphasized-disabled-font-color', + bodyPlus1EmphasizedFontFamily: 'body-plus-1-emphasized-font-family', + bodyPlus1EmphasizedFontSize: 'body-plus-1-emphasized-font-size', + bodyPlus1EmphasizedFontWeight: 'body-plus-1-emphasized-font-weight', + bodyPlus1EmphasizedFontLineHeight: + 'body-plus-1-emphasized-font-line-height', + bodyPlus1EmphasizedFallbackFontFamily: + 'body-plus-1-emphasized-fallback-font-family', groupHeaderFont: 'group-header-font', groupHeaderFontColor: 'group-header-font-color', groupHeaderDisabledFontColor: 'group-header-disabled-font-color', @@ -270,6 +278,7 @@ export const scssInternalPropertySetterMarkdown = ( // Order of suffixes in the array matter, as we want single word suffixes after the multi-word ones const tokenSuffixes = [ 'RgbPartialColor', + 'DisabledFontColor', 'FontColor', 'FontLineHeight', 'FontWeight', diff --git a/packages/nimble-components/src/theme-provider/design-tokens.ts b/packages/nimble-components/src/theme-provider/design-tokens.ts index 0261fe694d..015722a783 100644 --- a/packages/nimble-components/src/theme-provider/design-tokens.ts +++ b/packages/nimble-components/src/theme-provider/design-tokens.ts @@ -23,6 +23,9 @@ import { BodyFamily, BodySize, BodyWeight, + Body2Family, + Body2Size, + Body2Weight, ControlLabel1Family, ControlLabel1Size, ControlLabel1Weight, @@ -83,6 +86,7 @@ import { BodyEmphasizedLineHeight, BodyEmphasized2LineHeight, BodyLineHeight, + Body2LineHeight, GroupLabel1LineHeight, ControlLabel1LineHeight, ButtonLabel1LineHeight, @@ -118,6 +122,7 @@ const Subtitle2FallbackFontFamily = 'Source Sans Pro Fallback'; const LinkFallbackFontFamily = 'Source Sans Pro Fallback'; const PlaceholderFallbackFontFamily = 'Source Sans Pro Fallback'; const BodyFallbackFontFamily = 'Source Sans Pro Fallback'; +const Body2FallbackFontFamily = 'Source Sans Pro Fallback'; const BodyEmphasizedFallbackFontFamily = 'Source Sans Pro Fallback'; const BodyEmphasized2FallbackFontFamily = 'Source Sans Pro Fallback'; const GroupLabel1FallbackFontFamily = 'Source Sans Pro Fallback'; @@ -627,6 +632,26 @@ export const [ PlaceholderFallbackFontFamily ); +export const [ + bodyFont, + bodyFontColor, + bodyDisabledFontColor, + bodyFontFamily, + bodyFontWeight, + bodyFontSize, + bodyFontLineHeight, + bodyFallbackFontFamily +] = createFontTokens( + tokenNames.bodyFont, + (element: HTMLElement) => getDefaultFontColorForTheme(element), + (element: HTMLElement) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), + BodyFamily, + BodyWeight, + BodySize, + BodyLineHeight, + BodyFallbackFontFamily +); + export const [ bodyEmphasizedFont, bodyEmphasizedFontColor, @@ -648,43 +673,43 @@ export const [ ); export const [ - bodyEmphasizedPlus1Font, - bodyEmphasizedPlus1FontColor, - bodyEmphasizedPlus1DisabledFontColor, - bodyEmphasizedPlus1FontFamily, - bodyEmphasizedPlus1FontWeight, - bodyEmphasizedPlus1FontSize, - bodyEmphasizedPlus1FontLineHeight, - bodyEmphasizedPlus1FallbackFontFamily + bodyPlus1Font, + bodyPlus1FontColor, + bodyPlus1DisabledFontColor, + bodyPlus1FontFamily, + bodyPlus1FontWeight, + bodyPlus1FontSize, + bodyPlus1FontLineHeight, + bodyPlus1FallbackFontFamily ] = createFontTokens( - tokenNames.bodyEmphasizedPlus1Font, + tokenNames.bodyPlus1Font, (element: HTMLElement) => getDefaultFontColorForTheme(element), (element: HTMLElement) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), - BodyEmphasized2Family, - BodyEmphasized2Weight, - BodyEmphasized2Size, - BodyEmphasized2LineHeight, - BodyEmphasized2FallbackFontFamily + Body2Family, + Body2Weight, + Body2Size, + Body2LineHeight, + Body2FallbackFontFamily ); export const [ - bodyFont, - bodyFontColor, - bodyDisabledFontColor, - bodyFontFamily, - bodyFontWeight, - bodyFontSize, - bodyFontLineHeight, - bodyFallbackFontFamily + bodyPlus1EmphasizedFont, + bodyPlus1EmphasizedFontColor, + bodyPlus1EmphasizedDisabledFontColor, + bodyPlus1EmphasizedFontFamily, + bodyPlus1EmphasizedFontWeight, + bodyPlus1EmphasizedFontSize, + bodyPlus1EmphasizedFontLineHeight, + bodyPlus1EmphasizedFallbackFontFamily ] = createFontTokens( - tokenNames.bodyFont, + tokenNames.bodyPlus1EmphasizedFont, (element: HTMLElement) => getDefaultFontColorForTheme(element), (element: HTMLElement) => hexToRgbaCssColor(getDefaultFontColorForTheme(element), 0.3), - BodyFamily, - BodyWeight, - BodySize, - BodyLineHeight, - BodyFallbackFontFamily + BodyEmphasized2Family, + BodyEmphasized2Weight, + BodyEmphasized2Size, + BodyEmphasized2LineHeight, + BodyEmphasized2FallbackFontFamily ); export const [ diff --git a/packages/nimble-components/src/theme-provider/tests/tokens.stories.ts b/packages/nimble-components/src/theme-provider/tests/tokens.stories.ts index 595f922d0f..5c84b9fb61 100644 --- a/packages/nimble-components/src/theme-provider/tests/tokens.stories.ts +++ b/packages/nimble-components/src/theme-provider/tests/tokens.stories.ts @@ -96,6 +96,7 @@ const tokenTemplates: { } = { Color: colorTemplate, RgbPartialColor: rgbColorTemplate, + DisabledFontColor: colorTemplate, FontColor: colorTemplate, FontLineHeight: stringValueTemplate, FontWeight: stringValueTemplate, diff --git a/packages/nimble-tokens/source/styledictionary/properties/fonts.json b/packages/nimble-tokens/source/styledictionary/properties/fonts.json index 4745cd3608..9e43932adf 100644 --- a/packages/nimble-tokens/source/styledictionary/properties/fonts.json +++ b/packages/nimble-tokens/source/styledictionary/properties/fonts.json @@ -24,6 +24,14 @@ "value": "Regular" } }, + "Body_2": { + "family": { + "value": "Source Sans Pro" + }, + "weight": { + "value": "Regular" + } + }, "Header0": { "family": { "value": "Noto Serif" @@ -260,6 +268,9 @@ "Body": { "value": "14" }, + "Body_2": { + "value": "16" + }, "Header0": { "value": "36" }, diff --git a/packages/nimble-tokens/source/styledictionary/properties/sizes.json b/packages/nimble-tokens/source/styledictionary/properties/sizes.json index 97d1a1fa25..0b6de7129d 100644 --- a/packages/nimble-tokens/source/styledictionary/properties/sizes.json +++ b/packages/nimble-tokens/source/styledictionary/properties/sizes.json @@ -3,6 +3,9 @@ "Body-line-height": { "value": "18" }, + "Body_2-line-height": { + "value": "16" + }, "ControlLabel_1-line-height": { "value": "16" }, From 0025e151b7c1896cba37307a2a7c0a1b50de8379 Mon Sep 17 00:00:00 2001 From: rajsite Date: Thu, 21 Mar 2024 17:13:38 +0000 Subject: [PATCH 06/11] applying package updates [skip ci] --- .../projects/ni/nimble-angular/CHANGELOG.json | 15 +++++++++++++ .../projects/ni/nimble-angular/CHANGELOG.md | 10 ++++++++- .../projects/ni/nimble-angular/package.json | 4 ++-- ...-6e819e6f-2633-43f7-8e29-c38c7850ee59.json | 7 ------- ...-22976edc-9923-4946-87ba-6eee7aef6eed.json | 7 ------- package-lock.json | 12 +++++------ packages/nimble-blazor/package.json | 2 +- packages/nimble-components/CHANGELOG.json | 21 +++++++++++++++++++ packages/nimble-components/CHANGELOG.md | 11 +++++++++- packages/nimble-components/package.json | 4 ++-- packages/nimble-tokens/CHANGELOG.json | 15 +++++++++++++ packages/nimble-tokens/CHANGELOG.md | 10 ++++++++- packages/nimble-tokens/package.json | 2 +- 13 files changed, 91 insertions(+), 29 deletions(-) delete mode 100644 change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json delete mode 100644 change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json index f170144ec8..c95bf7331b 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-angular", "entries": [ + { + "date": "Thu, 21 Mar 2024 17:13:38 GMT", + "version": "20.5.2", + "tag": "@ni/nimble-angular_v20.5.2", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@ni/nimble-angular", + "comment": "Bump @ni/nimble-components to v23.0.0", + "commit": "not available" + } + ] + } + }, { "date": "Wed, 20 Mar 2024 16:45:59 GMT", "version": "20.5.1", diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md index 1a2aa3c1ca..3a4d8e308d 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-angular -This log was last generated on Wed, 20 Mar 2024 16:45:59 GMT and should not be manually modified. +This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified. +## 20.5.2 + +Thu, 21 Mar 2024 17:13:38 GMT + +### Patches + +- Bump @ni/nimble-components to v23.0.0 + ## 20.5.1 Wed, 20 Mar 2024 16:45:59 GMT diff --git a/angular-workspace/projects/ni/nimble-angular/package.json b/angular-workspace/projects/ni/nimble-angular/package.json index cc13ba5b80..b6db60197e 100644 --- a/angular-workspace/projects/ni/nimble-angular/package.json +++ b/angular-workspace/projects/ni/nimble-angular/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-angular", - "version": "20.5.1", + "version": "20.5.2", "description": "Angular components for the NI Nimble Design System", "scripts": { "invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish" @@ -31,7 +31,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^22.1.1" + "@ni/nimble-components": "^23.0.0" }, "dependencies": { "tslib": "^2.2.0" diff --git a/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json b/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json deleted file mode 100644 index f29be2e94a..0000000000 --- a/change/@ni-nimble-components-6e819e6f-2633-43f7-8e29-c38c7850ee59.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "major", - "comment": "Breaking change: Renamed bodyEmphasizedPlus1 to bodyPlus1Emphasized to align with token conventions. Also, added bodyPlus1 font token", - "packageName": "@ni/nimble-components", - "email": "1458528+fredvisser@users.noreply.github.com", - "dependentChangeType": "patch" -} diff --git a/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json b/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json deleted file mode 100644 index b29cdc7260..0000000000 --- a/change/@ni-nimble-tokens-22976edc-9923-4946-87ba-6eee7aef6eed.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "Add Body_2 base font token", - "packageName": "@ni/nimble-tokens", - "email": "1458528+fredvisser@users.noreply.github.com", - "dependentChangeType": "patch" -} diff --git a/package-lock.json b/package-lock.json index f8fe26c4e2..c045478cf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ }, "angular-workspace/projects/ni/nimble-angular": { "name": "@ni/nimble-angular", - "version": "20.5.1", + "version": "20.5.2", "license": "MIT", "dependencies": { "tslib": "^2.2.0" @@ -85,7 +85,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^22.1.1" + "@ni/nimble-components": "^23.0.0" } }, "node_modules/@11ty/dependency-tree": { @@ -33939,7 +33939,7 @@ }, "packages/nimble-blazor": { "name": "@ni/nimble-blazor", - "version": "14.5.1", + "version": "14.5.2", "hasInstallScript": true, "license": "MIT", "devDependencies": { @@ -33975,14 +33975,14 @@ }, "packages/nimble-components": { "name": "@ni/nimble-components", - "version": "22.1.1", + "version": "23.0.0", "license": "MIT", "dependencies": { "@microsoft/fast-colors": "^5.3.1", "@microsoft/fast-element": "^1.12.0", "@microsoft/fast-foundation": "2.49.4", "@microsoft/fast-web-utilities": "^6.0.0", - "@ni/nimble-tokens": "^6.12.1", + "@ni/nimble-tokens": "^6.13.0", "@tanstack/table-core": "^8.10.7", "@tanstack/virtual-core": "^3.0.0-beta.68", "@tiptap/core": "^2.2.2", @@ -34974,7 +34974,7 @@ }, "packages/nimble-tokens": { "name": "@ni/nimble-tokens", - "version": "6.12.1", + "version": "6.13.0", "license": "MIT", "devDependencies": { "@microsoft/fast-colors": "^5.3.1", diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index ff76936429..a496b2b43e 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-blazor", - "version": "14.5.1", + "version": "14.5.2", "description": "Blazor components for the NI Nimble Design System", "scripts": { "postinstall": "node build/generate-playwright-version-properties/source/index.js", diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index bfdac4cd9d..df4d30114b 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,27 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Thu, 21 Mar 2024 17:13:38 GMT", + "version": "23.0.0", + "tag": "@ni/nimble-components_v23.0.0", + "comments": { + "major": [ + { + "author": "1458528+fredvisser@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "b93385a27672ebc03e18a864e8fa268727595c66", + "comment": "Breaking change: Renamed bodyEmphasizedPlus1 to bodyPlus1Emphasized to align with token conventions. Also, added bodyPlus1 font token" + }, + { + "author": "beachball", + "package": "@ni/nimble-components", + "comment": "Bump @ni/nimble-tokens to v6.13.0", + "commit": "not available" + } + ] + } + }, { "date": "Thu, 21 Mar 2024 16:25:39 GMT", "version": "22.1.1", diff --git a/packages/nimble-components/CHANGELOG.md b/packages/nimble-components/CHANGELOG.md index 8825f33110..a3208751fb 100644 --- a/packages/nimble-components/CHANGELOG.md +++ b/packages/nimble-components/CHANGELOG.md @@ -1,9 +1,18 @@ # Change Log - @ni/nimble-components -This log was last generated on Wed, 20 Mar 2024 16:45:59 GMT and should not be manually modified. +This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified. +## 23.0.0 + +Thu, 21 Mar 2024 17:13:38 GMT + +### Major changes + +- Breaking change: Renamed bodyEmphasizedPlus1 to bodyPlus1Emphasized to align with token conventions. Also, added bodyPlus1 font token ([ni/nimble@b93385a](https://github.com/ni/nimble/commit/b93385a27672ebc03e18a864e8fa268727595c66)) +- Bump @ni/nimble-tokens to v6.13.0 + ## 22.1.1 Wed, 20 Mar 2024 16:45:59 GMT diff --git a/packages/nimble-components/package.json b/packages/nimble-components/package.json index eedf89911c..d23d40c7e5 100644 --- a/packages/nimble-components/package.json +++ b/packages/nimble-components/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-components", - "version": "22.1.1", + "version": "23.0.0", "description": "Styled web components for the NI Nimble Design System", "scripts": { "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook", @@ -68,7 +68,7 @@ "@microsoft/fast-element": "^1.12.0", "@microsoft/fast-foundation": "2.49.4", "@microsoft/fast-web-utilities": "^6.0.0", - "@ni/nimble-tokens": "^6.12.1", + "@ni/nimble-tokens": "^6.13.0", "@tanstack/table-core": "^8.10.7", "@tanstack/virtual-core": "^3.0.0-beta.68", "@tiptap/core": "^2.2.2", diff --git a/packages/nimble-tokens/CHANGELOG.json b/packages/nimble-tokens/CHANGELOG.json index 4b32d99095..089330fec9 100644 --- a/packages/nimble-tokens/CHANGELOG.json +++ b/packages/nimble-tokens/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-tokens", "entries": [ + { + "date": "Thu, 21 Mar 2024 17:13:38 GMT", + "version": "6.13.0", + "tag": "@ni/nimble-tokens_v6.13.0", + "comments": { + "minor": [ + { + "author": "1458528+fredvisser@users.noreply.github.com", + "package": "@ni/nimble-tokens", + "commit": "b93385a27672ebc03e18a864e8fa268727595c66", + "comment": "Add Body_2 base font token" + } + ] + } + }, { "date": "Tue, 12 Mar 2024 21:01:54 GMT", "version": "6.12.1", diff --git a/packages/nimble-tokens/CHANGELOG.md b/packages/nimble-tokens/CHANGELOG.md index 1640ba454b..def2a83a56 100644 --- a/packages/nimble-tokens/CHANGELOG.md +++ b/packages/nimble-tokens/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-tokens -This log was last generated on Tue, 12 Mar 2024 21:01:54 GMT and should not be manually modified. +This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified. +## 6.13.0 + +Thu, 21 Mar 2024 17:13:38 GMT + +### Minor changes + +- Add Body_2 base font token ([ni/nimble@b93385a](https://github.com/ni/nimble/commit/b93385a27672ebc03e18a864e8fa268727595c66)) + ## 6.12.1 Tue, 12 Mar 2024 21:01:54 GMT diff --git a/packages/nimble-tokens/package.json b/packages/nimble-tokens/package.json index c44fcb3619..afefbfb147 100644 --- a/packages/nimble-tokens/package.json +++ b/packages/nimble-tokens/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-tokens", - "version": "6.12.1", + "version": "6.13.0", "description": "Design tokens for the NI Nimble Design System", "scripts": { "build": "npm run build:svg-to-ts && npm run build:ts && npm run build:svg-to-ico && npm run build:generate-font-scss && npm run build:style-dictionary", From 9c6adb41673c9bfbd3284e499d72b8199679c9ce Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 19:24:41 +0000 Subject: [PATCH 07/11] Update dependency webpack-dev-middleware to v7.1.0 [SECURITY] (#1957) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [webpack-dev-middleware](https://togithub.com/webpack/webpack-dev-middleware) | [`7.0.0` -> `7.1.0`](https://renovatebot.com/diffs/npm/webpack-dev-middleware/7.0.0/7.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/webpack-dev-middleware/7.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/webpack-dev-middleware/7.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/webpack-dev-middleware/7.0.0/7.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/webpack-dev-middleware/7.0.0/7.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | ### GitHub Vulnerability Alerts #### [CVE-2024-29180](https://togithub.com/webpack/webpack-dev-middleware/security/advisories/GHSA-wr3j-pwj9-hqq6) ### Summary _The **webpack-dev-middleware** middleware does not validate the supplied URL address sufficiently before returning the local file. It is possible to access any file on the developer's machine._ ### Details The middleware can either work with the physical filesystem when reading the files or it can use a virtualized in-memory _memfs_ filesystem. If _writeToDisk_ configuration option is set to **true**, the physical filesystem is used: [https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js#L21](https://togithub.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/setupOutputFileSystem.js#L21) The _**getFilenameFromUrl**_ method is used to parse URL and build the local file path. The public path prefix is stripped from the URL, and the **unsecaped** path suffix is appended to the _outputPath_: [https://github.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#L82](https://togithub.com/webpack/webpack-dev-middleware/blob/7ed24e0b9f53ad1562343f9f517f0f0ad2a70377/src/utils/getFilenameFromUrl.js#L82) As the URL is not unescaped and normalized automatically before calling the midlleware, it is possible to use _%2e_ and _%2f_ sequences to perform path traversal attack. ### PoC _A blank project can be created containing the following configuration file **webpack.config.js**:_ `module.exports = { devServer: { devMiddleware: { writeToDisk: true } } }; ` When started, it is possible to access any local file, e.g. _/etc/passwd_: `$ curl localhost:8080/public/..%2f..%2f..%2f..%2f../etc/passwd` ``` root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin bin:x:2:2:bin:/bin:/usr/sbin/nologin sys:x:3:3:sys:/dev:/usr/sbin/nologin sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/usr/sbin/nologin ``` ### Impact The developers using _webpack-dev-server_ or _webpack-dev-middleware_ are affected by the issue. When the project is started, an attacker might access any file on the developer's machine and exfiltrate the content (e.g. password, configuration files, private source code, ...). If the development server is listening on a public IP address (or **0.0.0.0**), an attacker on the local network can access the local files without any interaction from the victim (direct connection to the port). If the server allows access from third-party domains (CORS, **_Allow-Access-Origin: *_** ), an attacker can send a malicious link to the victim. When visited, the client side script can connect to the local server and exfiltrate the local files. ### Recommendation The URL should be unescaped and normalized before any further processing. --- ### Release Notes
webpack/webpack-dev-middleware (webpack-dev-middleware) ### [`v7.1.0`](https://togithub.com/webpack/webpack-dev-middleware/blob/HEAD/CHANGELOG.md#710-2024-03-19) [Compare Source](https://togithub.com/webpack/webpack-dev-middleware/compare/v7.0.0...v7.1.0) ##### Features - prefer to use `fs.createReadStream` over `fs.readFileSync` to read files ([ab533de](https://togithub.com/webpack/webpack-dev-middleware/commit/ab533de933c6684218172b86992f35c3ca6c58a4)) ##### Bug Fixes - cleaup stream and handle errors ([#​1769](https://togithub.com/webpack/webpack-dev-middleware/issues/1769)) ([1258fdd](https://togithub.com/webpack/webpack-dev-middleware/commit/1258fdd3d9c175dbacf6bc3b36d5c3c545738f13)) - **security:** do not allow to read files above ([#​1771](https://togithub.com/webpack/webpack-dev-middleware/issues/1771)) ([e10008c](https://togithub.com/webpack/webpack-dev-middleware/commit/e10008c762e4d5821ed6990348dabf0d4d93a10e))
--- ### Configuration ๐Ÿ“… **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). ๐Ÿšฆ **Automerge**: Disabled by config. Please merge this manually once you are satisfied. โ™ป **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. ๐Ÿ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ni/nimble). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index c045478cf7..feef610ba6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33062,14 +33062,15 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.0.0.tgz", - "integrity": "sha512-tZ5hqsWwww/8DislmrzXE3x+4f+v10H1z57mA2dWFrILb4i3xX+dPhTkcdR0DLyQztrhF2AUmO5nN085UYjd/Q==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.1.0.tgz", + "integrity": "sha512-+RYhGOyviHkKdMi1aaT8WZBQW033YgyBgtQHF2kMWo3mYA9z7W2AjsyY/DIzvp2Bhzys4UgHXFsIyTiL5qRBVw==", "dev": true, "dependencies": { "colorette": "^2.0.10", "memfs": "^4.6.0", "mime-types": "^2.1.31", + "on-finished": "^2.4.1", "range-parser": "^1.2.1", "schema-utils": "^4.0.0" }, @@ -33090,9 +33091,9 @@ } }, "node_modules/webpack-dev-middleware/node_modules/memfs": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.7.7.tgz", - "integrity": "sha512-x9qc6k88J/VVwnfTkJV8pRRswJ2156Rc4w5rciRqKceFDZ0y1MqsNL9pkg5sE0GOcDzZYbonreALhaHzg1siFw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.8.0.tgz", + "integrity": "sha512-fcs7trFxZlOMadmTw5nyfOwS3il9pr3y+6xzLfXNwmuR/D0i4wz6rJURxArAbcJDGalbpbMvQ/IFI0NojRZgRg==", "dev": true, "dependencies": { "tslib": "^2.0.0" @@ -34075,7 +34076,7 @@ "typescript": "~4.9.5", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", - "webpack-dev-middleware": "^7.0.0" + "webpack-dev-middleware": "^7.1.0" }, "peerDependencies": { "apache-arrow": "^15.0.0" From 559c12f4b5eaae8fdbd18c6c0d2ecff097b699d5 Mon Sep 17 00:00:00 2001 From: Jesse Attas Date: Fri, 22 Mar 2024 11:01:27 -0500 Subject: [PATCH 08/11] Manually update Plawright to 1.42.0 (#1956) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request ## ๐Ÿคจ Rationale #1747 has a recurring maintenance task to update the version of Playwright to the latest version that's available in npm and Nuget. We were on 1.40.0, the [latest on npm is 1.42.1](https://www.npmjs.com/package/playwright?activeTab=versions), and the [latest on Nuget is 1.42.0](https://www.nuget.org/packages/Microsoft.Playwright) [Detailed release notes](https://github.com/microsoft/playwright/releases). ## ๐Ÿ‘ฉโ€๐Ÿ’ป Implementation 1. Searched for "1.40.0" in package.json files and updated to "1.42.0". 2. Ran `npm install` to regenerate package-lock.json ## ๐Ÿงช Testing 1. Verified locally that `packages/nimble-blazor/build/generate-playwright-version-properties/dist/Playwright.PackageVersion.props` is regenerated and the build and test commands pass. 2. Otherwise relying on PR build ## โœ… Checklist - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --- angular-workspace/package.json | 2 +- ...-4980f072-e099-43f9-bc09-988fe020a990.json | 7 ++++++ ...-7dfea167-198f-4c22-be90-becd425aca89.json | 7 ++++++ ...-3a874011-8c0c-4ad0-97a8-2708b9de5807.json | 7 ++++++ package-lock.json | 24 +++++++++---------- package.json | 2 +- packages/jasmine-parameterized/package.json | 2 +- packages/nimble-blazor/package.json | 2 +- packages/nimble-components/package.json | 2 +- 9 files changed, 38 insertions(+), 17 deletions(-) create mode 100644 change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json create mode 100644 change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json create mode 100644 change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json diff --git a/angular-workspace/package.json b/angular-workspace/package.json index 8850fcb683..7173fbc48e 100644 --- a/angular-workspace/package.json +++ b/angular-workspace/package.json @@ -58,7 +58,7 @@ "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "ng-packagr": "^15.2.2", - "playwright": "1.40.0", + "playwright": "1.42.0", "rollup": "^4.12.0", "typescript": "~4.9.5" } diff --git a/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json b/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json new file mode 100644 index 0000000000..c08cefbec8 --- /dev/null +++ b/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Update Playwright dev dependency to 1.42.0", + "packageName": "@ni/jasmine-parameterized", + "email": "jattasNI@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json b/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json new file mode 100644 index 0000000000..7dfac2a62c --- /dev/null +++ b/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Update Playwright dev dependency to 1.42.0", + "packageName": "@ni/nimble-blazor", + "email": "jattasNI@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json b/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json new file mode 100644 index 0000000000..256fe5f003 --- /dev/null +++ b/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "Update Playwright dev dependency to 1.42.0", + "packageName": "@ni/nimble-components", + "email": "jattasNI@users.noreply.github.com", + "dependentChangeType": "none" +} diff --git a/package-lock.json b/package-lock.json index feef610ba6..b9c0adaf64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "beachball": "^2.31.0", "cross-env": "^7.0.3", "patch-package": "^8.0.0", - "playwright": "1.40.0" + "playwright": "1.42.0" } }, "angular-workspace": { @@ -67,7 +67,7 @@ "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "ng-packagr": "^15.2.2", - "playwright": "1.40.0", + "playwright": "1.42.0", "rollup": "^4.12.0", "typescript": "~4.9.5" } @@ -26482,12 +26482,12 @@ } }, "node_modules/playwright": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.0.tgz", - "integrity": "sha512-gyHAgQjiDf1m34Xpwzaqb76KgfzYrhK7iih+2IzcOCoZWr/8ZqmdBw+t0RU85ZmfJMgtgAiNtBQ/KS2325INXw==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.42.0.tgz", + "integrity": "sha512-Ko7YRUgj5xBHbntrgt4EIw/nE//XBHOKVKnBjO1KuZkmkhlbgyggTe5s9hjqQ1LpN+Xg+kHsQyt5Pa0Bw5XpvQ==", "dev": true, "dependencies": { - "playwright-core": "1.40.0" + "playwright-core": "1.42.0" }, "bin": { "playwright": "cli.js" @@ -26500,9 +26500,9 @@ } }, "node_modules/playwright-core": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.0.tgz", - "integrity": "sha512-fvKewVJpGeca8t0ipM56jkVSU6Eo0RmFvQ/MaCQNDYm+sdvKkMBBWTE1FdeMqIdumRaXXjZChWHvIzCGM/tA/Q==", + "version": "1.42.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.42.0.tgz", + "integrity": "sha512-0HD9y8qEVlcbsAjdpBaFjmaTHf+1FeIddy8VJLeiqwhcNqGCBe4Wp2e8knpqiYbzxtxarxiXyNDw2cG8sCaNMQ==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -33934,7 +33934,7 @@ "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "karma-spec-reporter": "^0.0.36", - "playwright": "1.40.0", + "playwright": "1.42.0", "typescript": "~4.9.5" } }, @@ -33951,7 +33951,7 @@ "@rollup/plugin-node-resolve": "^15.0.1", "cross-env": "^7.0.3", "glob": "^10.3.10", - "playwright": "1.40.0", + "playwright": "1.42.0", "rimraf": "^5.0.5", "rollup": "^4.12.0" } @@ -34063,7 +34063,7 @@ "karma-spec-reporter": "^0.0.36", "karma-webkit-launcher": "^2.1.0", "karma-webpack": "^5.0.0", - "playwright": "1.40.0", + "playwright": "1.42.0", "prettier-eslint": "^16.3.0", "prettier-eslint-cli": "^8.0.1", "remark-gfm": "^3.0.1", diff --git a/package.json b/package.json index 69f6114952..a0cde29a26 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,6 @@ "beachball": "^2.31.0", "cross-env": "^7.0.3", "patch-package": "^8.0.0", - "playwright": "1.40.0" + "playwright": "1.42.0" } } diff --git a/packages/jasmine-parameterized/package.json b/packages/jasmine-parameterized/package.json index 5683dbbc83..f4888edaea 100644 --- a/packages/jasmine-parameterized/package.json +++ b/packages/jasmine-parameterized/package.json @@ -51,7 +51,7 @@ "karma-jasmine": "^5.1.0", "karma-jasmine-html-reporter": "^2.0.0", "karma-spec-reporter": "^0.0.36", - "playwright": "1.40.0", + "playwright": "1.42.0", "typescript": "~4.9.5" } } diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index a496b2b43e..85d6a32cc7 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -48,7 +48,7 @@ "@rollup/plugin-node-resolve": "^15.0.1", "cross-env": "^7.0.3", "glob": "^10.3.10", - "playwright": "1.40.0", + "playwright": "1.42.0", "rimraf": "^5.0.5", "rollup": "^4.12.0" } diff --git a/packages/nimble-components/package.json b/packages/nimble-components/package.json index d23d40c7e5..b2052a19b5 100644 --- a/packages/nimble-components/package.json +++ b/packages/nimble-components/package.json @@ -151,7 +151,7 @@ "karma-spec-reporter": "^0.0.36", "karma-webkit-launcher": "^2.1.0", "karma-webpack": "^5.0.0", - "playwright": "1.40.0", + "playwright": "1.42.0", "prettier-eslint": "^16.3.0", "prettier-eslint-cli": "^8.0.1", "remark-gfm": "^3.0.1", From 626b6c7460f70b835ae97d2b3d02e8472328fbea Mon Sep 17 00:00:00 2001 From: rajsite Date: Fri, 22 Mar 2024 16:18:25 +0000 Subject: [PATCH 09/11] applying package updates [skip ci] --- ...ized-4980f072-e099-43f9-bc09-988fe020a990.json | 7 ------- ...azor-7dfea167-198f-4c22-be90-becd425aca89.json | 7 ------- ...ents-3a874011-8c0c-4ad0-97a8-2708b9de5807.json | 7 ------- package-lock.json | 2 +- packages/jasmine-parameterized/CHANGELOG.json | 15 +++++++++++++++ packages/nimble-blazor/CHANGELOG.json | 15 +++++++++++++++ packages/nimble-components/CHANGELOG.json | 15 +++++++++++++++ 7 files changed, 46 insertions(+), 22 deletions(-) delete mode 100644 change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json delete mode 100644 change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json delete mode 100644 change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json diff --git a/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json b/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json deleted file mode 100644 index c08cefbec8..0000000000 --- a/change/@ni-jasmine-parameterized-4980f072-e099-43f9-bc09-988fe020a990.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Update Playwright dev dependency to 1.42.0", - "packageName": "@ni/jasmine-parameterized", - "email": "jattasNI@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json b/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json deleted file mode 100644 index 7dfac2a62c..0000000000 --- a/change/@ni-nimble-blazor-7dfea167-198f-4c22-be90-becd425aca89.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Update Playwright dev dependency to 1.42.0", - "packageName": "@ni/nimble-blazor", - "email": "jattasNI@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json b/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json deleted file mode 100644 index 256fe5f003..0000000000 --- a/change/@ni-nimble-components-3a874011-8c0c-4ad0-97a8-2708b9de5807.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "Update Playwright dev dependency to 1.42.0", - "packageName": "@ni/nimble-components", - "email": "jattasNI@users.noreply.github.com", - "dependentChangeType": "none" -} diff --git a/package-lock.json b/package-lock.json index b9c0adaf64..46b53e8b5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34076,7 +34076,7 @@ "typescript": "~4.9.5", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", - "webpack-dev-middleware": "^7.1.0" + "webpack-dev-middleware": "^7.0.0" }, "peerDependencies": { "apache-arrow": "^15.0.0" diff --git a/packages/jasmine-parameterized/CHANGELOG.json b/packages/jasmine-parameterized/CHANGELOG.json index 62aadb0a18..b9f515edf9 100644 --- a/packages/jasmine-parameterized/CHANGELOG.json +++ b/packages/jasmine-parameterized/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/jasmine-parameterized", "entries": [ + { + "date": "Fri, 22 Mar 2024 16:18:25 GMT", + "version": "0.2.3", + "tag": "@ni/jasmine-parameterized_v0.2.3", + "comments": { + "none": [ + { + "author": "jattasNI@users.noreply.github.com", + "package": "@ni/jasmine-parameterized", + "commit": "559c12f4b5eaae8fdbd18c6c0d2ecff097b699d5", + "comment": "Update Playwright dev dependency to 1.42.0" + } + ] + } + }, { "date": "Tue, 12 Mar 2024 21:01:53 GMT", "version": "0.2.3", diff --git a/packages/nimble-blazor/CHANGELOG.json b/packages/nimble-blazor/CHANGELOG.json index bb6c73b2d4..4f5282b62b 100644 --- a/packages/nimble-blazor/CHANGELOG.json +++ b/packages/nimble-blazor/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-blazor", "entries": [ + { + "date": "Fri, 22 Mar 2024 16:18:25 GMT", + "version": "14.5.2", + "tag": "@ni/nimble-blazor_v14.5.2", + "comments": { + "none": [ + { + "author": "jattasNI@users.noreply.github.com", + "package": "@ni/nimble-blazor", + "commit": "559c12f4b5eaae8fdbd18c6c0d2ecff097b699d5", + "comment": "Update Playwright dev dependency to 1.42.0" + } + ] + } + }, { "date": "Mon, 18 Mar 2024 17:12:34 GMT", "version": "14.5.0", diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index df4d30114b..13aaa57ee5 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Fri, 22 Mar 2024 16:18:25 GMT", + "version": "23.0.0", + "tag": "@ni/nimble-components_v23.0.0", + "comments": { + "none": [ + { + "author": "jattasNI@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "559c12f4b5eaae8fdbd18c6c0d2ecff097b699d5", + "comment": "Update Playwright dev dependency to 1.42.0" + } + ] + } + }, { "date": "Thu, 21 Mar 2024 17:13:38 GMT", "version": "23.0.0", From f56b73b45161a55b967dc03bbdd094a6527c814c Mon Sep 17 00:00:00 2001 From: Natan Muntean <33986780+munteannatan@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:45:21 +0200 Subject: [PATCH 10/11] Wafer Map Experimental Event Coordinator (#1916) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request ## ๐Ÿคจ Rationale I tried to expand on the strategy switching mechanism from the renderer, and reused it in the coordinator This approach has the benefits of isolating the experimental code while in development, and an easy way to switch to the new version by changing just the imports and switching mechanism and removing the old versions after they become obsolete ## ๐Ÿ‘ฉโ€๐Ÿ’ป Implementation because arquero causes typescript errors I implemented an alternative search and posted a PR with fixes in arquero repo https://github.com/uwdata/arquero/pull/346 changed the zoom handler to catch events on the component, not just the canvas removed zooming border of around 100px when zooming in the wafer after PO decision, resulting in less complex code and touch controls enabling. ## ๐Ÿงช Testing existing tests are passing created new hover unit tests with wafer and data manager mocks ## โœ… Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: rajsite --- ...-163379f4-09c6-4606-95f4-05917dd50ee0.json | 7 + .../nimble-components/src/wafer-map/index.ts | 78 ++++++-- .../src/wafer-map/modules/data-manager.ts | 6 +- .../wafer-map/modules/event-coordinator.ts | 47 ----- .../modules/experimental/hover-handler.ts | 98 ++++++++++ .../{ => experimental}/worker-renderer.ts | 4 +- .../src/wafer-map/modules/hover-handler.ts | 50 +++-- .../src/wafer-map/modules/prerendering.ts | 14 +- .../wafer-map/modules/wafer-map-validator.ts | 52 ++--- .../src/wafer-map/modules/zoom-handler.ts | 83 +++----- .../src/wafer-map/tests/computations.spec.ts | 13 +- .../src/wafer-map/tests/data-generator.ts | 2 +- .../src/wafer-map/tests/hover-handler.spec.ts | 114 +++++++++++ .../tests/prerendering.coloring.spec.ts | 182 ++++++++---------- .../tests/prerendering.labeling.spec.ts | 162 +++++++--------- .../tests/prerendering.positioning.spec.ts | 62 +++--- .../src/wafer-map/tests/sets.ts | 2 +- .../src/wafer-map/tests/utilities.ts | 93 +++++++-- .../tests/wafer-map-validator.spec.ts | 27 ++- .../src/wafer-map/tests/wafer-map.spec.ts | 48 +++-- .../src/wafer-map/tests/wafer-map.stories.ts | 4 +- .../nimble-components/src/wafer-map/types.ts | 21 ++ 22 files changed, 698 insertions(+), 471 deletions(-) create mode 100644 change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json delete mode 100644 packages/nimble-components/src/wafer-map/modules/event-coordinator.ts create mode 100644 packages/nimble-components/src/wafer-map/modules/experimental/hover-handler.ts rename packages/nimble-components/src/wafer-map/modules/{ => experimental}/worker-renderer.ts (95%) create mode 100644 packages/nimble-components/src/wafer-map/tests/hover-handler.spec.ts diff --git a/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json b/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json new file mode 100644 index 0000000000..7456d8a059 --- /dev/null +++ b/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Created new hover event for the new diesTable api and changed the zoom event", + "packageName": "@ni/nimble-components", + "email": "33986780+munteannatan@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/nimble-components/src/wafer-map/index.ts b/packages/nimble-components/src/wafer-map/index.ts index aed309664d..70c09e9b8d 100644 --- a/packages/nimble-components/src/wafer-map/index.ts +++ b/packages/nimble-components/src/wafer-map/index.ts @@ -10,19 +10,23 @@ import { template } from './template'; import { styles } from './styles'; import { DataManager } from './modules/data-manager'; import { RenderingModule } from './modules/rendering'; -import { EventCoordinator } from './modules/event-coordinator'; import { + HoverDie, HoverDieOpacity, WaferMapColorScale, WaferMapColorScaleMode, WaferMapDie, WaferMapOrientation, WaferMapOriginLocation, - WaferMapValidity + WaferMapValidity, + type WaferRequiredFields } 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 { @@ -33,12 +37,14 @@ declare global { /** * A nimble-styled WaferMap */ -export class WaferMap extends FoundationElement { +export class WaferMap< + T extends WaferRequiredFields = WaferRequiredFields +> extends FoundationElement { /** * @internal * needs to be initialized before the properties trigger changes */ - public readonly waferMapUpdateTracker = new WaferMapUpdateTracker(this); + public readonly waferMapUpdateTracker: WaferMapUpdateTracker = new WaferMapUpdateTracker(this.asRequiredFieldsWaferMap); @attr({ attribute: 'origin-location' }) public originLocation: WaferMapOriginLocation = WaferMapOriginLocation.bottomLeft; @@ -88,15 +94,23 @@ export class WaferMap extends FoundationElement { /** * @internal */ - public readonly dataManager = new DataManager(this); + public readonly dataManager: DataManager = new DataManager( + this.asRequiredFieldsWaferMap + ); + /** * @internal */ - public readonly mainRenderer = new RenderingModule(this); + public readonly mainRenderer = new RenderingModule( + this.asRequiredFieldsWaferMap + ); + /** * @internal */ - public readonly workerRenderer = new WorkerRenderer(this); + public readonly workerRenderer = new WorkerRenderer( + this.asRequiredFieldsWaferMap + ); @observable public renderer: RenderingModule | WorkerRenderer = this.mainRenderer; @@ -144,20 +158,29 @@ 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[] = []; - @observable public diesTable: Table | undefined; + @observable public diesTable: Table | undefined; @observable public colorScale: WaferMapColorScale = { colors: [], values: [] }; - private readonly eventCoordinator = new EventCoordinator(this); + private readonly hoverHandler: HoverHandler = new HoverHandler( + this.asRequiredFieldsWaferMap + ); + + private readonly experimentalHoverHandler: ExperimentalHoverHandler = new ExperimentalHoverHandler(this.asRequiredFieldsWaferMap); + + private readonly zoomHandler: ZoomHandler = new ZoomHandler( + this.asRequiredFieldsWaferMap + ); + private readonly resizeObserver = this.createResizeObserver(); - private readonly waferMapValidator = new WaferMapValidator(this); + private readonly waferMapValidator: WaferMapValidator = new WaferMapValidator(this.asRequiredFieldsWaferMap); public get validity(): WaferMapValidity { return this.waferMapValidator.getValidity(); @@ -168,12 +191,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); } @@ -190,8 +219,12 @@ export class WaferMap extends FoundationElement { if (this.validity.invalidDiesTableSchema) { return; } + this.renderer = this.isExperimentalRenderer() + ? this.workerRenderer + : this.mainRenderer; if (this.waferMapUpdateTracker.requiresEventsUpdate) { - this.eventCoordinator.detachEvents(); + // zoom translateExtent needs to be recalculated when canvas size changes + this.zoomHandler.disconnect(); if (this.waferMapUpdateTracker.requiresContainerDimensionsUpdate) { this.dataManager.updateContainerDimensions(); this.renderer.updateSortedDiesAndDrawWafer(); @@ -211,12 +244,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(); @@ -291,17 +331,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(); } @@ -330,6 +364,10 @@ export class WaferMap extends FoundationElement { this.waferMapUpdateTracker.track('hoverDie'); this.waferMapUpdateTracker.queueUpdate(); } + + private get asRequiredFieldsWaferMap(): WaferMap { + return this as WaferMap; + } } const nimbleWaferMap = WaferMap.compose({ diff --git a/packages/nimble-components/src/wafer-map/modules/data-manager.ts b/packages/nimble-components/src/wafer-map/modules/data-manager.ts index fb9fdbc3e9..b098683bfd 100644 --- a/packages/nimble-components/src/wafer-map/modules/data-manager.ts +++ b/packages/nimble-components/src/wafer-map/modules/data-manager.ts @@ -58,13 +58,13 @@ export class DataManager { return this.dataMap; } - private readonly computations; - private readonly prerendering; + private readonly computations: Computations; + private readonly prerendering: Prerendering; private dataMap!: Map; public constructor(private readonly wafermap: WaferMap) { this.computations = new Computations(wafermap); - this.prerendering = new Prerendering(wafermap, this); + this.prerendering = new Prerendering(wafermap); } public updateContainerDimensions(): void { diff --git a/packages/nimble-components/src/wafer-map/modules/event-coordinator.ts b/packages/nimble-components/src/wafer-map/modules/event-coordinator.ts deleted file mode 100644 index 420d401be5..0000000000 --- a/packages/nimble-components/src/wafer-map/modules/event-coordinator.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type { WaferMapDie } from '../types'; -import { ZoomHandler } from './zoom-handler'; -import type { WaferMap } from '..'; -import { HoverHandler } from './hover-handler'; - -export interface EventCoordinatorCallbacks { - dieSelected: (die: WaferMapDie) => void; -} - -/** - * EventCoordinator deals with user interactions and events - */ -export class EventCoordinator { - private readonly zoomHandler; - private readonly hoverHandler; - public constructor(private readonly wafermap: WaferMap) { - this.zoomHandler = new ZoomHandler(wafermap); - this.hoverHandler = new HoverHandler(wafermap); - } - - public attachEvents(): void { - this.zoomHandler.createZoomBehavior(); - this.wafermap.addEventListener('mousemove', this.onMouseMove); - this.wafermap.addEventListener('mouseout', this.onMouseOut); - this.wafermap.canvas.addEventListener('wheel', this.onWheelMove, { - passive: false - }); - } - - public detachEvents(): void { - this.wafermap.removeEventListener('mousemove', this.onMouseMove); - this.wafermap.removeEventListener('mouseout', this.onMouseOut); - this.wafermap.canvas.removeEventListener('wheel', this.onWheelMove); - } - - private readonly onWheelMove = (event: Event): void => { - event.preventDefault(); - }; - - private readonly onMouseMove = (event: MouseEvent): void => { - this.hoverHandler.mousemove(event); - }; - - private readonly onMouseOut = (): void => { - this.hoverHandler.mouseout(); - }; -} diff --git a/packages/nimble-components/src/wafer-map/modules/experimental/hover-handler.ts b/packages/nimble-components/src/wafer-map/modules/experimental/hover-handler.ts new file mode 100644 index 0000000000..82339eebdc --- /dev/null +++ b/packages/nimble-components/src/wafer-map/modules/experimental/hover-handler.ts @@ -0,0 +1,98 @@ +import type { WaferMap } from '../..'; +import { PointCoordinates, WaferMapOriginLocation } from '../../types'; + +/** + * HoverHandler deals with user interactions and events like hovering + */ +export class HoverHandler { + public constructor(private readonly wafermap: WaferMap) {} + + /** + * @internal + */ + public connect(): void { + this.wafermap.addEventListener('mousemove', this.onMouseMove); + this.wafermap.addEventListener('mouseout', this.onMouseOut); + } + + /** + * @internal + */ + public disconnect(): void { + this.wafermap.removeEventListener('mousemove', this.onMouseMove); + this.wafermap.removeEventListener('mouseout', this.onMouseOut); + } + + /** + * @internal + * keep public for testing until data manager refactor + */ + public readonly onMouseMove = (event: MouseEvent): void => { + if (!this.wafermap.isExperimentalRenderer()) { + return; + } + // get original mouse position in case we are in zoom. + const invertedPoint = this.wafermap.transform.invert([ + event.offsetX, + event.offsetY + ]); + + // does not work yet until data manager will parse diesTable + const dieCoordinates = this.calculateDieCoordinates({ + x: invertedPoint[0], + y: invertedPoint[1] + }); + const colIndex = this.wafermap + .diesTable!.getChild('colIndex')! + .toArray(); + const rowIndex = this.wafermap + .diesTable!.getChild('rowIndex')! + .toArray(); + + // will replace iterating with arquero filtering after fixing errors + for (let i = 0; i < colIndex.length; i++) { + if ( + colIndex[i] === dieCoordinates.x + && rowIndex[i] === dieCoordinates.y + ) { + this.wafermap.hoverDie = { + index: i, + x: dieCoordinates.x, + y: dieCoordinates.y + }; + return; + } + } + this.wafermap.hoverDie = undefined; + }; + + private readonly onMouseOut = (_event: MouseEvent): void => { + this.wafermap.hoverDie = undefined; + }; + + private calculateDieCoordinates( + mousePosition: PointCoordinates + ): PointCoordinates { + const originLocation = this.wafermap.originLocation; + const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft + || originLocation === WaferMapOriginLocation.topLeft + ? Math.floor + : Math.ceil; + const yRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft + || originLocation === WaferMapOriginLocation.bottomRight + ? Math.floor + : Math.ceil; + // go to x and y scale to get the x,y values of the die. + const x = xRoundFunction( + this.wafermap.dataManager.invertedHorizontalScale( + mousePosition.x - this.wafermap.dataManager.margin.left + ) + ); + const y = yRoundFunction( + this.wafermap.dataManager.invertedVerticalScale( + mousePosition.y - this.wafermap.dataManager.margin.top + ) + ); + return { x, y }; + } +} diff --git a/packages/nimble-components/src/wafer-map/modules/worker-renderer.ts b/packages/nimble-components/src/wafer-map/modules/experimental/worker-renderer.ts similarity index 95% rename from packages/nimble-components/src/wafer-map/modules/worker-renderer.ts rename to packages/nimble-components/src/wafer-map/modules/experimental/worker-renderer.ts index 24dbcc8a73..5556c7bfe2 100644 --- a/packages/nimble-components/src/wafer-map/modules/worker-renderer.ts +++ b/packages/nimble-components/src/wafer-map/modules/experimental/worker-renderer.ts @@ -1,5 +1,5 @@ -import type { WaferMap } from '..'; -import { HoverDieOpacity } from '../types'; +import type { WaferMap } from '../..'; +import { HoverDieOpacity } from '../../types'; /** * Responsible for drawing the dies inside the wafer map, adding dieText and scaling the canvas diff --git a/packages/nimble-components/src/wafer-map/modules/hover-handler.ts b/packages/nimble-components/src/wafer-map/modules/hover-handler.ts index cab13191d6..393d7ba015 100644 --- a/packages/nimble-components/src/wafer-map/modules/hover-handler.ts +++ b/packages/nimble-components/src/wafer-map/modules/hover-handler.ts @@ -6,13 +6,33 @@ import { PointCoordinates, WaferMapOriginLocation } from '../types'; */ export class HoverHandler { public constructor(private readonly wafermap: WaferMap) {} - public mousemove(event: MouseEvent): void { + + /** + * @internal + */ + public connect(): void { + this.wafermap.addEventListener('mousemove', this.onMouseMove); + this.wafermap.addEventListener('mouseout', this.onMouseOut); + } + + /** + * @internal + */ + public disconnect(): void { + this.wafermap.removeEventListener('mousemove', this.onMouseMove); + this.wafermap.removeEventListener('mouseout', this.onMouseOut); + } + + private readonly onMouseMove = (event: MouseEvent): void => { + if (this.wafermap.isExperimentalRenderer()) { + return; + } const mousePosition: PointCoordinates = { x: event.offsetX, y: event.offsetY }; - if (!this.hoversOverDie(this.wafermap, mousePosition)) { + if (!this.hoversOverDie(mousePosition)) { this.wafermap.hoverDie = undefined; return; } @@ -22,23 +42,22 @@ export class HoverHandler { mousePosition.y ]); - const dieCoordinates = this.calculateDieCoordinates(this.wafermap, { + const dieCoordinates = this.calculateDieCoordinates({ x: invertedPoint[0], y: invertedPoint[1] }); this.wafermap.hoverDie = this.wafermap.dataManager.getWaferMapDie(dieCoordinates); - } + }; - public mouseout(): void { + private readonly onMouseOut = (_event: MouseEvent): void => { this.wafermap.hoverDie = undefined; - } + }; private calculateDieCoordinates( - wafermap: WaferMap, mousePosition: PointCoordinates ): PointCoordinates { - const originLocation = wafermap.originLocation; + const originLocation = this.wafermap.originLocation; const xRoundFunction = originLocation === WaferMapOriginLocation.bottomLeft || originLocation === WaferMapOriginLocation.topLeft ? Math.floor @@ -49,23 +68,20 @@ export class HoverHandler { : Math.ceil; // go to x and y scale to get the x,y values of the die. const x = xRoundFunction( - wafermap.dataManager.invertedHorizontalScale( - mousePosition.x - wafermap.dataManager.margin.left + this.wafermap.dataManager.invertedHorizontalScale( + mousePosition.x - this.wafermap.dataManager.margin.left ) ); const y = yRoundFunction( - wafermap.dataManager.invertedVerticalScale( - mousePosition.y - wafermap.dataManager.margin.top + this.wafermap.dataManager.invertedVerticalScale( + mousePosition.y - this.wafermap.dataManager.margin.top ) ); return { x, y }; } - private hoversOverDie( - wafermap: WaferMap, - mousePosition: PointCoordinates - ): boolean { - const rgba = wafermap.canvasContext.getImageData( + private hoversOverDie(mousePosition: PointCoordinates): boolean { + const rgba = this.wafermap.canvasContext.getImageData( mousePosition.x, mousePosition.y, 1, diff --git a/packages/nimble-components/src/wafer-map/modules/prerendering.ts b/packages/nimble-components/src/wafer-map/modules/prerendering.ts index 9d4db977d0..85f464d548 100644 --- a/packages/nimble-components/src/wafer-map/modules/prerendering.ts +++ b/packages/nimble-components/src/wafer-map/modules/prerendering.ts @@ -8,7 +8,6 @@ import type { WaferMapDie } from '../types'; import type { WaferMap } from '..'; -import type { DataManager } from './data-manager'; /** * Prerendering prepares render-ready dies data to be used by the rendering module @@ -34,14 +33,11 @@ export class Prerendering { private readonly emptyDieColor = 'rgba(218,223,236,1)'; private readonly nanDieColor = 'rgba(122,122,122,1)'; - public constructor( - private readonly wafermap: WaferMap, - private readonly dataManager: Readonly - ) {} + public constructor(private readonly wafermap: WaferMap) {} public updateLabelsFontSize(): void { this._labelsFontSize = this.calculateLabelsFontSize( - this.dataManager.dieDimensions, + this.wafermap.dataManager.dieDimensions, this.wafermap.maxCharacters ); this.updateDiesRenderInfo(); @@ -61,10 +57,10 @@ export class Prerendering { } private computeDieRenderInfo(die: WaferMapDie): DieRenderInfo | null { - const margin = this.dataManager.margin; + const margin = this.wafermap.dataManager.margin; - const scaledX = this.dataManager.horizontalScale(die.x); - const scaledY = this.dataManager.verticalScale(die.y); + const scaledX = this.wafermap.dataManager.horizontalScale(die.x); + const scaledY = this.wafermap.dataManager.verticalScale(die.y); if (scaledX === undefined || scaledY === undefined) { return null; diff --git a/packages/nimble-components/src/wafer-map/modules/wafer-map-validator.ts b/packages/nimble-components/src/wafer-map/modules/wafer-map-validator.ts index 9ef38a00a0..6788f50149 100644 --- a/packages/nimble-components/src/wafer-map/modules/wafer-map-validator.ts +++ b/packages/nimble-components/src/wafer-map/modules/wafer-map-validator.ts @@ -25,10 +25,10 @@ export class WaferMapValidator { public validateGridDimensions(): boolean { this.invalidGridDimensions = false; if ( - typeof this.wafermap.gridMinX === 'undefined' - && typeof this.wafermap.gridMaxX === 'undefined' - && typeof this.wafermap.gridMinY === 'undefined' - && typeof this.wafermap.gridMaxY === 'undefined' + this.wafermap.gridMinX === undefined + && this.wafermap.gridMaxX === undefined + && this.wafermap.gridMinY === undefined + && this.wafermap.gridMaxY === undefined ) { this.invalidGridDimensions = false; } else if ( @@ -49,38 +49,20 @@ export class WaferMapValidator { if (this.wafermap.diesTable === undefined) { this.invalidDiesTableSchema = false; } else { - const colIndexField = this.wafermap.diesTable.schema.fields.findIndex( - f => f.name === 'colIndex' - ); - const rowIndexField = this.wafermap.diesTable.schema.fields.findIndex( - f => f.name === 'rowIndex' - ); - const valueField = this.wafermap.diesTable.schema.fields.findIndex( - f => f.name === 'value' - ); + const fields = this.wafermap.diesTable.schema.fields; + const colField = fields.find(field => field.name === 'colIndex'); + const rowField = fields.find(field => field.name === 'rowIndex'); + const valueField = fields.find(field => field.name === 'value'); if ( - this.wafermap.diesTable.numCols < 3 - || colIndexField === -1 - || rowIndexField === -1 - || valueField === -1 - || !DataType.isInt( - this.wafermap.diesTable.schema.fields[colIndexField]!.type - ) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - || this.wafermap.diesTable.schema.fields[colIndexField]!.type - .bitWidth !== 32 - || !DataType.isInt( - this.wafermap.diesTable.schema.fields[rowIndexField]!.type - ) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - || this.wafermap.diesTable.schema.fields[rowIndexField]!.type - .bitWidth !== 32 - || !DataType.isFloat( - this.wafermap.diesTable.schema.fields[valueField]!.type - ) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access - || this.wafermap.diesTable.schema.fields[valueField]!.type - .precision !== Precision.DOUBLE + !colField + || !rowField + || !valueField + || !DataType.isInt(colField.type) + || colField.type.bitWidth !== 32 + || !DataType.isInt(rowField.type) + || rowField.type.bitWidth !== 32 + || !DataType.isFloat(valueField.type) + || valueField.type.precision !== Precision.DOUBLE ) { this.invalidDiesTableSchema = true; } diff --git a/packages/nimble-components/src/wafer-map/modules/zoom-handler.ts b/packages/nimble-components/src/wafer-map/modules/zoom-handler.ts index 38a82d89b1..79635b403c 100644 --- a/packages/nimble-components/src/wafer-map/modules/zoom-handler.ts +++ b/packages/nimble-components/src/wafer-map/modules/zoom-handler.ts @@ -1,11 +1,5 @@ import { select } from 'd3-selection'; -import { - zoom, - ZoomBehavior, - zoomIdentity, - ZoomTransform, - zoomTransform -} from 'd3-zoom'; +import { zoom, ZoomTransform } from 'd3-zoom'; import type { WaferMap } from '..'; interface ZoomEvent { @@ -16,61 +10,44 @@ interface ZoomEvent { * ZoomHandler deals with user interactions and events like zooming */ export class ZoomHandler { - private zoomTransform: ZoomTransform = zoomIdentity; - private readonly minScale = 1.1; - private readonly minExtentPoint: [number, number] = [-100, -100]; - private readonly extentPadding = 100; - private zoomBehavior!: ZoomBehavior; + private readonly scaleExtent: [number, number] = [1, 100]; + private readonly minExtentPoint: [number, number] = [0, 0]; public constructor(private readonly wafermap: WaferMap) {} - public createZoomBehavior(): void { - this.zoomBehavior = zoom() - .scaleExtent([ - 1.1, - this.getZoomMax( - this.wafermap.canvasWidth * this.wafermap.canvasHeight, - this.wafermap.dataManager.containerDimensions.width - * this.wafermap.dataManager.containerDimensions.height - ) - ]) + /** + * @internal + */ + public connect(): void { + this.createZoomBehavior(); + this.wafermap.addEventListener('wheel', this.onWheelMove, { + passive: false + }); + } + + /** + * @internal + */ + public disconnect(): void { + zoom().on('zoom', null)(select(this.wafermap as Element)); + this.wafermap.removeEventListener('wheel', this.onWheelMove); + } + + private createZoomBehavior(): void { + zoom() + .scaleExtent(this.scaleExtent) .translateExtent([ this.minExtentPoint, - [ - this.wafermap.canvasWidth + this.extentPadding, - this.wafermap.canvasHeight + this.extentPadding - ] + [this.wafermap.canvasWidth, this.wafermap.canvasHeight] ]) - .filter((event: Event) => { - const transform = zoomTransform(this.wafermap.canvas); - const filterEval = transform.k >= this.minScale || event.type === 'wheel'; - return filterEval; - }) .on('zoom', (event: ZoomEvent) => { // D3 will automatically remove existing handlers when adding new ones // See: https://github.com/d3/d3-zoom/blob/v3.0.0/README.md#zoom_on - this.rescale(event); - }); - - this.zoomBehavior(select(this.wafermap.canvas as Element)); + this.wafermap.transform = event.transform; + })(select(this.wafermap as Element)); } - private rescale(event: ZoomEvent): void { - const transform = event.transform; - if (transform.k === this.minScale) { - this.zoomTransform = zoomIdentity; - this.zoomBehavior.transform( - select(this.wafermap.canvas as Element), - zoomIdentity - ); - } else { - this.zoomTransform = transform; - } - - this.wafermap.transform = this.zoomTransform; - } - - private getZoomMax(canvasArea: number, dataArea: number): number { - return Math.ceil((dataArea / canvasArea) * 100); - } + private readonly onWheelMove = (event: Event): void => { + event.preventDefault(); + }; } 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 deb673b81c..0f0ead89ef 100644 --- a/packages/nimble-components/src/wafer-map/tests/computations.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/computations.spec.ts @@ -1,4 +1,3 @@ -import type { WaferMap } from '..'; import { Computations } from '../modules/computations'; import { Margin, WaferMapOriginLocation } from '../types'; import { getWaferMapMockComputations, getWaferMapDies } from './utilities'; @@ -20,7 +19,7 @@ describe('Wafermap Computations module', () => { 100, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); @@ -70,7 +69,7 @@ describe('Wafermap Computations module', () => { 200, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); @@ -114,7 +113,7 @@ describe('Wafermap Computations module', () => { 100, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); @@ -136,7 +135,7 @@ describe('Wafermap Computations module', () => { 100, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); @@ -158,7 +157,7 @@ describe('Wafermap Computations module', () => { 100, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); @@ -180,7 +179,7 @@ describe('Wafermap Computations module', () => { 100, 100 ); - computationsModule = new Computations(waferMock as WaferMap); + computationsModule = new Computations(waferMock); computationsModule.updateContainerDimensions(); }); 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 fff32e67e5..77cc8efa71 100644 --- a/packages/nimble-components/src/wafer-map/tests/data-generator.ts +++ b/packages/nimble-components/src/wafer-map/tests/data-generator.ts @@ -154,6 +154,6 @@ export const generateWaferTableData = ( return tableFromArrays({ colIndex: Int32Array.from(colIndex), rowIndex: Int32Array.from(rowIndex), - value: Float32Array.from(value) + value: Float64Array.from(value) }); }; diff --git a/packages/nimble-components/src/wafer-map/tests/hover-handler.spec.ts b/packages/nimble-components/src/wafer-map/tests/hover-handler.spec.ts new file mode 100644 index 0000000000..7bee0ae2aa --- /dev/null +++ b/packages/nimble-components/src/wafer-map/tests/hover-handler.spec.ts @@ -0,0 +1,114 @@ +import { zoomIdentity } from 'd3-zoom'; +import { tableFromArrays } from 'apache-arrow'; +import { html } from '@microsoft/fast-element'; +import { parameterizeSpec } from '@ni/jasmine-parameterized'; +import { HoverHandler } from '../modules/experimental/hover-handler'; +import { WaferMapOriginLocation } from '../types'; +import { + getDataManagerMockForHover, + getScaleQuantile, + getWaferMapMockHover +} from './utilities'; +import type { WaferMap } from '..'; +import { processUpdates } from '../../testing/async-helpers'; +import { Fixture, fixture } from '../../utilities/tests/fixture'; + +async function setup(): Promise> { + return fixture(html`
`); +} + +describe('HoverHandler', () => { + let element: HTMLDivElement; + let connect: () => Promise; + let disconnect: () => Promise; + let hoverHandler: HoverHandler; + let waferMock: WaferMap; + + beforeEach(async () => { + ({ element, connect, disconnect } = await setup()); + await connect(); + waferMock = getWaferMapMockHover( + tableFromArrays({ + colIndex: Int32Array.from([1, 2, 3]), + rowIndex: Int32Array.from([1, 2, 3]), + value: Float64Array.from([1, 2, 3]) + }), + zoomIdentity, + WaferMapOriginLocation.bottomLeft, + undefined, + getDataManagerMockForHover( + { left: 0, right: 0, top: 0, bottom: 0 }, + getScaleQuantile([1, 11], [1, 2, 3, 4]), + getScaleQuantile([1, 11], [1, 2, 3, 4]) + ), + true + ); + }); + + afterEach(async () => { + await disconnect(); + }); + + const testCases = [ + { + name: WaferMapOriginLocation.bottomLeft, + expectedDie: { index: 1, x: 2, y: 2 } + }, + { + name: WaferMapOriginLocation.topLeft, + expectedDie: { index: 1, x: 2, y: 2 } + }, + { + name: WaferMapOriginLocation.bottomRight, + expectedDie: { index: 1, x: 2, y: 2 } + }, + { + name: WaferMapOriginLocation.topRight, + expectedDie: { index: 1, x: 2, y: 2 } + } + ] as const; + + parameterizeSpec(testCases, (spec, name, value) => { + spec( + `will return the expected index when mouse moved in range from ${name}`, + () => { + waferMock.originLocation = value.name; + hoverHandler = new HoverHandler(waferMock); + element.addEventListener('mousemove', event => hoverHandler.onMouseMove(event)); + element.dispatchEvent( + new MouseEvent('mousemove', { + clientX: 4, + clientY: 4 + }) + ); + processUpdates(); + expect(waferMock.hoverDie).toEqual(value.expectedDie); + } + ); + }); + + const undefinedTestCases = [ + { name: WaferMapOriginLocation.bottomLeft, expectedDie: undefined }, + { name: WaferMapOriginLocation.topLeft, expectedDie: undefined }, + { name: WaferMapOriginLocation.bottomRight, expectedDie: undefined }, + { name: WaferMapOriginLocation.topRight, expectedDie: undefined } + ] as const; + parameterizeSpec(undefinedTestCases, (spec, name, value) => { + spec( + `will return undefined when mouse moved out of range from ${name}`, + () => { + waferMock.originLocation = value.name; + hoverHandler = new HoverHandler(waferMock); + element.addEventListener('mousemove', event => hoverHandler.onMouseMove(event)); + element.dispatchEvent( + new MouseEvent('mousemove', { + clientX: 15, + clientY: 15 + }) + ); + processUpdates(); + expect(waferMock.hoverDie).toEqual(value.expectedDie); + } + ); + }); +}); 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 5cfb169a65..2b93f87e82 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 @@ -1,5 +1,3 @@ -import type { WaferMap } from '..'; -import type { DataManager } from '../modules/data-manager'; import { Prerendering } from '../modules/prerendering'; import { WaferMapColorScaleMode } from '../types'; import { @@ -28,6 +26,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: ['red'], values: ['1'] }, @@ -35,18 +39,10 @@ describe('Wafermap Prerendering module', () => { colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -70,6 +66,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { @@ -80,18 +82,10 @@ describe('Wafermap Prerendering module', () => { colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -115,6 +109,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { @@ -125,18 +125,10 @@ describe('Wafermap Prerendering module', () => { colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -167,6 +159,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: ['red'], values: ['1'] }, @@ -174,18 +172,10 @@ describe('Wafermap Prerendering module', () => { colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -209,6 +199,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { @@ -219,18 +215,10 @@ describe('Wafermap Prerendering module', () => { colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -260,6 +248,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + getScaleBand([0, 1], [0, 100]), + getScaleBand([0, 1], [0, 100]) + ); const waferMock = getWaferMapMockPrerendering( [ { @@ -273,18 +267,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - getScaleBand([0, 1], [0, 100]), - getScaleBand([0, 1], [0, 100]) - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -308,6 +294,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + getScaleBand([0, 1], [0, 100]), + getScaleBand([0, 1], [0, 100]) + ); const waferMock = getWaferMapMockPrerendering( [ { @@ -321,18 +313,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - getScaleBand([0, 1], [0, 100]), - getScaleBand([0, 1], [0, 100]) - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -356,6 +340,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: ['red'], values: [] }, @@ -363,18 +353,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.ordinal, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -405,6 +387,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: ['red'], values: [] }, @@ -412,18 +400,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.ordinal, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); 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 60c98db5b8..fb3d5ffdf7 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 @@ -1,5 +1,3 @@ -import type { WaferMap } from '..'; -import type { DataManager } from '../modules/data-manager'; import { Prerendering } from '../modules/prerendering'; import { WaferMapColorScaleMode } from '../types'; import { @@ -24,6 +22,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -31,18 +35,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -68,6 +64,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -75,18 +77,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -106,6 +100,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -113,18 +113,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -148,6 +140,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -155,18 +153,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -191,6 +181,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -198,18 +194,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -236,6 +224,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDiesAsNaN(), { colors: [], values: [] }, @@ -243,18 +237,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -281,6 +267,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDiesAsFloats(), { colors: [], values: [] }, @@ -288,18 +280,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -330,6 +314,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 0, right: 0, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -337,18 +327,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); 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 a54606c526..8b65558c50 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 @@ -1,5 +1,3 @@ -import type { WaferMap } from '..'; -import type { DataManager } from '../modules/data-manager'; import { Prerendering } from '../modules/prerendering'; import { WaferMapColorScaleMode } from '../types'; import { @@ -23,6 +21,12 @@ describe('Wafermap Prerendering module', () => { const margin = { top: 20, right: 10, bottom: 0, left: 0 }; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -30,18 +34,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -83,6 +79,12 @@ describe('Wafermap Prerendering module', () => { const highlightedTags: string[] = []; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + horizontalScale, + defaultVerticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -90,18 +92,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - horizontalScale, - defaultVerticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); @@ -132,6 +126,12 @@ describe('Wafermap Prerendering module', () => { const highlightedTags: string[] = []; beforeEach(() => { + const dataManagerMock = getDataManagerMock( + dieDimensions, + margin, + defaultHorizontalScale, + verticalScale + ); const waferMock = getWaferMapMockPrerendering( getWaferMapDies(), { colors: [], values: [] }, @@ -139,18 +139,10 @@ describe('Wafermap Prerendering module', () => { WaferMapColorScaleMode.linear, dieLabelsHidden, dieLabelsSuffix, - maxCharacters - ); - const dataManagerMock = getDataManagerMock( - dieDimensions, - margin, - defaultHorizontalScale, - verticalScale - ); - prerenderingModule = new Prerendering( - waferMock as WaferMap, - dataManagerMock as DataManager + maxCharacters, + dataManagerMock ); + prerenderingModule = new Prerendering(waferMock); prerenderingModule.updateLabelsFontSize(); }); diff --git a/packages/nimble-components/src/wafer-map/tests/sets.ts b/packages/nimble-components/src/wafer-map/tests/sets.ts index 3b26320e4c..80089b35ee 100644 --- a/packages/nimble-components/src/wafer-map/tests/sets.ts +++ b/packages/nimble-components/src/wafer-map/tests/sets.ts @@ -105,7 +105,7 @@ export const wafermapDiesTableSets: Table[] = [ tableFromArrays({ colIndex: Int32Array.from([0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4]), rowIndex: Int32Array.from([2, 2, 1, 3, 2, 1, 0, 3, 4, 2, 1, 3, 2]), - value: Float32Array.from([ + value: Float64Array.from([ 14.24, 76.43, 44.63, 67.93, 72.71, 79.04, 26.49, 37.79, 59.82, 52.9, 98.5, 20.83, 62.8 ]), diff --git a/packages/nimble-components/src/wafer-map/tests/utilities.ts b/packages/nimble-components/src/wafer-map/tests/utilities.ts index f654e3b9bf..f30aa122dc 100644 --- a/packages/nimble-components/src/wafer-map/tests/utilities.ts +++ b/packages/nimble-components/src/wafer-map/tests/utilities.ts @@ -1,7 +1,9 @@ -import { ScaleBand, scaleBand } from 'd3-scale'; +import { ScaleBand, ScaleQuantile, scaleBand, scaleQuantile } from 'd3-scale'; import type { Table } from 'apache-arrow'; +import type { ZoomTransform } from 'd3-zoom'; import { Dimensions, + HoverDie, Margin, WaferMapColorScale, WaferMapColorScaleMode, @@ -64,6 +66,12 @@ export function getScaleBand( return scaleBand().domain(domain).range(range); } +export function getScaleQuantile( + domain: number[] = [], + range: number[] = [] +): ScaleQuantile { + return scaleQuantile().domain(domain).range(range); +} export const defaultHorizontalScale = scaleBand() .domain([2, 3, 4, 5, 6]) .range([2, 7]); @@ -77,16 +85,39 @@ export function getDataManagerMock( margin: Margin, horizontalScale: ScaleBand = getScaleBand([], []), verticalScale: ScaleBand = getScaleBand([], []) -): Pick< +): DataManager { + const dataManagerMock: Pick< DataManager, 'horizontalScale' | 'verticalScale' | 'dieDimensions' | 'margin' - > { - return { + > = { horizontalScale, verticalScale, dieDimensions, margin }; + return dataManagerMock as DataManager; +} + +export function getDataManagerMockForHover( + margin: Margin, + invertedHorizontalScale: ScaleQuantile = getScaleQuantile( + [], + [] + ), + invertedVerticalScale: ScaleQuantile = getScaleQuantile( + [], + [] + ) +): DataManager { + const dataManagerMock: Pick< + DataManager, + 'invertedHorizontalScale' | 'invertedVerticalScale' | 'margin' + > = { + invertedHorizontalScale, + invertedVerticalScale, + margin + }; + return dataManagerMock as DataManager; } export function getWaferMapMockPrerendering( @@ -96,8 +127,10 @@ export function getWaferMapMockPrerendering( colorScaleMode: WaferMapColorScaleMode = WaferMapColorScaleMode.linear, dieLabelsHidden = true, dieLabelsSuffix = '', - maxCharacters = 4 -): Pick< + maxCharacters = 4, + dataManager = {} as DataManager +): WaferMap { + const waferMapMock: Pick< WaferMap, | 'dies' | 'colorScale' @@ -106,18 +139,46 @@ export function getWaferMapMockPrerendering( | 'dieLabelsHidden' | 'dieLabelsSuffix' | 'maxCharacters' - > { - return { + | 'dataManager' + > = { dies, colorScale, highlightedTags, colorScaleMode, dieLabelsHidden, dieLabelsSuffix, - maxCharacters + maxCharacters, + dataManager }; + return waferMapMock as WaferMap; } +export function getWaferMapMockHover( + diesTable: Table, + transform: ZoomTransform, + originLocation: WaferMapOriginLocation, + hoverDie: HoverDie | undefined, + dataManager: DataManager, + isExperimentalRenderer: boolean +): WaferMap { + const waferMapMock: Pick< + WaferMap, + | 'diesTable' + | 'transform' + | 'originLocation' + | 'hoverDie' + | 'dataManager' + | 'isExperimentalRenderer' + > = { + diesTable, + transform, + originLocation, + hoverDie, + dataManager, + isExperimentalRenderer: () => isExperimentalRenderer + }; + return waferMapMock as WaferMap; +} export function getWaferMapMockComputations( dies: WaferMapDie[] = getWaferMapDies(), originLocation: WaferMapOriginLocation, @@ -127,17 +188,18 @@ export function getWaferMapMockComputations( invalidGridDimensions: false, invalidDiesTableSchema: false } -): Pick< +): WaferMap { + const waferMapMock: Pick< WaferMap, 'dies' | 'originLocation' | 'canvasWidth' | 'canvasHeight' | 'validity' - > { - return { + > = { dies, originLocation, canvasWidth, canvasHeight, validity }; + return waferMapMock as WaferMap; } export function getWaferMapMockValidator( @@ -146,15 +208,16 @@ export function getWaferMapMockValidator( gridMinY: number | undefined, gridMaxY: number | undefined, diesTable: Table | undefined = undefined -): Pick< +): WaferMap { + const waferMapMock: Pick< WaferMap, 'gridMinX' | 'gridMaxX' | 'gridMinY' | 'gridMaxY' | 'diesTable' - > { - return { + > = { gridMinX, gridMaxX, gridMinY, gridMaxY, diesTable }; + return waferMapMock as WaferMap; } diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map-validator.spec.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map-validator.spec.ts index 732833fa9a..659fbee23c 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map-validator.spec.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map-validator.spec.ts @@ -1,5 +1,4 @@ import { Table, tableFromArrays } from 'apache-arrow'; -import type { WaferMap } from '..'; import { WaferMapValidator } from '../modules/wafer-map-validator'; import { getWaferMapMockValidator } from './utilities'; @@ -13,7 +12,7 @@ describe('Wafermap Validator module', () => { undefined, undefined ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.isValid()).toBeTrue(); @@ -21,7 +20,7 @@ describe('Wafermap Validator module', () => { it('with equal grid dimensions should be valid', () => { const waferMock = getWaferMapMockValidator(0, 0, 0, 0); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.isValid()).toBeTrue(); @@ -29,7 +28,7 @@ describe('Wafermap Validator module', () => { it('with positive grid dimensions should be valid', () => { const waferMock = getWaferMapMockValidator(1, 2, 1, 2); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.isValid()).toBeTrue(); @@ -37,7 +36,7 @@ describe('Wafermap Validator module', () => { it('with negative grid dimensions should be valid', () => { const waferMock = getWaferMapMockValidator(-2, -1, -2, -1); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.isValid()).toBeTrue(); @@ -45,7 +44,7 @@ describe('Wafermap Validator module', () => { it('with one undefined grid dimension should not be valid', () => { const waferMock = getWaferMapMockValidator(0, 0, 0, undefined); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.isValid()).toBeFalse(); @@ -53,7 +52,7 @@ describe('Wafermap Validator module', () => { it('with impossible grid dimension should not be valid', () => { const waferMock = getWaferMapMockValidator(1, -1, 1, -1); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateGridDimensions(); expect(waferMapValidator.getValidity()).toEqual({ @@ -71,7 +70,7 @@ describe('Wafermap Validator module', () => { undefined, undefined ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeTrue(); }); @@ -88,7 +87,7 @@ describe('Wafermap Validator module', () => { value: Float64Array.from([]) }) ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeTrue(); @@ -106,7 +105,7 @@ describe('Wafermap Validator module', () => { value: Float32Array.from([]) }) ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeFalse(); @@ -124,7 +123,7 @@ describe('Wafermap Validator module', () => { value: Float64Array.from([]) }) ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeFalse(); @@ -142,7 +141,7 @@ describe('Wafermap Validator module', () => { value: Int32Array.from([]) }) ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeFalse(); @@ -156,7 +155,7 @@ describe('Wafermap Validator module', () => { undefined, new Table() ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeFalse(); @@ -172,7 +171,7 @@ describe('Wafermap Validator module', () => { rowIndex: Int32Array.from([]) }) ); - waferMapValidator = new WaferMapValidator(waferMock as WaferMap); + waferMapValidator = new WaferMapValidator(waferMock); waferMapValidator.validateDiesTableSchema(); expect(waferMapValidator.isValid()).toBeFalse(); 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 f811df6fce..e443b632ee 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 @@ -9,7 +9,7 @@ import { WaferMapOriginLocation } from '../types'; import { RenderingModule } from '../modules/rendering'; -import { WorkerRenderer } from '../modules/worker-renderer'; +import { WorkerRenderer } from '../modules/experimental/worker-renderer'; async function setup(): Promise> { return fixture(html``); @@ -88,24 +88,12 @@ describe('WaferMap', () => { expect(spy).toHaveBeenCalledTimes(1); }); - it('will use RenderingModule after dies change', () => { - element.dies = [{ x: 1, y: 1, value: '1' }]; - processUpdates(); - expect(element.renderer instanceof RenderingModule).toBeTrue(); - }); - it('will update once after diesTable change', () => { element.diesTable = new Table(); processUpdates(); expect(spy).toHaveBeenCalledTimes(1); }); - it('will use WorkerRenderer after diesTable change', () => { - element.diesTable = new Table(); - processUpdates(); - expect(element.renderer instanceof WorkerRenderer).toBeTrue(); - }); - it('will update once after colorScale changes', () => { element.colorScale = { colors: ['red', 'red'], values: ['1', '1'] }; processUpdates(); @@ -158,6 +146,28 @@ describe('WaferMap', () => { renderHoverSpy = spyOn(element.workerRenderer, 'renderHover'); }); + it('will use RenderingModule after dies change', () => { + element.dies = [{ x: 1, y: 1, value: '1' }]; + processUpdates(); + expect(element.renderer instanceof RenderingModule).toBeTrue(); + }); + + it('will use WorkerRenderer after supported diesTable change', () => { + element.diesTable = tableFromArrays({ + colIndex: Int32Array.from([]), + rowIndex: Int32Array.from([]), + value: Float64Array.from([]) + }); + processUpdates(); + expect(element.renderer instanceof WorkerRenderer).toBeTrue(); + }); + + it('will use RenderingModule after unsupported diesTable change', () => { + element.diesTable = new Table(); + processUpdates(); + expect(element.renderer instanceof RenderingModule).toBeTrue(); + }); + it('will call renderHover after supported diesTable change', () => { element.diesTable = tableFromArrays({ colIndex: Int32Array.from([]), @@ -191,7 +201,7 @@ describe('WaferMap', () => { }); it('will zoom in the wafer-map', () => { - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: -2, deltaMode: -1 }) ); processUpdates(); @@ -200,7 +210,7 @@ describe('WaferMap', () => { }); it('will zoom out to identity', () => { - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: -2, deltaMode: -1 }) ); @@ -208,7 +218,7 @@ describe('WaferMap', () => { const zoomedValue = getTransform(); expect(zoomedValue).not.toEqual(initialValue); - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: 2, deltaMode: -1 }) ); @@ -218,7 +228,7 @@ describe('WaferMap', () => { }); it('will not zoom out when at identity', () => { - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: 2, deltaMode: -1 }) ); processUpdates(); @@ -258,7 +268,7 @@ describe('WaferMap', () => { expect(initialHeight).toBe(460); expect(initialWidth).toBe(460); - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: -2, deltaMode: -1 }) ); processUpdates(); @@ -277,7 +287,7 @@ describe('WaferMap', () => { processUpdates(); const initialTransform = element.hoverTransform; expect(initialTransform).not.toEqual(''); - element.canvas.dispatchEvent( + element.dispatchEvent( new WheelEvent('wheel', { deltaY: -2, deltaMode: -1 }) ); processUpdates(); diff --git a/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts b/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts index 2cd7f02974..c0b82ce309 100644 --- a/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts +++ b/packages/nimble-components/src/wafer-map/tests/wafer-map.stories.ts @@ -81,7 +81,7 @@ const getDiesSet = ( )!; break; default: - returnedValue = [] as WaferMapDie[]; + returnedValue = []; } return returnedValue; }; @@ -133,7 +133,7 @@ const getHighlightedTags = (setName: string, sets: string[][]): string[] => { returnedValue = sets[3]!; break; default: - returnedValue = [] as string[]; + returnedValue = []; break; } return returnedValue; diff --git a/packages/nimble-components/src/wafer-map/types.ts b/packages/nimble-components/src/wafer-map/types.ts index cac887b0a0..7193593c4f 100644 --- a/packages/nimble-components/src/wafer-map/types.ts +++ b/packages/nimble-components/src/wafer-map/types.ts @@ -1,3 +1,5 @@ +import type { Float64, Int32 } from 'apache-arrow'; + export const WaferMapOriginLocation = { bottomLeft: 'bottom-left', bottomRight: 'bottom-right', @@ -43,6 +45,12 @@ export interface WaferMapDie { tags?: string[]; } +export interface HoverDie { + index: number; + x: number; + y: number; +} + export interface WaferMapColorScale { colors: string[]; values: string[]; @@ -79,3 +87,16 @@ export interface WaferMapValidity extends ValidityObject { readonly invalidGridDimensions: boolean; readonly invalidDiesTableSchema: boolean; } + +// Apache arrow probably should not be using a Record and index types on TypeMap +// because in strict checking they end up required. +// See: https://github.com/apache/arrow/issues/12663#issuecomment-1088244575 +// We can work around that issue by using a type alias instead of an interface +// Where index signatures are looser. +// See: https://github.com/microsoft/TypeScript/issues/15300#issuecomment-1317901527 +// eslint-disable-next-line @typescript-eslint/consistent-type-definitions +export type WaferRequiredFields = { + colIndex: Int32, + rowIndex: Int32, + value: Float64 +}; From 7bfc34b3aea5927b5658fa9a2f877c06e4e35d70 Mon Sep 17 00:00:00 2001 From: rajsite Date: Mon, 25 Mar 2024 17:03:11 +0000 Subject: [PATCH 11/11] applying package updates [skip ci] --- .../projects/ni/nimble-angular/CHANGELOG.json | 15 +++++++++++++++ .../projects/ni/nimble-angular/CHANGELOG.md | 10 +++++++++- .../projects/ni/nimble-angular/package.json | 4 ++-- ...ents-163379f4-09c6-4606-95f4-05917dd50ee0.json | 7 ------- package-lock.json | 8 ++++---- packages/nimble-blazor/package.json | 2 +- packages/nimble-components/CHANGELOG.json | 15 +++++++++++++++ packages/nimble-components/CHANGELOG.md | 10 +++++++++- packages/nimble-components/package.json | 2 +- 9 files changed, 56 insertions(+), 17 deletions(-) delete mode 100644 change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json index c95bf7331b..43e44a26b9 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-angular", "entries": [ + { + "date": "Mon, 25 Mar 2024 17:03:11 GMT", + "version": "20.5.3", + "tag": "@ni/nimble-angular_v20.5.3", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@ni/nimble-angular", + "comment": "Bump @ni/nimble-components to v23.0.1", + "commit": "not available" + } + ] + } + }, { "date": "Thu, 21 Mar 2024 17:13:38 GMT", "version": "20.5.2", diff --git a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md index 3a4d8e308d..9f66bd06eb 100644 --- a/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md +++ b/angular-workspace/projects/ni/nimble-angular/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-angular -This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified. +This log was last generated on Mon, 25 Mar 2024 17:03:11 GMT and should not be manually modified. +## 20.5.3 + +Mon, 25 Mar 2024 17:03:11 GMT + +### Patches + +- Bump @ni/nimble-components to v23.0.1 + ## 20.5.2 Thu, 21 Mar 2024 17:13:38 GMT diff --git a/angular-workspace/projects/ni/nimble-angular/package.json b/angular-workspace/projects/ni/nimble-angular/package.json index b6db60197e..d98a826070 100644 --- a/angular-workspace/projects/ni/nimble-angular/package.json +++ b/angular-workspace/projects/ni/nimble-angular/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-angular", - "version": "20.5.2", + "version": "20.5.3", "description": "Angular components for the NI Nimble Design System", "scripts": { "invoke-publish": "cd ../../../ && npm run build:library && cd dist/ni/nimble-angular && npm publish" @@ -31,7 +31,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^23.0.0" + "@ni/nimble-components": "^23.0.1" }, "dependencies": { "tslib": "^2.2.0" diff --git a/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json b/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json deleted file mode 100644 index 7456d8a059..0000000000 --- a/change/@ni-nimble-components-163379f4-09c6-4606-95f4-05917dd50ee0.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "Created new hover event for the new diesTable api and changed the zoom event", - "packageName": "@ni/nimble-components", - "email": "33986780+munteannatan@users.noreply.github.com", - "dependentChangeType": "patch" -} diff --git a/package-lock.json b/package-lock.json index 46b53e8b5b..3767bc84bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -74,7 +74,7 @@ }, "angular-workspace/projects/ni/nimble-angular": { "name": "@ni/nimble-angular", - "version": "20.5.2", + "version": "20.5.3", "license": "MIT", "dependencies": { "tslib": "^2.2.0" @@ -85,7 +85,7 @@ "@angular/forms": "^15.2.10", "@angular/localize": "^15.2.10", "@angular/router": "^15.2.10", - "@ni/nimble-components": "^23.0.0" + "@ni/nimble-components": "^23.0.1" } }, "node_modules/@11ty/dependency-tree": { @@ -33940,7 +33940,7 @@ }, "packages/nimble-blazor": { "name": "@ni/nimble-blazor", - "version": "14.5.2", + "version": "14.5.3", "hasInstallScript": true, "license": "MIT", "devDependencies": { @@ -33976,7 +33976,7 @@ }, "packages/nimble-components": { "name": "@ni/nimble-components", - "version": "23.0.0", + "version": "23.0.1", "license": "MIT", "dependencies": { "@microsoft/fast-colors": "^5.3.1", diff --git a/packages/nimble-blazor/package.json b/packages/nimble-blazor/package.json index 85d6a32cc7..fc97e5c96e 100644 --- a/packages/nimble-blazor/package.json +++ b/packages/nimble-blazor/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-blazor", - "version": "14.5.2", + "version": "14.5.3", "description": "Blazor components for the NI Nimble Design System", "scripts": { "postinstall": "node build/generate-playwright-version-properties/source/index.js", diff --git a/packages/nimble-components/CHANGELOG.json b/packages/nimble-components/CHANGELOG.json index 13aaa57ee5..f72608c8e3 100644 --- a/packages/nimble-components/CHANGELOG.json +++ b/packages/nimble-components/CHANGELOG.json @@ -1,6 +1,21 @@ { "name": "@ni/nimble-components", "entries": [ + { + "date": "Mon, 25 Mar 2024 17:03:11 GMT", + "version": "23.0.1", + "tag": "@ni/nimble-components_v23.0.1", + "comments": { + "patch": [ + { + "author": "33986780+munteannatan@users.noreply.github.com", + "package": "@ni/nimble-components", + "commit": "f56b73b45161a55b967dc03bbdd094a6527c814c", + "comment": "Created new hover event for the new diesTable api and changed the zoom event" + } + ] + } + }, { "date": "Fri, 22 Mar 2024 16:18:25 GMT", "version": "23.0.0", diff --git a/packages/nimble-components/CHANGELOG.md b/packages/nimble-components/CHANGELOG.md index a3208751fb..4b8e71ac3a 100644 --- a/packages/nimble-components/CHANGELOG.md +++ b/packages/nimble-components/CHANGELOG.md @@ -1,9 +1,17 @@ # Change Log - @ni/nimble-components -This log was last generated on Thu, 21 Mar 2024 17:13:38 GMT and should not be manually modified. +This log was last generated on Mon, 25 Mar 2024 17:03:11 GMT and should not be manually modified. +## 23.0.1 + +Mon, 25 Mar 2024 17:03:11 GMT + +### Patches + +- Created new hover event for the new diesTable api and changed the zoom event ([ni/nimble@f56b73b](https://github.com/ni/nimble/commit/f56b73b45161a55b967dc03bbdd094a6527c814c)) + ## 23.0.0 Thu, 21 Mar 2024 17:13:38 GMT diff --git a/packages/nimble-components/package.json b/packages/nimble-components/package.json index b2052a19b5..171e0ee8b9 100644 --- a/packages/nimble-components/package.json +++ b/packages/nimble-components/package.json @@ -1,6 +1,6 @@ { "name": "@ni/nimble-components", - "version": "23.0.0", + "version": "23.0.1", "description": "Styled web components for the NI Nimble Design System", "scripts": { "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",