DataHarmonizer icon indicating copy to clipboard operation
DataHarmonizer copied to clipboard

Rearrange imports of components in lib/ to facilitate long-term refactoring of responsibilities.

Open kennethbruskiewicz opened this issue 10 months ago • 1 comments

Currently, lib/ is organized like the following:

lib/
   <directories>/
   AppContext.js
   DataHarmonizer.js
   Toolbar.js
   toolbar.css
   toolbar.html
   Footer.js
   HelpSidebar.css
   HelpSidebar.js
   [...]

The directories organize components flat. Instead, if we organize like this:

lib/
   <other directories>/
   DataHarmonizer/
       data-harmonizer.css
       DataHarmonizer.js
   Toolbar/
       Toolbar.js
       toolbar.css
       toolbar.html
    HelpSidebar/
       HelpSidebar.js
       HelpSidebar.css
    [...]

... it would make it simple to organize functionality that are in large files like Toolbar.js and DataHarmonizer.js into separate modules while maintaining cohesion. For instance:

lib/
   <other directories>/
   DataHarmonizer/
       GridManager.js         // Encapsulates Handsontable configuration and UI logic
       TemplateProcessor.js   // Handles template queries, field merging, section sorting....
       [...]
       data-harmonizer.css
       DataHarmonizer.js
    [...]

This would be a small patch but coherent on its own. It would be a step to make the codebase more testable and consistent.

kennethbruskiewicz avatar Feb 03 '25 19:02 kennethbruskiewicz

This would help make the hierarchy of components clearer. Just sorting through core code right now but I think after 1m commit we could do this reorganizations.

ddooley avatar Mar 06 '25 20:03 ddooley