| Post Reply | RetroFed Forum Forum Index » PieFed Meta |
| Author | Message | ||
|---|---|---|---|
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
For the newest piefed release, I worked on a new feature, that allows community admins to choose a "community theme", which overrides the users theme while they are browsing the specific community. This works for every user on piefed, that has the newest version, it unfortunately won't show up on lemmy, because they have a completely different theming system. There are already some cool themes to choose from (the themes, that the users could pick from before), but the idea with this, is that you can create your own themes for your community and propose it to our Codeberg repository. I am sure you have many ideas, that are even cooler and I really hope that piefed get's even more wild and interresting with this update! (PS: I know that the screenshot is of a lemmy community and that this wouldn't work, it's just meant as an example) |
||
| 128 Original | |||
Snoopy
piefed.social
Snoopy@piefed.socialJoined: 2025-02-25 |
Shame for the screenshot but very cool :D A wiki page that help with theming would be great :) |
||
| 15 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
Shame for the screenshot but very cool :D A wiki page that help with theming would be great :)
There is a theming guide on our Codeberg, if you are interested: https://codeberg.org/rimu/pyfedi/src/branch/main/docs/developer_docs/09_Theming_Guide.md |
||
| 14 | |||
Snoopy
piefed.social
Snoopy@piefed.socialJoined: 2025-02-25 |
There is a theming guide on our Codeberg, if you are interested: https://codeberg.org/rimu/pyfedi/src/branch/main/docs/developer_docs/09_Theming_Guide.md
Oh thank, wonderful...i have lot to catchup 😅 Mmm i will create a link to this page and a minimale wiki page. I would be also great to check out the wiki of fedican :) |
||
| 7 | |||
|
Hond
piefed.social
Hond@piefed.social Joined: 2025-08-28 |
Cool, but for anybody wondering like me if you can disable it. Yup, there is an option for it. |
||
| 33 | |||
lumpenproletariat
quokk.au
Deceptichum@quokk.auJoined: 2025-06-09 |
This is awesome. Is there a user option to override it and continue to use the users theme? Also do themes have to be added to the codeberg? If an admin uploads it directly for their instances directory would that work, and would browsing that from a different instance load it or would they also need the theme in their files? |
||
| 6 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
This is awesome. Is there a user option to override it and continue to use the users theme? Also do themes have to be added to the codeberg? If an admin uploads it directly for their instances directory would that work, and would browsing that from a different instance load it or would they also need the theme in their files?
Yeah, unfortunately it will only work for servers, that have the theme in their files, so you would have to propose it to the repo. |
||
| 2 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
This is awesome. Is there a user option to override it and continue to use the users theme? Also do themes have to be added to the codeberg? If an admin uploads it directly for their instances directory would that work, and would browsing that from a different instance load it or would they also need the theme in their files?
And, to your other question, there is an option in the user settings to disable community themes. |
||
| 6 | |||
lumpenproletariat
quokk.au
Deceptichum@quokk.auJoined: 2025-06-09 |
Yeah, unfortunately it will only work for servers, that have the theme in their files, so you would have to propose it to the repo. This is mainly because of security concerns, because there are a lot of ways to inject malicious Javascript code into a theme, and we don't want that federating across piefed.
That’s a fair enough reason. Shame it has to be that way, hope it doesn’t lead to bloat with hundreds/thousands of community themes. |
||
| 1 | |||
lumpenproletariat
quokk.au
Deceptichum@quokk.auJoined: 2025-06-09 |
And, to your other question, there is an option in the user settings to disable community themes.
I remember Reddit had a little tick box for each community? There was a benefit to blocking some obnoxious ones but keeping good ones, might be something to look into for a future update. |
||
| 5 | |||
|
Link
rentadrunk.org
Link@rentadrunk.org Joined: 2023-09-05 |
Yeah, unfortunately it will only work for servers, that have the theme in their files, so you would have to propose it to the repo. This is mainly because of security concerns, because there are a lot of ways to inject malicious Javascript code into a theme, and we don't want that federating across piefed.
Any reason the themes can’t just be CSS and no JavaScript? This would prevent the risk. |
||
| 3 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
Any reason the themes can’t just be CSS and no JavaScript? This would prevent the risk.
There are a lot of ways to inject javascript into css aswell. With @import, if you just escape css with </style> and so many more. It would be a herculean task to really sanitize css so that it's fully safe unfortunately and if we were to make any mistake, that would pose a massive security risk for our users. |
||
| 3 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
I remember Reddit had a little tick box for each community? There was a benefit to blocking some obnoxious ones but keeping good ones, might be something to look into for a future update.
Yeah, that's a good idea, I'll try to implement that in a future update. |
||
| 6 | |||
Sunshine
piefed.zip
Sunshine@piefed.zipJoined: 2025-06-25 |
Will look great on the Pip-Boy! |
||
| 4 | |||
wjs018
piefed.wjs018.xyz
wjs018@piefed.wjs018.xyzJoined: 2025-07-15 |
Yeah, that's a good idea, I'll try to implement that in a future update.
To do this on a per-community basis, it might make sense to store it in the session cookie rather than in the db. Look for instances of Some user settings are stored in the cookie to look at as an example; stuff like the compactness level, low bandwidth mode, etc. Basically anything that is set on a per-device basis rather than stored in the db. |
||
| 2 | |||
Otter
lemmy.ca
otter@lemmy.caJoined: 2023-06-05 |
That was my next question, thank you @DeckPacker@piefed.social for working on this! |
||
| 4 | |||
DeckPacker
piefed.blahaj.zone
DeckPacker@piefed.blahaj.zoneJoined: 2026-03-07 |
To do this on a per-community basis, it might make sense to store it in the session cookie rather than in the db. Look for instances of response.set_cookie and request.cookies.get to see other examples of where we do that. Some user settings are stored in the cookie to look at as an example; stuff like the compactness level, low bandwidth mode, etc. Basically anything that is set on a per-devic...
Disabling a particularly annoying theme seems to me like something you would wanna do on every device, no? Maybey it would make sense to store the user theme in a cookie though, because that is a thing, you may want to be different on different types of devices. Do you know, how long such a cookie lasts? |
||
| 3 | |||
Blaze
piefed.zip
Blaze@piefed.zipJoined: 2025-06-13 |
Great ! |
||
| 1 | |||
Tuuktuuk
nord.pub
Tuuktuuk@nord.pubJoined: 2026-02-08 |
I could imagine wanting to disable this on a per-community basis. I really like the idea, but eventually some community I'd otherwise enjoy is bound to invent a personalized style that is, for reason or another, not good for mybuse andbI will then have to disable the feature for all communities :( (As a workaround: will this be doable as additional CSS?) |
||
| 6 | |||
wjs018
piefed.wjs018.xyz
wjs018@piefed.wjs018.xyzJoined: 2025-07-15 |
Disabling a particularly annoying theme seems to me like something you would wanna do on every device, no? Maybey it would make sense to store the user theme in a cookie though, because that is a thing, you may want to be different on different types of devices. Do you know, how long such a cookie lasts?
My thinking on a per-device basis was that themes might work better/worse in a mobile vs. desktop browser, so people might prefer different experiences, but I could see the other side of things as well. That was also the rationale for making compact mode be in the cookie rather than saved in the db. I honestly don't know what the expiration of the session cookie is. It might depend on the browser. I think it is pretty long-lasting unless people clear their cache because I have definitely loaded up piefed instances after a long time and have still been logged in. As for technical details, to save space, it might make sense to make a key (maybe like |
||
| 1 | |||
| Post Reply |
Back to top |