Refactor `utils`
This isn't priority, but I wanted to track it.
We currently have a utils
that we import from src/webapp/src/utils
. The various utils are sectionalized and organized, they just aren't in separate files. They are sectionalized via:
// Path Utils
// Color Utils
// Collection Utils
// String Utils
// Date Utils
Naturally, their current usage in the app would need to be updated along with any refactor that extracted them into distinct files. There are a few utility functions that are not general. Currently these are:
concatLoaderModelDesign
docsUrl
getConnectorLogoUrl
snowflakeAccountParser
-
requiredConnectorSettingsKeys
)
We need to determine the best home for them (I considered creating a utils.js
adjacent to the /components/...
that use them, but did not yet).
From an API standpoint I'm also considering if we should have a root utils
object from which each sectionalized util theme is nested (but is still defined in its own file for organizational purposes). For example: utils.data.dateIso8601
and utils.path.apiRoot
.
Open to suggestions and recommendations as well.