From 51f57ad5ed4eb9b3013daca7db419d1cd39c5371 Mon Sep 17 00:00:00 2001 From: Peter Reynolds Date: Wed, 26 Feb 2025 15:09:23 +0000 Subject: [PATCH 1/3] AG-119 - fix find cell change flash --- packages/ag-grid-enterprise/src/find/findService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ag-grid-enterprise/src/find/findService.ts b/packages/ag-grid-enterprise/src/find/findService.ts index 915f9505a9c..0d1ebfa13c5 100644 --- a/packages/ag-grid-enterprise/src/find/findService.ts +++ b/packages/ag-grid-enterprise/src/find/findService.ts @@ -544,6 +544,7 @@ export class FindService extends BeanStub implements NamedBean, IFindService { rowNodes: [...rowNodes], columns: columns ? [...columns] : undefined, force: true, + suppressFlash: true, }); } From ecd3b99466c40b768e02d6915400685cacd8337f Mon Sep 17 00:00:00 2001 From: Peter Reynolds Date: Wed, 26 Feb 2025 16:24:33 +0000 Subject: [PATCH 2/3] AG-3390 - fix module size test --- testing/module-size/moduleDefinitions.ts | 10 +++--- testing/module-size/moduleValidator.ts | 39 ++++++++++++++---------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/testing/module-size/moduleDefinitions.ts b/testing/module-size/moduleDefinitions.ts index 740f238e2bb..bccc4124825 100644 --- a/testing/module-size/moduleDefinitions.ts +++ b/testing/module-size/moduleDefinitions.ts @@ -47,7 +47,7 @@ export const AllGridCommunityModules: Record<`${CommunityModuleName}Module`, num UndoRedoEditModule: 23.5, ValidationModule: 74.31, ValueCacheModule: 0.65, - CellSpanModule: 6.99, + CellSpanModule: 8.08, }; export const AllEnterpriseModules: Record<`${EnterpriseModuleName}Module`, number> = { AdvancedFilterModule: 200, @@ -59,18 +59,18 @@ export const AllEnterpriseModules: Record<`${EnterpriseModuleName}Module`, numbe ContextMenuModule: 70, ExcelExportModule: 84, FiltersToolPanelModule: 116, - FindModule: 9.3, + FindModule: 11.61, GridChartsModule: 67, IntegratedChartsModule: 385.33, GroupFilterModule: 93, MasterDetailModule: 82, MenuModule: 153, MultiFilterModule: 121, - PivotModule: 91, + PivotModule: 87.97, RangeSelectionModule: 53, RichSelectModule: 77, RowNumbersModule: 26, - RowGroupingModule: 78, + RowGroupingModule: 74.88, RowGroupingPanelModule: 71, ServerSideRowModelApiModule: 19, ServerSideRowModelModule: 147, @@ -120,7 +120,7 @@ const chartModules: ModuleTest[] = [ }, { modules: ['AgChartsEnterpriseModule' as any, 'IntegratedChartsModule'], - expectedSize: 1840, + expectedSize: 1917.52, }, { modules: ['AgChartsCommunityModule' as any, 'SparklinesModule'], diff --git a/testing/module-size/moduleValidator.ts b/testing/module-size/moduleValidator.ts index 80c3efcde51..7ca77b97bd5 100644 --- a/testing/module-size/moduleValidator.ts +++ b/testing/module-size/moduleValidator.ts @@ -28,26 +28,33 @@ function validateSizes() { (result) => result.selfSize < result.expectedSize - bufferSize(result.expectedSize) ); - if (failuresTooBig.length > 0) { - console.error( - 'Validation failed for the following modules which are too large compared to their expected size:' - ); - failuresTooBig.forEach((failure) => { + const tooBig = failuresTooBig.length > 0; + const tooSmall = failuresTooSmall.length > 0; + + if (tooBig || tooSmall) { + if (tooBig) { console.error( - `Module: [${failure.modules.join()}], selfSize: ${failure.selfSize}, expectedSize: ${failure.expectedSize} + (${bufferSize(failure.expectedSize)})` + 'Validation failed for the following modules which are too large compared to their expected size:' + ); + failuresTooBig.forEach((failure) => { + console.error( + `Module: [${failure.modules.join()}], selfSize: ${failure.selfSize}, expectedSize: ${failure.expectedSize} + (${bufferSize(failure.expectedSize)})` + ); + }); + } + if (tooSmall) { + console.error( + 'Validation failed for the following modules which are too small compared to their expected size:' ); - }); - process.exit(1); // Return a non-zero exit code - } else if (failuresTooSmall.length > 0) { - console.error( - 'Validation failed for the following modules which are too much smaller than their expected size:' - ); - console.error('Is the expected size too high in moduleDefinitions? Or has the module dependencies changed?'); - failuresTooSmall.forEach((failure) => { console.error( - `Module: [${failure.modules.join()}], selfSize: ${failure.selfSize}, expectedSize: ${failure.expectedSize} + (${bufferSize(failure.expectedSize)})` + 'Is the expected size too high in moduleDefinitions? Or have the module dependencies changed?' ); - }); + failuresTooSmall.forEach((failure) => { + console.error( + `Module: [${failure.modules.join()}], selfSize: ${failure.selfSize}, expectedSize: ${failure.expectedSize} + (${bufferSize(failure.expectedSize)})` + ); + }); + } process.exit(1); // Return a non-zero exit code } else { console.log(`All modules (${results.length}) passed size validation.`); From b19599080f35adffe446c3d54a5bed4aaa324f19 Mon Sep 17 00:00:00 2001 From: Alan Treadway Date: Wed, 26 Feb 2025 17:09:18 +0000 Subject: [PATCH 3/3] Pre-emptive Charts bump fix - handle AgGradientFill cases. --- .../chartProxies/pie/pieChartProxy.ts | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/packages/ag-grid-enterprise/src/charts/chartComp/chartProxies/pie/pieChartProxy.ts b/packages/ag-grid-enterprise/src/charts/chartComp/chartProxies/pie/pieChartProxy.ts index cbae0216513..0307f59d700 100644 --- a/packages/ag-grid-enterprise/src/charts/chartComp/chartProxies/pie/pieChartProxy.ts +++ b/packages/ag-grid-enterprise/src/charts/chartComp/chartProxies/pie/pieChartProxy.ts @@ -1,5 +1,7 @@ import type { AgDonutSeriesOptions, + AgFillType, + AgGradientFill, AgPieSeriesOptions, AgPolarChartOptions, AgPolarSeriesOptions, @@ -138,11 +140,26 @@ export class PieChartProxy extends ChartProxy(fills: T[], alpha: number): T[] { const Color = this.agChartsExports._Util.Color; return fills.map((fill) => { - const c = Color.fromString(fill); - return new Color(c.r, c.g, c.b, alpha).toHexString(); + if (typeof fill === 'string') { + const c = Color.fromString(fill); + return new Color(c.r, c.g, c.b, alpha).toHexString() as T; + } + + return { + ...(fill as AgGradientFill), + colorStops: fill.colorStops?.map((stop) => { + if (stop.color == null) return stop; + + const c = Color.fromString(stop.color); + return { + ...stop, + color: new Color(c.r, c.g, c.b, alpha).toHexString(), + }; + }), + } as T; }); } }