ScratchTools icon indicating copy to clipboard operation
ScratchTools copied to clipboard

Add boolean option settings

Open rgantzos opened this issue 3 years ago • 14 comments

Right now, there's only one type of settings option: text input. We should add booleans, like miniature switches that you can turn on and off. It would be super helpful for enabling and disabling smaller features within features.

rgantzos avatar Sep 27 '22 19:09 rgantzos

Can I work on it?

devilkiller-ag avatar Sep 28 '22 05:09 devilkiller-ag

Can I work on it?

Sure!

rgantzos avatar Sep 28 '22 13:09 rgantzos

hi i would like to work on it.....

ojninja16 avatar Oct 04 '22 08:10 ojninja16

I would like to work on this

achiverram28 avatar Oct 04 '22 09:10 achiverram28

@achiverram28 @ojninja16 alright!

rgantzos avatar Oct 04 '22 14:10 rgantzos

Could you glance through how to start our work , how should we proceed

achiverram28 avatar Oct 05 '22 00:10 achiverram28

If this issue is still open, I would like to work on it!

YashM246 avatar Oct 05 '22 06:10 YashM246

Is it possible for me to be assigned to this task?

YashM246 avatar Oct 05 '22 07:10 YashM246

@devilkiller-ag @YashM246 @achiverram28 @ojninja16

Each feature (in the /features/features.json file) has the option to add options to their features that users can set.

The /extras/popup.js file is what displays the options.

rgantzos avatar Oct 05 '22 15:10 rgantzos

Ok. so how should we proceed and what changes we should make , please give us a detailed overview

achiverram28 avatar Oct 05 '22 18:10 achiverram28

Yes, please guide us.

devilkiller-ag avatar Oct 05 '22 18:10 devilkiller-ag

Alright, so:

At this line, there's an array with a list of options. You can currently add as many as you want, but they just look for string values.

At this line, the JS file creates the actual element for which users can enter the value for the option. It sets the function for saving the options and everything. What we need is a way for the features.json file to specify whether it's a string or a boolean, and, if it's a boolean, will create a slider similar to the one that features use for enabling and disabling (image attached).

All the javascript still works completely, the only thing you would need to change is how the popup.js file interprets the options for whether it's a boolean or a string.

Screen Shot 2022-10-05 at 11 46 05 AM

rgantzos avatar Oct 05 '22 18:10 rgantzos

If this issue is still open, I would like to be assigned to it!

SayuruRehan avatar Oct 11 '22 05:10 SayuruRehan

Should this maybe be closed?

StioStudio avatar Jul 31 '24 22:07 StioStudio