DataColumn: add support for DateGroupType#2152
Open
bschwarzent wants to merge 2 commits into
Open
Conversation
cguglielmo
reviewed
Apr 24, 2026
cguglielmo
reviewed
Apr 27, 2026
- New enum DateGroupType: YEAR, MONTH, MONTH_AND_YEAR, CALENDAR_WEEK, WEEKDAY, DATE - New property "groupType" on date columns - New DateColumnTableHeaderMenu for date columns FEATURE DESCRIPTION: Instead of only grouping DateColumns by year, the user can now change the group type as desired. The new DateGroupType enum offers multiple options, several of which are not achievable with a simple date format pattern (e.g. month or weekday). The user is presented with a list of options when they click the "group by" button in the table header menu of a date column. For grouped date columns, the grou type can be changed without reload the data. Technically, the grouping uses the TableMatrix helper object, which was extended to support all new date group types. Date values are normalized to a type-specific numeric value which also defines the sort order (e.g. months are not just sorted alphabetically but in the "natural" order from January to December). The default grouping is still by year. Support for a custom group format for a specific column is still present, but setting the new "groupType" property takes precedence. If the custom format matches one of the group types, it is automatically treated as a group type. The selected group type is stored along with the existing "groupingActive" property in the table ui preferences. The same group types can also be applied to the filter table in the table header menu of date columns. The user can change the group type for the filter table (not the actual data table in the background) by clicking the calendar icon above the filter table. For example, this allows the user to filter the table rows by weekday. By default, the filter group type is the same was the aggregation group type, but a different value can be chosen. 269392
a76cc71 to
6988bcd
Compare
cguglielmo
approved these changes
May 5, 2026
DateColumnTableHeaderMenu: - Try to identify corresponding DateGroupType for custom date format pattern - Optimize column widths in filter table after changing date group type to prevent cutting off the content - Remove _contextMenu member, instead find popup by anchor - Use custom DateGroupTypeContextMenuPopup - Initialize filter with column.groupType, even when grouping is not active TableUiPreferences: - Use setGroupType() - Don't overwrite existing values with undefined if preference value is missing - Store groupType explicitly as "null" if grouping is not active DateColumn: - Create cached _groupTypeAxis when setting groupType - Add "applyGrouping" argument to setGroupType() to opt-out from automatically updating the table rows (useful if applying multiple changes to the table). ContextMenu: - Use initial value of 'cloneMenuItems' (e.g. set by constructor) if init model does not specify a value. Other: - Use DateUtility.toLocalDate() - Use removeGroupColumn() - Improve documentation - Add more tests
6988bcd to
80293ec
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
269392