From 0b1323f69c6bd36f80d391949123b8e470fb683e Mon Sep 17 00:00:00 2001 From: shanteaustin Date: Tue, 10 Sep 2024 17:04:31 -0400 Subject: [PATCH 1/6] fix(ControlRow): allow items to be added if contentItems is empty (#531) * fix for content Items not showing if contnent is added after contentRows * lint fix error * removed bug test function" --- .../ui-components/src/components/ControlRow/ControlRow.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/@lightningjs/ui-components/src/components/ControlRow/ControlRow.js b/packages/@lightningjs/ui-components/src/components/ControlRow/ControlRow.js index 40b5e9237..e81be5b08 100644 --- a/packages/@lightningjs/ui-components/src/components/ControlRow/ControlRow.js +++ b/packages/@lightningjs/ui-components/src/components/ControlRow/ControlRow.js @@ -122,7 +122,7 @@ export default class ControlRow extends TitleRow { _appendItemsAt(items, appendIndex, removeSpacingIndex) { const itemsCopy = [...items]; - if (removeSpacingIndex != undefined) { + if (removeSpacingIndex != undefined && removeSpacingIndex >= 0) { this.items[removeSpacingIndex].extraItemSpacing = undefined; itemsCopy[itemsCopy.length - 1].extraItemSpacing = this.extraItemSpacing == undefined @@ -133,6 +133,7 @@ export default class ControlRow extends TitleRow { } addContentItems(items) { + const lastSelected = this.selectedIndex; const itemsToAdd = this._createContentItems(items); const addIndex = this._lastItemIndex + 1; this._appendItemsAt(itemsToAdd, addIndex, this._lastItemIndex); @@ -142,6 +143,9 @@ export default class ControlRow extends TitleRow { this._contentItems = [...this.contentItems, ...itemsToAdd]; } + this._updateContent(); + this.selectedIndex = lastSelected; + this.patch({ stopLazyScrollIndex: this.leftControls.length + this.items.length - 1 }); From 079226752e47f5b7baba663e382e2737015bc1cb Mon Sep 17 00:00:00 2001 From: shanteaustin Date: Thu, 12 Sep 2024 16:57:33 -0400 Subject: [PATCH 2/6] fix(metadataCardContent): Provider covers text after decrementing value (#532) * added a denounce and changed when detail text is shown * fixed failing test * removed debounce * removed unused import * updated the location of the function to be updated --- .../src/components/MetadataCardContent/MetadataCardContent.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js index 08ec03ee9..35b2500a0 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js @@ -219,6 +219,7 @@ export default class MetadataCardContent extends MetadataBase { _resolveProvider() { this._providerPromiseResolver && this._providerPromiseResolver(); this._updatePositions(); + this._updateDetails(); } _updatePositions() { From a723e689c60c9e46591bd841981b62e618a753bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Sep 2024 21:52:28 -0400 Subject: [PATCH 3/6] chore(deps): bump webpack from 5.89.0 to 5.94.0 (#528) Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.94.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v5.89.0...v5.94.0) --- updated-dependencies: - dependency-name: webpack dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 296 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 202 insertions(+), 94 deletions(-) diff --git a/yarn.lock b/yarn.lock index aa9056f1a..4ecb35cca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3327,6 +3327,16 @@ __metadata: languageName: node linkType: hard +"@jridgewell/trace-mapping@npm:^0.3.20": + version: 0.3.25 + resolution: "@jridgewell/trace-mapping@npm:0.3.25" + dependencies: + "@jridgewell/resolve-uri": ^3.1.0 + "@jridgewell/sourcemap-codec": ^1.4.14 + checksum: 9d3c40d225e139987b50c48988f8717a54a8c994d8a948ee42e1412e08988761d0754d7d10b803061cc3aebf35f92a5dbbab493bd0e1a9ef9e89a2130e83ba34 + languageName: node + linkType: hard + "@juggle/resize-observer@npm:^3.3.1": version: 3.4.0 resolution: "@juggle/resize-observer@npm:3.4.0" @@ -5951,26 +5961,6 @@ __metadata: languageName: node linkType: hard -"@types/eslint-scope@npm:^3.7.3": - version: 3.7.7 - resolution: "@types/eslint-scope@npm:3.7.7" - dependencies: - "@types/eslint": "*" - "@types/estree": "*" - checksum: e2889a124aaab0b89af1bab5959847c5bec09809209255de0e63b9f54c629a94781daa04adb66bffcdd742f5e25a17614fb933965093c0eea64aacda4309380e - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 8.44.7 - resolution: "@types/eslint@npm:8.44.7" - dependencies: - "@types/estree": "*" - "@types/json-schema": "*" - checksum: 72a52f74477fbe7cc95ad290b491f51f0bc547cb7ea3672c68da3ffd3fb21ba86145bc36823a37d0a186caedeaee15b2d2a6b4c02c6c55819ff746053bd28310 - languageName: node - linkType: hard - "@types/estree-jsx@npm:^1.0.0": version: 1.0.3 resolution: "@types/estree-jsx@npm:1.0.3" @@ -5980,7 +5970,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^1.0.0": +"@types/estree@npm:*, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" checksum: dd8b5bed28e6213b7acd0fb665a84e693554d850b0df423ac8076cc3ad5823a6bc26b0251d080bdc545af83179ede51dd3f6fa78cad2c46ed1f29624ddf3e41a @@ -6100,7 +6090,7 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.7, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": +"@types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.7, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": version: 7.0.15 resolution: "@types/json-schema@npm:7.0.15" checksum: 97ed0cb44d4070aecea772b7b2e2ed971e10c81ec87dd4ecc160322ffa55ff330dace1793489540e3e318d90942064bb697cc0f8989391797792d919737b3b98 @@ -6576,13 +6566,13 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/ast@npm:1.11.6, @webassemblyjs/ast@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/ast@npm:1.11.6" +"@webassemblyjs/ast@npm:1.12.1, @webassemblyjs/ast@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/ast@npm:1.12.1" dependencies: "@webassemblyjs/helper-numbers": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - checksum: 38ef1b526ca47c210f30975b06df2faf1a8170b1636ce239fc5738fc231ce28389dd61ecedd1bacfc03cbe95b16d1af848c805652080cb60982836eb4ed2c6cf + checksum: 31bcc64147236bd7b1b6d29d1f419c1f5845c785e1e42dc9e3f8ca2e05a029e9393a271b84f3a5bff2a32d35f51ff59e2181a6e5f953fe88576acd6750506202 languageName: node linkType: hard @@ -6600,10 +6590,10 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-buffer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-buffer@npm:1.11.6" - checksum: b14d0573bf680d22b2522e8a341ec451fddd645d1f9c6bd9012ccb7e587a2973b86ab7b89fe91e1c79939ba96095f503af04369a3b356c8023c13a5893221644 +"@webassemblyjs/helper-buffer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-buffer@npm:1.12.1" + checksum: c3ffb723024130308db608e86e2bdccd4868bbb62dffb0a9a1530606496f79c87f8565bd8e02805ce64912b71f1a70ee5fb00307258b0c082c3abf961d097eca languageName: node linkType: hard @@ -6625,15 +6615,15 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/helper-wasm-section@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.11.6" +"@webassemblyjs/helper-wasm-section@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/helper-wasm-section@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - checksum: b2cf751bf4552b5b9999d27bbb7692d0aca75260140195cb58ea6374d7b9c2dc69b61e10b211a0e773f66209c3ddd612137ed66097e3684d7816f854997682e9 + "@webassemblyjs/wasm-gen": 1.12.1 + checksum: c19810cdd2c90ff574139b6d8c0dda254d42d168a9e5b3d353d1bc085f1d7164ccd1b3c05592a45a939c47f7e403dc8d03572bb686642f06a3d02932f6f0bc8f languageName: node linkType: hard @@ -6662,68 +6652,68 @@ __metadata: languageName: node linkType: hard -"@webassemblyjs/wasm-edit@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-edit@npm:1.11.6" +"@webassemblyjs/wasm-edit@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-edit@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 - "@webassemblyjs/helper-wasm-section": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-opt": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - "@webassemblyjs/wast-printer": 1.11.6 - checksum: 29ce75870496d6fad864d815ebb072395a8a3a04dc9c3f4e1ffdc63fc5fa58b1f34304a1117296d8240054cfdbc38aca88e71fb51483cf29ffab0a61ef27b481 + "@webassemblyjs/helper-wasm-section": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-opt": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + "@webassemblyjs/wast-printer": 1.12.1 + checksum: ae23642303f030af888d30c4ef37b08dfec7eab6851a9575a616e65d1219f880d9223913a39056dd654e49049d76e97555b285d1f7e56935047abf578cce0692 languageName: node linkType: hard -"@webassemblyjs/wasm-gen@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-gen@npm:1.11.6" +"@webassemblyjs/wasm-gen@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-gen@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: a645a2eecbea24833c3260a249704a7f554ef4a94c6000984728e94bb2bc9140a68dfd6fd21d5e0bbb09f6dfc98e083a45760a83ae0417b41a0196ff6d45a23a + checksum: 5787626bb7f0b033044471ddd00ce0c9fe1ee4584e8b73e232051e3a4c99ba1a102700d75337151c8b6055bae77eefa4548960c610a5e4a504e356bd872138ff languageName: node linkType: hard -"@webassemblyjs/wasm-opt@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-opt@npm:1.11.6" +"@webassemblyjs/wasm-opt@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-opt@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 - "@webassemblyjs/helper-buffer": 1.11.6 - "@webassemblyjs/wasm-gen": 1.11.6 - "@webassemblyjs/wasm-parser": 1.11.6 - checksum: b4557f195487f8e97336ddf79f7bef40d788239169aac707f6eaa2fa5fe243557c2d74e550a8e57f2788e70c7ae4e7d32f7be16101afe183d597b747a3bdd528 + "@webassemblyjs/ast": 1.12.1 + "@webassemblyjs/helper-buffer": 1.12.1 + "@webassemblyjs/wasm-gen": 1.12.1 + "@webassemblyjs/wasm-parser": 1.12.1 + checksum: 0e8fa8a0645304a1e18ff40d3db5a2e9233ebaa169b19fcc651d6fc9fe2cac0ce092ddee927318015ae735d9cd9c5d97c0cafb6a51dcd2932ac73587b62df991 languageName: node linkType: hard -"@webassemblyjs/wasm-parser@npm:1.11.6, @webassemblyjs/wasm-parser@npm:^1.11.5": - version: 1.11.6 - resolution: "@webassemblyjs/wasm-parser@npm:1.11.6" +"@webassemblyjs/wasm-parser@npm:1.12.1, @webassemblyjs/wasm-parser@npm:^1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wasm-parser@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@webassemblyjs/helper-api-error": 1.11.6 "@webassemblyjs/helper-wasm-bytecode": 1.11.6 "@webassemblyjs/ieee754": 1.11.6 "@webassemblyjs/leb128": 1.11.6 "@webassemblyjs/utf8": 1.11.6 - checksum: 8200a8d77c15621724a23fdabe58d5571415cda98a7058f542e670ea965dd75499f5e34a48675184947c66f3df23adf55df060312e6d72d57908e3f049620d8a + checksum: 176015de3551ac068cd4505d837414f258d9ade7442bd71efb1232fa26c9f6d7d4e11a5c816caeed389943f409af7ebff6899289a992d7a70343cb47009d21a8 languageName: node linkType: hard -"@webassemblyjs/wast-printer@npm:1.11.6": - version: 1.11.6 - resolution: "@webassemblyjs/wast-printer@npm:1.11.6" +"@webassemblyjs/wast-printer@npm:1.12.1": + version: 1.12.1 + resolution: "@webassemblyjs/wast-printer@npm:1.12.1" dependencies: - "@webassemblyjs/ast": 1.11.6 + "@webassemblyjs/ast": 1.12.1 "@xtuc/long": 4.2.2 - checksum: d2fa6a4c427325ec81463e9c809aa6572af6d47f619f3091bf4c4a6fc34f1da3df7caddaac50b8e7a457f8784c62cd58c6311b6cb69b0162ccd8d4c072f79cf8 + checksum: 2974b5dda8d769145ba0efd886ea94a601e61fb37114c14f9a9a7606afc23456799af652ac3052f284909bd42edc3665a76bc9b50f95f0794c053a8a1757b713 languageName: node linkType: hard @@ -6945,12 +6935,12 @@ __metadata: languageName: node linkType: hard -"acorn-import-assertions@npm:^1.9.0": - version: 1.9.0 - resolution: "acorn-import-assertions@npm:1.9.0" +"acorn-import-attributes@npm:^1.9.5": + version: 1.9.5 + resolution: "acorn-import-attributes@npm:1.9.5" peerDependencies: acorn: ^8 - checksum: 944fb2659d0845c467066bdcda2e20c05abe3aaf11972116df457ce2627628a81764d800dd55031ba19de513ee0d43bb771bc679cc0eda66dc8b4fade143bc0c + checksum: 1c0c49b6a244503964ae46ae850baccf306e84caf99bc2010ed6103c69a423987b07b520a6c619f075d215388bd4923eccac995886a54309eda049ab78a4be95 languageName: node linkType: hard @@ -7807,7 +7797,21 @@ __metadata: languageName: node linkType: hard -"browserslist@npm:^4.14.5, browserslist@npm:^4.21.9, browserslist@npm:^4.22.1": +"browserslist@npm:^4.21.10": + version: 4.23.3 + resolution: "browserslist@npm:4.23.3" + dependencies: + caniuse-lite: ^1.0.30001646 + electron-to-chromium: ^1.5.4 + node-releases: ^2.0.18 + update-browserslist-db: ^1.1.0 + bin: + browserslist: cli.js + checksum: 7906064f9970aeb941310b2fcb8b4ace4a1b50aa657c986677c6f1553a8cabcc94ee9c5922f715baffbedaa0e6cf0831b6fed7b059dde6873a4bfadcbe069c7e + languageName: node + linkType: hard + +"browserslist@npm:^4.21.9, browserslist@npm:^4.22.1": version: 4.22.1 resolution: "browserslist@npm:4.22.1" dependencies: @@ -8042,6 +8046,13 @@ __metadata: languageName: node linkType: hard +"caniuse-lite@npm:^1.0.30001646": + version: 1.0.30001653 + resolution: "caniuse-lite@npm:1.0.30001653" + checksum: 289cf06c26a46f3e6460ccd5feffa788ab0ab35d306898c48120c65cfb11959bfa560e9f739393769b4fd01150c69b0747ad3ad5ec3abf3dfafd66df3c59254e + languageName: node + linkType: hard + "cardinal@npm:^2.1.1": version: 2.1.1 resolution: "cardinal@npm:2.1.1" @@ -9516,6 +9527,13 @@ __metadata: languageName: node linkType: hard +"electron-to-chromium@npm:^1.5.4": + version: 1.5.13 + resolution: "electron-to-chromium@npm:1.5.13" + checksum: f18ac84dd3bf9a200654a6a9292b9ec4bced0cf9bd26cec9941b775f4470c581c9d043e70b37a124d9752dcc0f47fc96613d52b2defd8e59632852730cb418b9 + languageName: node + linkType: hard + "email-addresses@npm:^5.0.0": version: 5.0.0 resolution: "email-addresses@npm:5.0.0" @@ -9576,7 +9594,7 @@ __metadata: languageName: node linkType: hard -"enhanced-resolve@npm:^5.10.0, enhanced-resolve@npm:^5.15.0": +"enhanced-resolve@npm:^5.10.0": version: 5.15.0 resolution: "enhanced-resolve@npm:5.15.0" dependencies: @@ -9586,6 +9604,16 @@ __metadata: languageName: node linkType: hard +"enhanced-resolve@npm:^5.17.1": + version: 5.17.1 + resolution: "enhanced-resolve@npm:5.17.1" + dependencies: + graceful-fs: ^4.2.4 + tapable: ^2.2.0 + checksum: 4bc38cf1cea96456f97503db7280394177d1bc46f8f87c267297d04f795ac5efa81e48115a2f5b6273c781027b5b6bfc5f62b54df629e4d25fa7001a86624f59 + languageName: node + linkType: hard + "enquirer@npm:^2.3.5": version: 2.4.1 resolution: "enquirer@npm:2.4.1" @@ -9864,6 +9892,13 @@ __metadata: languageName: node linkType: hard +"escalade@npm:^3.1.2": + version: 3.1.2 + resolution: "escalade@npm:3.1.2" + checksum: 1ec0977aa2772075493002bdbd549d595ff6e9393b1cb0d7d6fcaf78c750da0c158f180938365486f75cb69fba20294351caddfce1b46552a7b6c3cde52eaa02 + languageName: node + linkType: hard + "escape-html@npm:~1.0.3": version: 1.0.3 resolution: "escape-html@npm:1.0.3" @@ -11379,7 +11414,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.10, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -15595,6 +15630,13 @@ __metadata: languageName: node linkType: hard +"node-releases@npm:^2.0.18": + version: 2.0.18 + resolution: "node-releases@npm:2.0.18" + checksum: ef55a3d853e1269a6d6279b7692cd6ff3e40bc74947945101138745bfdc9a5edabfe72cb19a31a8e45752e1910c4c65c77d931866af6357f242b172b7283f5b3 + languageName: node + linkType: hard + "nopt@npm:^6.0.0": version: 6.0.0 resolution: "nopt@npm:6.0.0" @@ -16573,6 +16615,13 @@ __metadata: languageName: node linkType: hard +"picocolors@npm:^1.0.1": + version: 1.0.1 + resolution: "picocolors@npm:1.0.1" + checksum: fa68166d1f56009fc02a34cdfd112b0dd3cf1ef57667ac57281f714065558c01828cdf4f18600ad6851cbe0093952ed0660b1e0156bddf2184b6aaf5817553a5 + languageName: node + linkType: hard + "picomatch@npm:^2.0.4, picomatch@npm:^2.0.5, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.0, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" @@ -19020,7 +19069,7 @@ __metadata: languageName: node linkType: hard -"terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.7": +"terser-webpack-plugin@npm:^5.3.1": version: 5.3.9 resolution: "terser-webpack-plugin@npm:5.3.9" dependencies: @@ -19042,6 +19091,28 @@ __metadata: languageName: node linkType: hard +"terser-webpack-plugin@npm:^5.3.10": + version: 5.3.10 + resolution: "terser-webpack-plugin@npm:5.3.10" + dependencies: + "@jridgewell/trace-mapping": ^0.3.20 + jest-worker: ^27.4.5 + schema-utils: ^3.1.1 + serialize-javascript: ^6.0.1 + terser: ^5.26.0 + peerDependencies: + webpack: ^5.1.0 + peerDependenciesMeta: + "@swc/core": + optional: true + esbuild: + optional: true + uglify-js: + optional: true + checksum: bd6e7596cf815f3353e2a53e79cbdec959a1b0276f5e5d4e63e9d7c3c5bb5306df567729da287d1c7b39d79093e56863c569c42c6c24cc34c76aa313bd2cbcea + languageName: node + linkType: hard + "terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.16.8": version: 5.24.0 resolution: "terser@npm:5.24.0" @@ -19056,6 +19127,20 @@ __metadata: languageName: node linkType: hard +"terser@npm:^5.26.0": + version: 5.31.6 + resolution: "terser@npm:5.31.6" + dependencies: + "@jridgewell/source-map": ^0.3.3 + acorn: ^8.8.2 + commander: ^2.20.0 + source-map-support: ~0.5.20 + bin: + terser: bin/terser + checksum: 60d3faf39c9ad7acc891e17888bbd206e0b777f442649cf49873a5fa317b8b8a17179a46970d884d5f93e8addde0206193ed1e2e4f1ccb1cafb167f7d1ddee96 + languageName: node + linkType: hard + "test-exclude@npm:^6.0.0": version: 6.0.0 resolution: "test-exclude@npm:6.0.0" @@ -19877,6 +19962,20 @@ __metadata: languageName: node linkType: hard +"update-browserslist-db@npm:^1.1.0": + version: 1.1.0 + resolution: "update-browserslist-db@npm:1.1.0" + dependencies: + escalade: ^3.1.2 + picocolors: ^1.0.1 + peerDependencies: + browserslist: ">= 4.21.0" + bin: + update-browserslist-db: cli.js + checksum: 7b74694d96f0c360f01b702e72353dc5a49df4fe6663d3ee4e5c628f061576cddf56af35a3a886238c01dd3d8f231b7a86a8ceaa31e7a9220ae31c1c1238e562 + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -20191,7 +20290,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.2.0, watchpack@npm:^2.4.0": +"watchpack@npm:^2.2.0": version: 2.4.0 resolution: "watchpack@npm:2.4.0" dependencies: @@ -20201,6 +20300,16 @@ __metadata: languageName: node linkType: hard +"watchpack@npm:^2.4.1": + version: 2.4.2 + resolution: "watchpack@npm:2.4.2" + dependencies: + glob-to-regexp: ^0.4.1 + graceful-fs: ^4.1.2 + checksum: 92d9d52ce3d16fd83ed6994d1dd66a4d146998882f4c362d37adfea9ab77748a5b4d1e0c65fa104797928b2d40f635efa8f9b925a6265428a69f1e1852ca3441 + languageName: node + linkType: hard + "wcwidth@npm:^1.0.0, wcwidth@npm:^1.0.1": version: 1.0.1 resolution: "wcwidth@npm:1.0.1" @@ -20268,39 +20377,38 @@ __metadata: linkType: hard "webpack@npm:5": - version: 5.89.0 - resolution: "webpack@npm:5.89.0" + version: 5.94.0 + resolution: "webpack@npm:5.94.0" dependencies: - "@types/eslint-scope": ^3.7.3 - "@types/estree": ^1.0.0 - "@webassemblyjs/ast": ^1.11.5 - "@webassemblyjs/wasm-edit": ^1.11.5 - "@webassemblyjs/wasm-parser": ^1.11.5 + "@types/estree": ^1.0.5 + "@webassemblyjs/ast": ^1.12.1 + "@webassemblyjs/wasm-edit": ^1.12.1 + "@webassemblyjs/wasm-parser": ^1.12.1 acorn: ^8.7.1 - acorn-import-assertions: ^1.9.0 - browserslist: ^4.14.5 + acorn-import-attributes: ^1.9.5 + browserslist: ^4.21.10 chrome-trace-event: ^1.0.2 - enhanced-resolve: ^5.15.0 + enhanced-resolve: ^5.17.1 es-module-lexer: ^1.2.1 eslint-scope: 5.1.1 events: ^3.2.0 glob-to-regexp: ^0.4.1 - graceful-fs: ^4.2.9 + graceful-fs: ^4.2.11 json-parse-even-better-errors: ^2.3.1 loader-runner: ^4.2.0 mime-types: ^2.1.27 neo-async: ^2.6.2 schema-utils: ^3.2.0 tapable: ^2.1.1 - terser-webpack-plugin: ^5.3.7 - watchpack: ^2.4.0 + terser-webpack-plugin: ^5.3.10 + watchpack: ^2.4.1 webpack-sources: ^3.2.3 peerDependenciesMeta: webpack-cli: optional: true bin: webpack: bin/webpack.js - checksum: 43fe0dbc30e168a685ef5a86759d5016a705f6563b39a240aa00826a80637d4a3deeb8062e709d6a4b05c63e796278244c84b04174704dc4a37bedb0f565c5ed + checksum: 6a3d667be304a69cd6dcb8d676bc29f47642c0d389af514cfcd646eaaa809961bc6989fc4b2621a717dfc461130f29c6e20006d62a32e012dafaa9517813a4e6 languageName: node linkType: hard From 7dd1b248231994e06bf4ce87f067df678a61c7a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 10:23:47 -0400 Subject: [PATCH 4/6] chore(deps): bump express from 4.19.2 to 4.21.0 (#536) Bumps [express](https://github.com/expressjs/express) from 4.19.2 to 4.21.0. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md) - [Commits](https://github.com/expressjs/express/compare/4.19.2...4.21.0) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 183 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 139 insertions(+), 44 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ecb35cca..ecf83da5b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7710,9 +7710,9 @@ __metadata: languageName: node linkType: hard -"body-parser@npm:1.20.2": - version: 1.20.2 - resolution: "body-parser@npm:1.20.2" +"body-parser@npm:1.20.3": + version: 1.20.3 + resolution: "body-parser@npm:1.20.3" dependencies: bytes: 3.1.2 content-type: ~1.0.5 @@ -7722,11 +7722,11 @@ __metadata: http-errors: 2.0.0 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.11.0 + qs: 6.13.0 raw-body: 2.5.2 type-is: ~1.6.18 unpipe: 1.0.0 - checksum: 14d37ec638ab5c93f6099ecaed7f28f890d222c650c69306872e00b9efa081ff6c596cd9afb9930656aae4d6c4e1c17537bea12bb73c87a217cb3cfea8896737 + checksum: 1a35c59a6be8d852b00946330141c4f142c6af0f970faa87f10ad74f1ee7118078056706a05ae3093c54dabca9cd3770fa62a170a85801da1a4324f04381167d languageName: node linkType: hard @@ -7990,6 +7990,19 @@ __metadata: languageName: node linkType: hard +"call-bind@npm:^1.0.7": + version: 1.0.7 + resolution: "call-bind@npm:1.0.7" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + set-function-length: ^1.2.1 + checksum: 295c0c62b90dd6522e6db3b0ab1ce26bdf9e7404215bda13cfee25b626b5ff1a7761324d58d38b1ef1607fc65aca2d06e44d2e18d0dfc6c14b465b00d8660029 + languageName: node + linkType: hard + "callsites@npm:^3.0.0": version: 3.1.0 resolution: "callsites@npm:3.1.0" @@ -9173,6 +9186,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.1.4": + version: 1.1.4 + resolution: "define-data-property@npm:1.1.4" + dependencies: + es-define-property: ^1.0.0 + es-errors: ^1.3.0 + gopd: ^1.0.1 + checksum: 8068ee6cab694d409ac25936eb861eea704b7763f7f342adbdfe337fc27c78d7ae0eff2364b2917b58c508d723c7a074326d068eef2e45c4edcd85cf94d0313b + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -9576,6 +9600,13 @@ __metadata: languageName: node linkType: hard +"encodeurl@npm:~2.0.0": + version: 2.0.0 + resolution: "encodeurl@npm:2.0.0" + checksum: abf5cd51b78082cf8af7be6785813c33b6df2068ce5191a40ca8b1afe6a86f9230af9a9ce694a5ce4665955e5c1120871826df9c128a642e09c58d592e2807fe + languageName: node + linkType: hard + "encoding@npm:^0.1.13": version: 0.1.13 resolution: "encoding@npm:0.1.13" @@ -9728,6 +9759,22 @@ __metadata: languageName: node linkType: hard +"es-define-property@npm:^1.0.0": + version: 1.0.0 + resolution: "es-define-property@npm:1.0.0" + dependencies: + get-intrinsic: ^1.2.4 + checksum: f66ece0a887b6dca71848fa71f70461357c0e4e7249696f81bad0a1f347eed7b31262af4a29f5d726dc026426f085483b6b90301855e647aa8e21936f07293c6 + languageName: node + linkType: hard + +"es-errors@npm:^1.3.0": + version: 1.3.0 + resolution: "es-errors@npm:1.3.0" + checksum: ec1414527a0ccacd7f15f4a3bc66e215f04f595ba23ca75cdae0927af099b5ec865f9f4d33e9d7e86f512f252876ac77d4281a7871531a50678132429b1271b5 + languageName: node + linkType: hard + "es-get-iterator@npm:^1.1.3": version: 1.1.3 resolution: "es-get-iterator@npm:1.1.3" @@ -10477,41 +10524,41 @@ __metadata: linkType: hard "express@npm:^4.17.3": - version: 4.19.2 - resolution: "express@npm:4.19.2" + version: 4.21.0 + resolution: "express@npm:4.21.0" dependencies: accepts: ~1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.2 + body-parser: 1.20.3 content-disposition: 0.5.4 content-type: ~1.0.4 cookie: 0.6.0 cookie-signature: 1.0.6 debug: 2.6.9 depd: 2.0.0 - encodeurl: ~1.0.2 + encodeurl: ~2.0.0 escape-html: ~1.0.3 etag: ~1.8.1 - finalhandler: 1.2.0 + finalhandler: 1.3.1 fresh: 0.5.2 http-errors: 2.0.0 - merge-descriptors: 1.0.1 + merge-descriptors: 1.0.3 methods: ~1.1.2 on-finished: 2.4.1 parseurl: ~1.3.3 - path-to-regexp: 0.1.7 + path-to-regexp: 0.1.10 proxy-addr: ~2.0.7 - qs: 6.11.0 + qs: 6.13.0 range-parser: ~1.2.1 safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 + send: 0.19.0 + serve-static: 1.16.2 setprototypeof: 1.2.0 statuses: 2.0.1 type-is: ~1.6.18 utils-merge: 1.0.1 vary: ~1.1.2 - checksum: 212dbd6c2c222a96a61bc927639c95970a53b06257080bb9e2838adb3bffdb966856551fdad1ab5dd654a217c35db94f987d0aa88d48fb04d306340f5f34dca5 + checksum: 1c5212993f665809c249bf00ab550b989d1365a5b9171cdfaa26d93ee2ef10cd8add520861ec8d5da74b3194d8374e1d9d53e85ef69b89fd9c4196b87045a5d4 languageName: node linkType: hard @@ -10700,18 +10747,18 @@ __metadata: languageName: node linkType: hard -"finalhandler@npm:1.2.0": - version: 1.2.0 - resolution: "finalhandler@npm:1.2.0" +"finalhandler@npm:1.3.1": + version: 1.3.1 + resolution: "finalhandler@npm:1.3.1" dependencies: debug: 2.6.9 - encodeurl: ~1.0.2 + encodeurl: ~2.0.0 escape-html: ~1.0.3 on-finished: 2.4.1 parseurl: ~1.3.3 statuses: 2.0.1 unpipe: ~1.0.0 - checksum: 92effbfd32e22a7dff2994acedbd9bcc3aa646a3e919ea6a53238090e87097f8ef07cced90aa2cc421abdf993aefbdd5b00104d55c7c5479a8d00ed105b45716 + checksum: a8c58cd97c9cd47679a870f6833a7b417043f5a288cd6af6d0f49b476c874a506100303a128b6d3b654c3d74fa4ff2ffed68a48a27e8630cda5c918f2977dcf4 languageName: node linkType: hard @@ -11128,6 +11175,19 @@ __metadata: languageName: node linkType: hard +"get-intrinsic@npm:^1.2.4": + version: 1.2.4 + resolution: "get-intrinsic@npm:1.2.4" + dependencies: + es-errors: ^1.3.0 + function-bind: ^1.1.2 + has-proto: ^1.0.1 + has-symbols: ^1.0.3 + hasown: ^2.0.0 + checksum: 414e3cdf2c203d1b9d7d33111df746a4512a1aa622770b361dadddf8ed0b5aeb26c560f49ca077e24bfafb0acb55ca908d1f709216ccba33ffc548ec8a79a951 + languageName: node + linkType: hard + "get-nonce@npm:^1.0.0": version: 1.0.1 resolution: "get-nonce@npm:1.0.1" @@ -11506,6 +11566,15 @@ __metadata: languageName: node linkType: hard +"has-property-descriptors@npm:^1.0.2": + version: 1.0.2 + resolution: "has-property-descriptors@npm:1.0.2" + dependencies: + es-define-property: ^1.0.0 + checksum: fcbb246ea2838058be39887935231c6d5788babed499d0e9d0cc5737494c48aba4fe17ba1449e0d0fbbb1e36175442faa37f9c427ae357d6ccb1d895fbcd3de3 + languageName: node + linkType: hard + "has-proto@npm:^1.0.1": version: 1.0.1 resolution: "has-proto@npm:1.0.1" @@ -14582,10 +14651,10 @@ __metadata: languageName: node linkType: hard -"merge-descriptors@npm:1.0.1": - version: 1.0.1 - resolution: "merge-descriptors@npm:1.0.1" - checksum: 5abc259d2ae25bb06d19ce2b94a21632583c74e2a9109ee1ba7fd147aa7362b380d971e0251069f8b3eb7d48c21ac839e21fa177b335e82c76ec172e30c31a26 +"merge-descriptors@npm:1.0.3": + version: 1.0.3 + resolution: "merge-descriptors@npm:1.0.3" + checksum: 52117adbe0313d5defa771c9993fe081e2d2df9b840597e966aadafde04ae8d0e3da46bac7ca4efc37d4d2b839436582659cd49c6a43eacb3fe3050896a105d1 languageName: node linkType: hard @@ -16560,10 +16629,10 @@ __metadata: languageName: node linkType: hard -"path-to-regexp@npm:0.1.7": - version: 0.1.7 - resolution: "path-to-regexp@npm:0.1.7" - checksum: 69a14ea24db543e8b0f4353305c5eac6907917031340e5a8b37df688e52accd09e3cebfe1660b70d76b6bd89152f52183f28c74813dbf454ba1a01c82a38abce +"path-to-regexp@npm:0.1.10": + version: 0.1.10 + resolution: "path-to-regexp@npm:0.1.10" + checksum: ab7a3b7a0b914476d44030340b0a65d69851af2a0f33427df1476100ccb87d409c39e2182837a96b98fb38c4ef2ba6b87bdad62bb70a2c153876b8061760583c languageName: node linkType: hard @@ -17086,12 +17155,12 @@ __metadata: languageName: node linkType: hard -"qs@npm:6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" +"qs@npm:6.13.0": + version: 6.13.0 + resolution: "qs@npm:6.13.0" dependencies: - side-channel: ^1.0.4 - checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 + side-channel: ^1.0.6 + checksum: e9404dc0fc2849245107108ce9ec2766cde3be1b271de0bf1021d049dc5b98d1a2901e67b431ac5509f865420a7ed80b7acb3980099fe1c118a1c5d2e1432ad8 languageName: node linkType: hard @@ -18135,9 +18204,9 @@ __metadata: languageName: node linkType: hard -"send@npm:0.18.0": - version: 0.18.0 - resolution: "send@npm:0.18.0" +"send@npm:0.19.0": + version: 0.19.0 + resolution: "send@npm:0.19.0" dependencies: debug: 2.6.9 depd: 2.0.0 @@ -18152,7 +18221,7 @@ __metadata: on-finished: 2.4.1 range-parser: ~1.2.1 statuses: 2.0.1 - checksum: 74fc07ebb58566b87b078ec63e5a3e41ecd987e4272ba67b7467e86c6ad51bc6b0b0154133b6d8b08a2ddda360464f71382f7ef864700f34844a76c8027817a8 + checksum: 5ae11bd900c1c2575525e2aa622e856804e2f96a09281ec1e39610d089f53aa69e13fd8db84b52f001d0318cf4bb0b3b904ad532fc4c0014eb90d32db0cff55f languageName: node linkType: hard @@ -18174,15 +18243,15 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:1.15.0": - version: 1.15.0 - resolution: "serve-static@npm:1.15.0" +"serve-static@npm:1.16.2": + version: 1.16.2 + resolution: "serve-static@npm:1.16.2" dependencies: - encodeurl: ~1.0.2 + encodeurl: ~2.0.0 escape-html: ~1.0.3 parseurl: ~1.3.3 - send: 0.18.0 - checksum: af57fc13be40d90a12562e98c0b7855cf6e8bd4c107fe9a45c212bf023058d54a1871b1c89511c3958f70626fff47faeb795f5d83f8cf88514dbaeb2b724464d + send: 0.19.0 + checksum: dffc52feb4cc5c68e66d0c7f3c1824d4e989f71050aefc9bd5f822a42c54c9b814f595fc5f2b717f4c7cc05396145f3e90422af31186a93f76cf15f707019759 languageName: node linkType: hard @@ -18205,6 +18274,20 @@ __metadata: languageName: node linkType: hard +"set-function-length@npm:^1.2.1": + version: 1.2.2 + resolution: "set-function-length@npm:1.2.2" + dependencies: + define-data-property: ^1.1.4 + es-errors: ^1.3.0 + function-bind: ^1.1.2 + get-intrinsic: ^1.2.4 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.2 + checksum: a8248bdacdf84cb0fab4637774d9fb3c7a8e6089866d04c817583ff48e14149c87044ce683d7f50759a8c50fb87c7a7e173535b06169c87ef76f5fb276dfff72 + languageName: node + linkType: hard + "set-function-name@npm:^2.0.0": version: 2.0.1 resolution: "set-function-name@npm:2.0.1" @@ -18331,6 +18414,18 @@ __metadata: languageName: node linkType: hard +"side-channel@npm:^1.0.6": + version: 1.0.6 + resolution: "side-channel@npm:1.0.6" + dependencies: + call-bind: ^1.0.7 + es-errors: ^1.3.0 + get-intrinsic: ^1.2.4 + object-inspect: ^1.13.1 + checksum: bfc1afc1827d712271453e91b7cd3878ac0efd767495fd4e594c4c2afaa7963b7b510e249572bfd54b0527e66e4a12b61b80c061389e129755f34c493aad9b97 + languageName: node + linkType: hard + "signal-exit@npm:^3.0.0, signal-exit@npm:^3.0.2, signal-exit@npm:^3.0.3, signal-exit@npm:^3.0.7": version: 3.0.7 resolution: "signal-exit@npm:3.0.7" From a91406693eb75c4a9b1f28d2835bc973a6459275 Mon Sep 17 00:00:00 2001 From: "David Richards, Jr." Date: Mon, 16 Sep 2024 10:35:31 -0400 Subject: [PATCH 5/6] feat(ScrollWrapper): add signals for button press at top and bottom of content (#533) * fix(ScrollWrapper): add signals for button press at top and bottom of content * fix(ScrollWrapper): remove extra code from story * fix: update ts definitions --- .../ScrollWrapper/ScrollWrapper.d.ts | 16 ++++++++++++++ .../components/ScrollWrapper/ScrollWrapper.js | 4 ++++ .../ScrollWrapper/ScrollWrapper.mdx | 10 +++++++++ .../ScrollWrapper/ScrollWrapper.test.js | 21 +++++++++++++++++++ 4 files changed, 51 insertions(+) diff --git a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.d.ts b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.d.ts index 540f456d0..a2e4f643b 100644 --- a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.d.ts +++ b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.d.ts @@ -75,6 +75,22 @@ declare namespace ScrollWrapper { */ showScrollBar?: boolean; } + + export interface TypeConfig extends lng.Component.TypeConfig { + SignalMapType: SignalMap; + } + + export type SignalMap = { + /** + * emitted when user is at the top of the content and presses up again + */ + onUpAtTop(): void; + + /** + * emitted when user is at the bottom of the content and presses bottom again + */ + onDownAtBottom(): void; + }; } declare class ScrollWrapper< diff --git a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.js b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.js index 9537a1582..b8c726f36 100644 --- a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.js +++ b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.js @@ -247,6 +247,8 @@ export default class ScrollWrapper extends Base { this.fireAncestors('$scrollChanged', 'endDown', this); this._updateFadeContainer(); } + } else { + this.signal('onDownAtBottom'); } } @@ -278,6 +280,8 @@ export default class ScrollWrapper extends Base { this._isEndContentVisible = false; this._updateFadeContainer(); } + } else { + this.signal('onUpAtTop'); } } diff --git a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.mdx b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.mdx index 068d24925..5adcdee5e 100644 --- a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.mdx +++ b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.mdx @@ -136,3 +136,13 @@ Resets the `y` value of both the content and the scroll bar. #### $scrollChanged('endUp'|'endDown', this) Event fired via `fireAncestors`, is triggered when scroll reaches the top or bottom of the scroll boundaries. + +### Signals + +#### onUpAtTop + +Fired when user is at the top of the content within the ScrollWrapper and presses up again. + +#### onDownAtBottom + +Fired when user is at the bottom of the content within the ScrollWrapper and presses down again. diff --git a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.test.js b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.test.js index 0bd258d4e..1b030e553 100644 --- a/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.test.js +++ b/packages/@lightningjs/ui-components/src/components/ScrollWrapper/ScrollWrapper.test.js @@ -252,6 +252,27 @@ describe('ScrollWrapper', () => { ); }); + it('should fire a signal when pressing Up when already at the top of the scroll container', () => { + jest.spyOn(scrollWrapper, 'signal'); + expect(scrollWrapper.signal).not.toHaveBeenCalled(); + + testRenderer.keyPress('Up'); + testRenderer.update(); + expect(scrollWrapper.signal).toHaveBeenCalledWith('onUpAtTop'); + }); + + it('should fire a signal when pressing Down when already at the bottom of the scroll container', () => { + jest.spyOn(scrollWrapper, 'signal'); + expect(scrollWrapper.signal).not.toHaveBeenCalled(); + + // Simulate scrolling to the bottom and then some + for (let i = 0; i < 50; i++) { + testRenderer.keyPress('Down'); + testRenderer.update(); + } + expect(scrollWrapper.signal).toHaveBeenCalledWith('onDownAtBottom'); + }); + it('should scroll up by the scroll step', () => { scrollWrapper.scrollStep = 100; testRenderer.keyPress('Down'); From d1ac54a5a30c83233f92ff7a67c5a913d98c0ddf Mon Sep 17 00:00:00 2001 From: "David Richards, Jr." Date: Tue, 17 Sep 2024 09:34:59 -0400 Subject: [PATCH 6/6] fix(MetadataCardContent): expose subtitle property (#537) --- .../CardContent/CardContent.test.js | 3 ++ .../components/MetadataBase/MetadataBase.js | 2 +- .../components/MetadataBase/MetadataBase.mdx | 3 +- .../MetadataBase/MetadataBase.styles.js | 5 ++ .../MetadataCardContent.js | 35 ++++++++++++++ .../MetadataCardContent.mdx | 3 ++ .../MetadataCardContent.stories.js | 13 +++++- .../MetadataCardContent.test.js | 11 +++++ .../MetadataCardContent.test.js.snap | 46 +++++++++++++++++-- 9 files changed, 113 insertions(+), 8 deletions(-) diff --git a/packages/@lightningjs/ui-components/src/components/CardContent/CardContent.test.js b/packages/@lightningjs/ui-components/src/components/CardContent/CardContent.test.js index 40ac48487..28ec2ae29 100644 --- a/packages/@lightningjs/ui-components/src/components/CardContent/CardContent.test.js +++ b/packages/@lightningjs/ui-components/src/components/CardContent/CardContent.test.js @@ -46,6 +46,7 @@ describe('CardContent', () => { it('sets the announce string to the metadata text from both the metadata component on the right and the tile on the left', () => { const title = 'Title'; + const subtitle = 'Subtitle'; const description = 'Description'; const descriptionDetails = 'Description Details'; const details = 'Details'; @@ -60,6 +61,7 @@ describe('CardContent', () => { cardContent.patch({ metadata: { title, + subtitle, description, descriptionDetails, details, @@ -75,6 +77,7 @@ describe('CardContent', () => { expect(cardContent.announce).toEqual([ [ title, + subtitle, description, descriptionDetails, details, diff --git a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.js b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.js index 6ed447d09..3efa3b6da 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.js @@ -212,7 +212,7 @@ class MetadataBase extends Base { marquee: this.marquee, style: { textStyle: { - ...this.style.descriptionTextStyle, + ...this.style.subtitleTextStyle, maxLines: 1, wordWrap: true, wordWrapWidth: this._Text.w diff --git a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.mdx b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.mdx index 1fbab4347..e699b39c7 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.mdx +++ b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.mdx @@ -77,7 +77,6 @@ class Example extends lng.Component { | name | type | required | default | description | | ------------ | -------------- | -------------------- | --------- | -------------------------------------------- | -| subtitle | string | false | undefined | subtitle text | | description | string | false | undefined | third line or description of the content | | details | inline content | false | undefined | relevant content data in the middle | | logo | string | false | undefined | logo to display at bottom of component | @@ -85,6 +84,7 @@ class Example extends lng.Component { | logoPosition | string | false | 'right' | which side to place logo (`right` or `left`) | | logoTitle | string | true (if using logo) | undefined | title of logo to use for announcer | | logoWidth | number | true (if using logo) | undefined | width of logo | +| subtitle | string | false | undefined | subtitle text | | title | string | false | undefined | first line or headline of the content | ### Style Properties @@ -97,6 +97,7 @@ class Example extends lng.Component { | logoHeight | number | height for logo | | logoPadding | number | spacing between logo and secondLine | | logoWidth | number | width for logo | +| subtitleTextStyle | string \| object | text style for subtitle | | titleTextStyle | string \| object | text style for title | ### Methods diff --git a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.styles.js b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.styles.js index 2cf905ba6..f138f5e4b 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.styles.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataBase/MetadataBase.styles.js @@ -23,6 +23,7 @@ export const base = theme => ({ logoHeight: theme.typography.body3.lineHeight, logoPadding: theme.spacer.lg, detailsTextStyle: theme.typography.body3, + subtitleTextStyle: theme.typography.body3, titleTextStyle: { ...theme.typography.headline1, maxLines: 1 }, marqueeSync: true, alpha: theme.alpha.primary @@ -38,6 +39,7 @@ export const mode = theme => ({ export const tone = theme => ({ neutral: { titleTextStyle: { textColor: theme.color.textNeutral }, + subtitleTextStyle: { textColor: theme.color.textNeutralSecondary }, detailsTextStyle: { textColor: theme.color.textNeutral }, descriptionTextStyle: { textColor: theme.color.textNeutralSecondary }, mode: { @@ -52,11 +54,13 @@ export const tone = theme => ({ }, inverse: { titleTextStyle: { textColor: theme.color.textInverse }, + subtitleTextStyle: { textColor: theme.color.textInverseSecondary }, detailsTextStyle: { textColor: theme.color.textInverse }, descriptionTextStyle: { textColor: theme.color.textInverseSecondary }, mode: { disabled: { titleTextStyle: { textColor: theme.color.textNeutralDisabled }, + subtitleTextStyle: { textColor: theme.color.textNeutralDisabled }, detailsTextStyle: { textColor: theme.color.textNeutralDisabled }, descriptionTextStyle: { textColor: theme.color.textNeutralDisabled @@ -66,6 +70,7 @@ export const tone = theme => ({ }, brand: { titleTextStyle: { textColor: theme.color.textNeutral }, + subtitleTextStyle: { textColor: theme.color.textNeutralSecondary }, detailsTextStyle: { textColor: theme.color.textNeutral }, descriptionTextStyle: { textColor: theme.color.textNeutralSecondary }, mode: { diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js index 35b2500a0..e1a13b0c4 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.js @@ -38,6 +38,9 @@ export default class MetadataCardContent extends MetadataBase { Title: { type: TextBox }, + Subtitle: { + type: TextBox + }, Description: { type: TextBox }, @@ -72,6 +75,7 @@ export default class MetadataCardContent extends MetadataBase { 'descriptionDetails', 'details', 'provider', + 'subtitle', 'title' ]; } @@ -83,6 +87,10 @@ export default class MetadataCardContent extends MetadataBase { name: 'Title', path: 'Text.Title' }, + { + name: 'Subtitle', + path: 'Text.Subtitle' + }, { name: 'Description', path: 'Text.Description' @@ -141,11 +149,37 @@ export default class MetadataCardContent extends MetadataBase { _updateLines() { this._Text.w = this.w; this._updateTitle(); + this._updateSubtitle(); this._updateDescription(); this._updateDescriptionDetails(); this._updateDetails(); } + _updateSubtitle() { + if (!this.subtitle && !this._Subtitle) { + return; + } + + if (!this._Subtitle) { + this._Text.childList.addAt({ + ref: 'Subtitle', + type: TextBox + }); + } + + this._Subtitle.patch({ + content: this.subtitle, + style: { + textStyle: { + ...this.style.subtitleTextStyle, + maxLines: 1, + wordWrap: true, + wordWrapWidth: this._Text.w + } + } + }); + } + _updateDescription() { this._Description.patch({ content: this.description, @@ -264,6 +298,7 @@ export default class MetadataCardContent extends MetadataBase { return ( this._announce || [ this._Title && this._Title.announce, + this._Subtitle && this._Subtitle.announce, this._Description && this._Description.announce, this._DescriptionDetails && this._DescriptionDetails.announce, this._Details && this._Details.announce, diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.mdx b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.mdx index 2be6716b4..64a8b72fb 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.mdx +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.mdx @@ -43,6 +43,7 @@ class Basic extends lng.Component { w: 600, h: 250, title: 'Title', + subtitle: 'Subtitle', description: 'Description', details: 'Details', provider: { @@ -66,6 +67,7 @@ class Basic extends lng.Component { | descriptionDetails | string | false | undefined | details text directly below description | | details | string | false | undefined | details text at bottom left of component | | provider | [Provider](?path=/docs/components-provider--docs) | false | undefined | an object of [Provider](?path=/docs/components-provider--docs) properties to patch in | +| subtitle | string | false | undefined | subtitle text | ### Style Properties @@ -74,5 +76,6 @@ class Basic extends lng.Component { | detailsTextStyle | string \| object | text style for details | | descriptionDetailsStyle | object | style for description details | | providerStyle | object | style properties to pass along to the [Provider](?path=/docs/components-provider--docs) | +| subtitleTextStyle | string \| object | text style for subtitle | ### Methods diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.stories.js b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.stories.js index b4f9553f4..458c18bf2 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.stories.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.stories.js @@ -46,8 +46,9 @@ const descriptionSample = MetadataCardContent.args = { w: 600, - h: 250, + h: 300, title: 'Title', + subtitle: 'Subtitle', description: descriptionSample, descriptionDetails: [ '94%', @@ -93,9 +94,17 @@ MetadataCardContent.argTypes = { type: { summary: 'string' } } }, + subtitle: { + control: 'text', + description: 'Subtitle text below title', + table: { + defaultValue: { summary: 'undefined' }, + type: { summary: 'string' } + } + }, description: { control: 'text', - description: 'Description text directly below title', + description: 'Description text below subtitle', table: { defaultValue: { summary: 'undefined' }, type: { summary: 'string' } diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.test.js b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.test.js index c70909258..7865afd32 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.test.js +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/MetadataCardContent.test.js @@ -50,12 +50,14 @@ describe('MetadataCardContent', () => { it('sets the announce string to the appropriate text content status', () => { const title = 'Title'; + const subtitle = 'Subtitle'; const description = 'Description'; const descriptionDetails = 'Description Details'; const details = 'Details'; const provider = { providers: [{ icon: 'test.png', announce: 'test' }] }; metadataCardContent.patch({ title, + subtitle, description, descriptionDetails, details, @@ -64,6 +66,7 @@ describe('MetadataCardContent', () => { testRenderer.forceAllUpdates(); expect(metadataCardContent.announce).toEqual([ title, + subtitle, description, descriptionDetails, details, @@ -86,6 +89,14 @@ describe('MetadataCardContent', () => { expect(metadataCardContent._Title.content).toBe(title); }); + it('updates the subtitle', async () => { + const subtitle = 'subtitle text'; + expect(metadataCardContent.subtitle).toBe(undefined); + metadataCardContent.subtitle = subtitle; + await metadataCardContent.__updateSpyPromise; + expect(metadataCardContent._Subtitle.content).toBe(subtitle); + }); + it('updates the description', async () => { const description = 'description text'; expect(metadataCardContent.description).toBe(undefined); diff --git a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/__snapshots__/MetadataCardContent.test.js.snap b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/__snapshots__/MetadataCardContent.test.js.snap index 5f088da2f..a7565a976 100644 --- a/packages/@lightningjs/ui-components/src/components/MetadataCardContent/__snapshots__/MetadataCardContent.test.js.snap +++ b/packages/@lightningjs/ui-components/src/components/MetadataCardContent/__snapshots__/MetadataCardContent.test.js.snap @@ -102,7 +102,7 @@ exports[`MetadataCardContent renders 1`] = ` "attached": true, "boundsMargin": null, "children": { - "Element-13": { + "Element-14": { "active": false, "alpha": 1, "attached": true, @@ -137,7 +137,7 @@ exports[`MetadataCardContent renders 1`] = ` "y": 0, "zIndex": 0, }, - "Element-14": { + "Element-15": { "active": false, "alpha": 1, "attached": true, @@ -172,7 +172,7 @@ exports[`MetadataCardContent renders 1`] = ` "y": 0, "zIndex": 0, }, - "Element-15": { + "Element-16": { "active": false, "alpha": 1, "attached": true, @@ -207,7 +207,7 @@ exports[`MetadataCardContent renders 1`] = ` "y": 0, "zIndex": 0, }, - "Element-16": { + "Element-17": { "active": false, "alpha": 1, "attached": true, @@ -578,6 +578,44 @@ exports[`MetadataCardContent renders 1`] = ` "y": 5, "zIndex": 0, }, + "Subtitle": { + "active": false, + "alpha": 0.001, + "attached": true, + "boundsMargin": null, + "clipping": false, + "color": 4294967295, + "enabled": true, + "flex": false, + "flexItem": true, + "h": 0, + "hasFinalFocus": false, + "hasFocus": false, + "isComponent": true, + "mount": 0, + "mountX": 0, + "mountY": 0, + "pivot": 0.5, + "pivotX": 0.5, + "pivotY": 0.5, + "ref": "Subtitle", + "renderOfScreen": undefined, + "renderToTexture": false, + "scale": 1, + "scaleX": 1, + "scaleY": 1, + "state": "", + "tag": [Function], + "tags": [ + "Subtitle", + ], + "type": "TextBox", + "visible": true, + "w": 0, + "x": 0, + "y": 0, + "zIndex": 0, + }, "Title": { "active": false, "alpha": 0.001,