stylix icon indicating copy to clipboard operation
stylix copied to clipboard

{firefox, floorp, librewolf}: add better default and remove warning

Open Mikilio opened this issue 8 months ago • 10 comments

Things done

I like about stylix that it is as no-config as it can get with styling. As such, I didn't like that I have to specify which FF profiles I'm using, when for most it will be just "Default". I removed the warning and added a default that applies to most people without removing any configurability.

Additionally, I would personally like it if one of the coloring options was enabled by default. The Firefox module is really the only one breaking this "no config" expectation. All other programs just style in some way by default.

I get that this option has been added because there is no way to augment submodules without introducing infinite recursion. I learned that while trying to fix it. But until there is a better solution to this (like improving the module system from nixpkgs) I think this is better that warning.

Notify maintainers

Mikilio avatar Apr 22 '25 11:04 Mikilio

The best way that I can imagine this working is if we retrieve all set Firefox profiles and use that list to theme them. Unfortunately, I have been unable to find a way to do that without causing infinite recursion.

I am opposed to setting a static default profile name for Firefox because (I believe) profile names are not significant. That is why #963 was done and kept (unlike the warning from #914 which was removed in #1015).

Flameopathic avatar Apr 22 '25 13:04 Flameopathic

That's alright! However, I lean towards "it just works" philosophy and I believe empty defaults and warnings are silly and don't actually help anyone, while a good default helps most.

The warning can also be shown only when there are profiles not in profileNames. I can add that to the draft if wanted.

Mikilio avatar Apr 22 '25 13:04 Mikilio

Additionally, I would personally like it if one of the coloring options was enabled by default.

This is a bad idea because it would require us to set extensions.force to true which shouldn't be enabled by default

0xda157 avatar Apr 22 '25 14:04 0xda157

That's alright! However, I lean towards "it just works" philosophy and I believe empty defaults and warnings are silly and don't actually help anyone, while a good default helps most.

I agree with "It just works", but I don't believe that we can say "It just works" when it doesn't work unless you're using a profile whose name happens to align with the defaults.

The warning can also be shown only when there are profiles not in profileNames. I can add that to the draft if wanted.

That would be interesting, and it would limit the number of people who have to see the warning, which is good. It is possible that people have some profiles which they want themed and other which they don't, though, so we would need to add an option to disable the warning.

Flameopathic avatar Apr 22 '25 15:04 Flameopathic

@awwpotato I added the mentioned changes.

Mikilio avatar Apr 27 '25 13:04 Mikilio

Thank you all for your patience! That should be it.

Mikilio avatar May 08 '25 00:05 Mikilio

We love rebuilds :)

Mikilio avatar May 08 '25 18:05 Mikilio

With regards to that it changes nothing. To know which profiles we need to edit we need to evaluate the set with the profiles. Unless we configure an extra list with profiles (Like here). For the majority of people that don't modify firefox there is now a sensible default.

I don't think leaky encapsulation is the right term for it as nothing really is getting leaked. And in the nix language nothing really is encapsulated. But I don't want to exclude the possibility that I did not understand what this talk is about.

I can think of some ways to solve this on the hm and nixos level or the module system level but not here on stylix. Basically it's a scenario that wasn't thought of when designing submodules (in the nix modules context)

Mikilio avatar May 12 '25 11:05 Mikilio

Ignore the build failures, please. After the conversations are resolved, I have to rebase anyway.

Mikilio avatar May 12 '25 13:05 Mikilio

Alright then! Off the list, I'd say 🚀

Mikilio avatar May 23 '25 05:05 Mikilio

What is the status of this PR?

Flameopathic avatar Jun 15 '25 00:06 Flameopathic

it has been refactored so hard that I basically have to start fresh, meanwhile I also noticed that firefox should probably just be removed from auto-enable instead of writing all those warnings.

Mikilio avatar Jun 15 '25 16:06 Mikilio