polyamspace / mastodon

Custom Mastodon fork used by https://polyam.space
GNU Affero General Public License v3.0
1 stars 2 forks source link

Add admin setting to customise dark/light skin in system theme #545

Closed polyamAdmin closed 5 months ago

polyamAdmin commented 5 months ago

Fixes #544

Adds settings to customise dark/light skins used in system skin.

While the settings are flavour-depended, the helper and implementation currently isn't, so setting dark skin to homogay in polyam flavour will also apply to glitch flavour. This is not ideal, but should a skin not exist, it should fallback to the defaults.

Preview: Screenshot of appearance admin settings showing the new dark skin and light skin settings below the flavour and skin setting

polyamAdmin commented 5 months ago

Not sure what's up with the test suite, but failures seem unrelated to changes

Actually, it was the use of the helper. I'm not sure why that causes the precompile to try to access Redis.

Needed to add system_skins to assets.rake to prevent lookup in redis during precompile.

polyamAdmin commented 5 months ago

Hmh this is a lot more complicated than I anticipated with the theming system.

polyamAdmin commented 5 months ago

Actually, I think hiding the settings unless system skin is selected is counterproductive, since users can still set their skin to system and it would still use admin selected skins.

This might also be good to add as a user setting. (Planned as follow-up)

polyamAdmin commented 5 months ago

Hmh a different approach to deal with multiple flavours would be to only allow setting the skins to ones available in all flavours. This would be a pain point for instances focusing on a specific flavour though.

polyamAdmin commented 5 months ago

Honestly, at least for the admin setting it would be way easier to just do it with the theming system.