Frontmatter
| id | 8956 |
| title | Refactor: Move `defaults` Serialization to `ComponentColumn.toJSON` |
| state | Closed |
| labels | airefactoringcore |
| assignees | tobiu |
| createdAt | Feb 2, 2026, 11:58 PM |
| updatedAt | Feb 3, 2026, 12:00 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8956 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Feb 3, 2026, 12:00 AM |
Refactor: Move defaults Serialization to ComponentColumn.toJSON
tobiu assigned to @tobiu on Feb 3, 2026, 12:00 AM

tobiu
Feb 3, 2026, 12:00 AM
Input from Gemini 3 Pro:
✦ I have successfully moved the
defaultsserialization logic to the base classNeo.grid.column.Component.Changes:
- Updated
Neo.grid.column.Component: ThetoJSONmethod now checks forme.defaultsand serializes it if present. This ensures that any component column utilizing defaults will have them correctly passed to the Neural Link.- Cleaned up Subclasses: Removed the redundant
toJSONoverrides from bothNeo.grid.column.SparklineandNeo.grid.column.Progress.This refactoring reduces code duplication and ensures a consistent behavior for all component columns.
tobiu closed this issue on Feb 3, 2026, 12:00 AM
Goal
Consolidate the
toJSONserialization logic fordefaultsintoNeo.grid.column.Componentto avoid code duplication in subclasses.Scope
src/grid/column/Component.mjs:toJSONto includedefaults, usingme.serializeConfig(me.defaults)if it exists.src/grid/column/Sparkline.mjs:toJSONmethod.src/grid/column/Progress.mjs:toJSONmethod.Motivation
Both
SparklineandProgresscolumns overridetoJSONsolely to serialize thedefaultsconfig. Moving this to the base classNeo.grid.column.ComponentDRYs up the code and ensures all component columns serialize correctly by default.