Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kennethbruskiewicz opened this issue Feb 3, 2025 · 1 comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@kennethbruskiewicz
Copy link
Collaborator

kennethbruskiewicz commented Feb 3, 2025

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 kennethbruskiewicz added documentation Improvements or additions to documentation good first issue Good for newcomers labels Feb 3, 2025
@ddooley
Copy link
Collaborator

ddooley commented Mar 6, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants