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

more default setting work #2262

Closed
wants to merge 14 commits into from
Closed

more default setting work #2262

wants to merge 14 commits into from

Conversation

raszpl
Copy link
Contributor

@raszpl raszpl commented May 10, 2024

This covers all switching functions:
select
switch
checkbox
slider
colorPicker

Now picking default option/value automatically removes config variable from storage.
Next step after merging this will be adding function pruning config from unneeded default stored variables for all users called on extension update. After that we can finally start optimizing /web-accessible/ code.

@ImprovedTube
Copy link
Member

ImprovedTube commented May 16, 2024


1. default:true vs. 2 inverted switches (1. which shall be listed in active features too by default, 2. which are just "trashbin candidates" together with everything called hide / remove and a list of youtubes experiment flags )
& #1685


pruning config from unneeded default stored variables for all users called on extension update

Might first start collecting statistics. Since the amount (=toggled off) represents the past and might point to bugs etc. already (besides that the future data will be better in that, and this might also just define curious users, who tried everything and busy users who didnt.)


@raszpl
Copy link
Contributor Author

raszpl commented May 16, 2024

we can add commits here o replace the 17+ times ===! false here with noticing when the key was removed.

1 No need, this commit works as is. nothing else needs to be changed.
2 ===! false are for things that only work in disabled state. This commit doesnt break those.

// REACTION OR VISUAL FEEDBACK WHEN THE USER CHANGES A SETTING (already automated for our CSS features):

still works fine with this commit. Every time config variable gets removed a message reflecting that is still send and triggers

document.addEventListener('it-message-from-extension', function () {

1. default:true vs. 2 inverted switches

we currently have: (old news:) 3 defaults at installation (extra buttons below the player. Thanks for caring at #2085),

  • (which always appeared inverted in "my active features", in favor of the inverted ones😲. Yet should even appear as "my active features(3)" on the front screen . as a workaround currently they could have the skeleton value false and be enabled at installation in background.js )

more perils of faking showing something enabled by default. "my active features" shows only things User changed from defaults.
In particular case of "Extra buttons below the player" there is not enough room in the spot where they are being injected in the first place so enabling them by default is IMO a bad idea. On videos with long channel name they show up really small/almost invisible/invisible. Can you spot them here:
Clipboard02
:) they are really there I promise:
Clipboard01

this is why I abandoned by rewrite of those buttons https://github.com/raszpl/YouTube-Extension/commits/repeat-wip/ imo they dont work well

  • could alternatively only have an inverted switch/light by default visually only/CSS, just indicate YouTube's default and that it might be nice/performant to get rid of these

something like https://www.oo-software.com/en/shutup10 asks if you want to apply recommended settings before letting user custom configure. Maybe an option called "apply recommended settings", or "show recommended settings". Can work like "my active features" listing only differences between current and recommended with recommended selection flashing green or something.

  • and use another skeleton value "inverted=true".
  • (or could be called negated NOhdr or hdrOFF in the code. )

why invert something twice? :o

Im thinking of a way for automatically visualize select/switch/slider/colorPicker default selection in certain way so User can clearly see whats the default when switching.
Select dropdown menu can automatically append (default) text label.
Slider can add second grey dot in the default spot.
Switch a grey circle in default position.
etc etc

pruning config from unneeded default stored variables for all users called on extension update

Might first start collecting statistics. Since the amount (=toggled off) represents the past and might point to bugs etc. already (besides that the future data will be better in that, and this might also just define curious users, who tried everything and busy users who didnt.)

statistics are cool and all, but think about privacy and Google policies. Slurping user data, no matter how trivial, without consent is a big no no and might end up banning the extension.

The developer has disclosed that it will not collect or use your data.

Only Google/Microsoft/Facebook are allowed to do that :)

@ImprovedTube
Copy link
Member

ImprovedTube commented May 29, 2024

hi! @raszpl

Not those checking for " === false" , like transcript. (Can only be switched off live without #2262.) Need to search the repo for === false ( and === true for those "default true"'s which aren't actually "default-true"'s but inverted switches )

buttons below the player

yes! See: #377 (comment)
(And the thread #1445 isn't really younger (reposted))

And yesterday: #2086 (comment) (This will be good for most users and increase use (Since many people dont) use many extensions, and just want to find something on the youtube side itself. You might also remember Magic actions for youtube's little player button expanding as a 3x3 or so (may it changed by now)

why invert something twice? :o

sorry, they be 0x inversion but just 1x visual variant somehow maybe? ( check box/toggle: off = in the trashbin = lights off. )

Slider can add second grey dot in the default spot.

yes, good for sliders! while a normal checkboxes or toggles should be very obvious already (a 3-way toggle can use a dot too -1 0 1)

statistics

#1972 (comment)
Yes, currently collects no data. That can be adjusted (within meaningful and legal boundaries).
Anonymously ranking features by stability and popularity is a specific main feature. And hardly of of interest. (Chrome Web Store lists three types specifically: storing data beyond main functionality, selling identified user's data for specifally for creditworthiness checks or anything) (BTW, Google analytics used to be the main 3rd party for proving statistics and having annonymized data only, besides it seems July, after many years google analytics is moving to a new version and deleting trillions data points. ( https://github.com/code-charity/youtube#-behind-the-scenes ) )

@ImprovedTube
Copy link
Member

( https://github.com/search?q=repo%3Acode-charity%2Fyoutube+AND+%28%22%3D%3D+false%22+OR+%22%21%3D+false%22%29&type=code

to be merged after removing the inverted switches? (but labeling them for performance or for tidying and or giving them an inverted toggle that's lighted when off (toggle on the left) and in a different color) - Or just checking that none of them checks for === true)

(and we can make defaults appear in active settings)
)

@raszpl
Copy link
Contributor Author

raszpl commented Jul 5, 2024

It was soo long I will need to go over the code again to resolve all merge conflicts

to be merged after removing the inverted switches?

no, the patch is standalone, it only changes how Satus works (automatically picks up what is default so it doesnt have to store redundant default values), what was false is still false, I didnt change any Settings meaning
oh, now I get it, had to jolt my brain, the patch was so long ago :) Yes and no.
None of the === false things ran properly to begin with on fresh install, but they could use fixing now as they will stop working even after user actually did flip something True and then back to False.

this part threw me off:

(but labeling them for performance or for tidying and or giving them an inverted toggle that's lighted when off (toggle on the left) and in a different color) - Or just checking that none of them checks for === true)

The way I see it any feature that relied on this behavior was broken by design. It lied to user :)

(and we can make defaults appear in active settings) )

Thats the next exciting step! Try to design a clever way of conveying that information. A small image with "default" text? a different color? an icon? Im not great at designing new visual things :-)

@raszpl raszpl marked this pull request as draft July 5, 2024 03:25
@raszpl
Copy link
Contributor Author

raszpl commented Jul 5, 2024

Was watching a movie just now when it hit me - NO. We dont need to change anything for those === false settings because after this patch those can all get value: false, in the appropriate /menu/skeleton-parts/ files = Satus will automagically recognize False is the active setting and store False but delete when user switches to True,

@ImprovedTube
Copy link
Member

purpose was only store true #1685, so cant check === false for
you can keep it possible to merge so i might also finish it soon.
didn't mean to distract.

@raszpl raszpl closed this by deleting the head repository Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants