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

Disabling mutually exclusive settings #1822

Merged
merged 8 commits into from
Oct 20, 2021

Conversation

kommunarr
Copy link
Collaborator

@kommunarr kommunarr commented Oct 16, 2021


Disabling mutually exclusive settings

Pull Request Type
Please select what type of pull request this is:

  • Bugfix

Related issue
closes #1468

Description

  1. Now correctly grays out & disables controls for mutually exclusive settings in External Player Settings when appropriate. Now disappears chunks of General Settings, Proxy Settings, & SponsorBlock settings when appropriate. (Disappears Invidious settings area under General Settings when Local API & no fallback API are set; disappears proxy & SponsorBlock options when those features are disabled.)
  2. Adds ability to disable ft-select elements by giving them the disabled attribute.
  3. Adds/improves styling for disabled ft-select, ft-button, ft-input, and ft-toggle-switch elements. Now makes it very visually clear that these controls are disabled. Their opacity is set to 0.4 when disabled, which is generally considered sufficiently grayed for accessibility purposes.

Screenshots (if appropriate)

Screenshot_20211016_003826

Screenshot_20211016_003849

Testing (for code that is not small enough to be easily understandable)
Tested; all controls work fine when not mutually exclusive & vice versa.

Desktop (please complete the following information):

  • OS: OpenSUSE
  • OS Version: Tumbleweed
  • FreeTube version: bleeding edge

Edit: As of 1b58fd2: when applicable, the Invidious settings, Proxy settings, and SponsorBlock settings are now disappeared instead of grayed out. Screenshots of the older version are visible in the earliest edition of this post in the edit history.

@PrestonN PrestonN enabled auto-merge (squash) October 16, 2021 04:27
@kommunarr kommunarr mentioned this pull request Oct 16, 2021
5 tasks
@efb4f5ff-1298-471a-8973-3d47447115dc

I like! Do u still need to more changes or can i approve?

@ChunkyProgrammer ChunkyProgrammer added the PR: waiting for review For PRs that are complete, tested, and ready for review label Oct 16, 2021
Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just curious as to what the criteria should be for whether something should be hidden or greyed out for future reference

@kommunarr
Copy link
Collaborator Author

kommunarr commented Oct 16, 2021

LGTM, just curious as to what the criteria should be for whether something should be hidden or greyed out for future reference

I would say if some setting or settings make the values of multiple other settings in the same tab irrelevant, those other settings should be hidden. In any other case the other setting(s) should be probably be grayed out. Graying out may also be favorable if hiding causes flexbox weirdness, but it's up to the discretion of the contributor.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PikachuEXE
Copy link
Collaborator

Local Test:
the change feels fine
As soon as the issue mentioned above solved this can be merged for me

PikachuEXE
PikachuEXE previously approved these changes Oct 19, 2021
Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally tested latest code

Copy link
Collaborator

@PikachuEXE PikachuEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have actually tested the latest code and forgot to approve
Oops

Copy link
Member

@ChunkyProgrammer ChunkyProgrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@PrestonN PrestonN merged commit 41fedf8 into FreeTubeApp:development Oct 20, 2021
@kommunarr kommunarr deleted the disabled-toggles branch October 20, 2021 13:26
@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Apr 10, 2022
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.

Automatically Disable toggle X when Toggle Y is enabled in settings page
5 participants