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

Add a util function which loads defaults from info.json files #628

Closed
harshkhandeparkar opened this issue Jan 7, 2019 · 5 comments
Closed

Comments

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Jan 7, 2019

Please describe the problem (or idea)

In #607 the default values for some modules were changed in the info.json files but subsequent changes were not made to the module.js files which led to issues like #616 in which the html renders the default value but the sequencer doesn't

Possible Solution

We could add a new util function in src/util directory which will load all the default values from ./info.json file and return an object based on those. This function can be used in any module.js file if required like for e.g

const defaults = require('../../util/getDefaults.js')();

This will be helpful as all the defaults can be managed from the module info.json files and there will be no need to manage more than a single file.

@gitmate gitmate bot added HTML module New Module idea labels Jan 7, 2019
@gitmate
Copy link

gitmate bot commented Jan 7, 2019

GitMate.io thinks possibly related issues are #262 (Add Tests for getStep function), #344 (Add a function to create a gif from the outputs of all steps), #512 (add "take a photo" as alternative to "Choose file" in initial load image step), #26 (Break out longer functions into sub source files and require in), and #570 (Add Valid HTML Types To Module info.json Files).

@harshkhandeparkar
Copy link
Member Author

@Mridul97 do you want to work on this? If not then I will.

@Mridul97
Copy link

Mridul97 commented Jan 7, 2019

Yes, I would like to work on this!

@gitmate
Copy link

gitmate bot commented Jan 7, 2019

GitMate.io thinks possibly related issues are #262 (Add Tests for getStep function), #344 (Add a function to create a gif from the outputs of all steps), #512 (add "take a photo" as alternative to "Choose file" in initial load image step), #26 (Break out longer functions into sub source files and require in), and #570 (Add Valid HTML Types To Module info.json Files).

@harshkhandeparkar
Copy link
Member Author

Yes, I would like to work on this!

Awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants