You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug fix (non-breaking change which fixes an issue)
Description
When export type is set to "Default" for attribute columns, the exported Excel cells now use the attribute's own formatter (number precision, date pattern) instead of exporting raw values without formatting.
Also hides the export type and format properties in Studio Pro for dynamic text columns, since they have no effect.
What should be covered while testing?
Attribute column with exportType "Default" and a Decimal attribute configured with 2 decimal places → exported cell should have format #,##0.00
Attribute column with exportType "Default" and a DateTime attribute with custom pattern dd/MM/yyyy → exported cell should have Excel format dd/mm/yyyy
Attribute column with exportType "Number" or "Date" (custom) → still uses the manually specified export format (unchanged behavior)
Dynamic text column → Studio Pro should NOT show export type, export number format, or export date format properties
Custom content columns → unchanged behavior, all export types still work
Existing configurations with no changes → no regression, everything exports as before
⚠️ Low — M→m replacement is too broad for compound datetime patterns
File:packages/pluggableWidgets/datagrid-web/src/features/data-export/cell-readers.ts line 124 Note: The regex /M/g replaces every capital M in the pattern, which is correct for month tokens (MM, MMM, MMMM). However, some Mendix patterns include locale tags like [$-en-US] that could also contain an uppercase M. The existing hasTimeComponent already demonstrates the pattern of stripping locale tags first (line 98). This is an edge case but worth noting for future patterns:
⚠️ Low — Missing test: exportType = "default" with no formatter on attribute falls through gracefully
File:packages/pluggableWidgets/datagrid-web/src/features/data-export/__tests__/cell-readers.spec.ts Note: There is no test covering the case where exportType === "default" and the attribute has no formatter property (i.e., formatter is undefined). This is the most common real-world state (Mendix 9 runtimes or attributes not yet configured). The code handles it correctly via the early if (!formatter) return undefined guard, but a test would document and protect this contract:
it("returns locale default format when attribute has no formatter and exportType is default",()=>{constattr=listAttribute(()=>newDate("2024-06-15T00:00:00Z"))asany;// no attr.formatter assignmentconstcol=column("Created",c=>{c.showContentAs="attribute";c.attribute=attr;c.exportType="default";});constcell=readSingleCell(col);expect(cell.t).toBe("d");expect(cell.z).toBe("dd-mm-yyyy");// locale fallback});
Positives
getAttributeDefaultFormat is well-scoped and isolated — it only reads from props.attribute.formatter and returns a plain string, making it easy to test and reason about independently.
The as any casts in the test file are confined to the test setup layer (mutating the mock) and don't leak into production types — correct pattern for extending test mocks without polluting typings.
The editorConfig change correctly uses hideNestedPropertiesIn (batch hide) rather than three separate hidePropertyIn calls, consistent with the pattern already used elsewhere in the same function (line 30).
CHANGELOG entries follow Keep a Changelog format with user-facing language (no implementation details).
Test structure uses the existing column / readSingleCell helpers rather than duplicating boilerplate — consistent with the rest of the spec file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
When export type is set to "Default" for attribute columns, the exported Excel cells now use the attribute's own formatter (number precision, date pattern) instead of exporting raw values without formatting.
Also hides the export type and format properties in Studio Pro for dynamic text columns, since they have no effect.
What should be covered while testing?
#,##0.00dd/MM/yyyy→ exported cell should have Excel formatdd/mm/yyyy