NeuromatchAcademy / mastodon

A glitchy but lovable microblogging server
https://glitch-soc.github.io/docs/
GNU Affero General Public License v3.0
7 stars 2 forks source link

Myspace Mode - Chapter 1: User Custom CSS #63

Closed sneakers-the-rat closed 2 months ago

sneakers-the-rat commented 3 months ago

This is the first PR of Myspace Mode.

This PR adds the ability to set user-custom CSS in the profile settings page, and it is then applied on the account page.

Wiki page: https://wiki.neuromatch.social/Myspace_Mode

Screenshot 2024-08-28 at 2 25 48 AM Screenshot 2024-08-28 at 2 26 32 AM

Implementation

Implementation is just about as straightforward as you can be. Added a nullable text column to an account, added it to a form, put it in the haml template when viewing that account's page.

re: the name - i didn't want to just call it css or custom_css because i also want to add the ability to add css that gets applied for you when you are viewing the rest of the site - so "public account css that styles your profile" and "let me tweak the way masto looks for myself real quick" as two separable things

TODO

sneakers-the-rat commented 2 months ago

ok @hobgoblina this works now, with css changing on page transitions and not requiring haml embeds and stuff, but i can't get the test to work, it seems to not be running the before do block or something? if you have any idea why that's not working we can fix it, otherwise there are only like 8 end to end tests in masto and it might be ok to not have it? the react testing sorta sucks