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

vscode: support arbitrary profiles #914

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Flameopathic
Copy link
Contributor

closes #908

Copy link
Collaborator

@trueNAHO trueNAHO left a comment

Choose a reason for hiding this comment

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

LGTM.

I suppose this changes the previous breaking change to apply no profiles by default:

The VSCode theme is now only applied to the 'default' profile.

-- cbe42e2 ("treewide: rename wpaperd and vscode options (#905)")

In that case, I would merge this PR with the following commit message:

vscode: support arbitrary profiles

The VSCode theme is no longer only applied to any profiles by default.

Closes: https://github.com/danth/stylix/issues/908
Link: https://github.com/danth/stylix/pull/914

Reviewed-by: NAHO <[email protected]>

@Flameopathic
Copy link
Contributor Author

Flameopathic commented Feb 26, 2025

The VSCode theme is no longer only applied to any profiles by default.

I actually was meaning to have the default profile in the default list (like how I believe Firefox is?), but clearly I forgot to add that

Don't merge quite yet, please

edit: firefox does not actually theme any by default. in that case, i will follow that precedent

@Flameopathic Flameopathic force-pushed the vscode-profiles branch 2 times, most recently from f8537dd to be6241c Compare February 26, 2025 13:39
@trueNAHO
Copy link
Collaborator

The VSCode theme is no longer only applied to any profiles by default.

edit: firefox does not actually theme any by default. in that case, i will follow that precedent

AFAIK, there are plans to apply the Firefox theme by default. However, due to some problems this has not been done yet. Should we add the default profile in this PR?

@Flameopathic
Copy link
Contributor Author

AFAIK, there are plans to apply the Firefox theme by default. However, due to some problems this has not been done yet. Should we add the default profile in this PR?

what exactly are the problems? if we were to add the default profile in this PR, i'd want to open one for firefox as well

@trueNAHO
Copy link
Collaborator

AFAIK, there are plans to apply the Firefox theme by default. However, due to some problems this has not been done yet. Should we add the default profile in this PR?

what exactly are the problems? if we were to add the default profile in this PR, i'd want to open one for firefox as well

The relevant discussion is at #702.

@Flameopathic
Copy link
Contributor Author

The relevant discussion is at #702.

alright, so it seems like we're down to a judgement call between theming "default" by default or warning when the program is enabled but no profile is set for theming.

the former is the simplest and would result in the simplest behavior, but it is more likely that users are unaware that theming is not being applied

the latter has more complicated behavior but would ensure that the user knows when stylix theming is not being applied.

i prefer the latter behavior, as all the user has to do to disable the warning is to disable the module theming (or not enable the program)

@trueNAHO
Copy link
Collaborator

The relevant discussion is at #702.

alright, so it seems like we're down to a judgement call between theming "default" by default or warning when the program is enabled but no profile is set for theming.

the former is the simplest and would result in the simplest behavior, but it is more likely that users are unaware that theming is not being applied

the latter has more complicated behavior but would ensure that the user knows when stylix theming is not being applied.

i prefer the latter behavior, as all the user has to do to disable the warning is to disable the module theming (or not enable the program)

Enabling a Stylix profile by default would align with Stylix's philosophy of "it just works".

@Flameopathic
Copy link
Contributor Author

Flameopathic commented Feb 28, 2025

Enabling a Stylix profile by default would align with Stylix's philosophy of "it just works".

the issue is that will only "just work" if they happen to use the Stylix profile

if we really wanted it to just work, we could try to poll config.programs.vscode.profiles for all set profiles (if that is even possible) and default to theming all set profiles. i suspect we would have some infinite recursion problems with this, though.

@Flameopathic Flameopathic force-pushed the vscode-profiles branch 5 times, most recently from ced3d59 to 13b512e Compare February 28, 2025 19:10
@trueNAHO
Copy link
Collaborator

Enabling a Stylix profile by default would align with Stylix's philosophy of "it just works".

the issue is that will only "just work" if they happen to use the Stylix profile

if we really wanted it to just work, we could try to poll config.programs.vscode.profiles for all set profiles (if that is even possible) and default to theming all set profiles. i suspect we would have some infinite recursion problems with this, though.

I do not know how VSCode profiles work. Is it not possible to enable our Stylix profile without breaking other profiles?

@Flameopathic
Copy link
Contributor Author

Flameopathic commented Feb 28, 2025

if we really wanted it to just work, we could try to poll config.programs.vscode.profiles for all set profiles (if that is even possible) and default to theming all set profiles. i suspect we would have some infinite recursion problems with this, though.

i attempted the naive solution and ended with infinite recursion, as expected. i can't think of any way to get around the infinite recursion but am willing to pursue it with some help.

for now, i implemented a warning with the proposed behavior. i think that this would be good behavior for both vscode and firefox.

Is it not possible to enable our Stylix profile without breaking other profiles?

i believe that enabling our Stylix profile would work but no other would be themed and thus most people would not notice that it was available.

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.

vscode: support other profiles
2 participants