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

Structure code into SDK #202

Open
enemeth19 opened this issue Mar 19, 2021 · 3 comments
Open

Structure code into SDK #202

enemeth19 opened this issue Mar 19, 2021 · 3 comments
Labels
enhancement New feature or request on hold This issue might be worked on in the future

Comments

@enemeth19
Copy link
Collaborator

No description provided.

@enemeth19 enemeth19 added the on hold This issue might be worked on in the future label Apr 18, 2021
@enemeth19 enemeth19 reopened this Oct 15, 2021
@enemeth19 enemeth19 added enhancement New feature or request and removed on hold This issue might be worked on in the future labels Oct 15, 2021
@enemeth19 enemeth19 changed the title Revamp code with SDK Structure code into SDK Oct 15, 2021
@kaczmarj
Copy link
Contributor

this is a great idea imho

@kaczmarj
Copy link
Contributor

i've been looking into eslint to lint/format our code (see #332), and i get the feeling that restructuring this codebase as an SDK (presumably with modules) would clean up the organization and make it more explicit where variables / functions are defined and used.

@kaczmarj
Copy link
Contributor

i started doing a little work on this using ecmascript 6 modules. my thoughts so far:

  • it doesn't seem like this can be an incremental change. in other words, we can't sprinkle in export and import statements little by little. given this, i think we will need to plan a time to do this. some PRs should probably be merged before this, like the localstorage caching work.
  • there are some global state variable that i think should all go in one module (state.js). for example, this includes allClinicalData and perhaps the data for the select boxes. those variables are defined in the html but also referenced throughout the javascript code. it feels cleaner and more organized to me to put those stateful variables in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request on hold This issue might be worked on in the future
Projects
None yet
Development

No branches or pull requests

2 participants