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

Make subreddit multireddits inherit the subreddit stylesheet #15

Open
13steinj opened this issue Nov 2, 2015 · 6 comments
Open

Make subreddit multireddits inherit the subreddit stylesheet #15

13steinj opened this issue Nov 2, 2015 · 6 comments

Comments

@13steinj
Copy link
Owner

13steinj commented Nov 2, 2015

For /pokechu22/reddit/fix-subreddit-multireddits

@Pokechu22
Copy link
Collaborator

If it helps, this is where the subreddit stylesheet applies, and the stylesheet_url property will probably work if added to LabeledMulti. Maybe something like this:

@property
def stylesheet_url(self):
    return self.owner.stylesheet_url if isinstance(self.owner, Subreddit) else ""

The other thing that would be useful is to add some class to the body to mark that it is a multireddit rather than a subreddit (given that one might want to style them differently).

@13steinj
Copy link
Owner Author

13steinj commented Nov 2, 2015

Way ahead of you. Just made the issue to remind myself to finish it.

I already have the stylesheet itself being inherited, as well as the url and https urls, and I added a multireddit-page class for subreddit multi pages, but I'm still working on the behavior for users with gold when they uncheck the stylesheet box (halfway broken) and I'm trying to figure out if a special change is needed in GET_stylesheet (there's a comment about poisoning the cache, and I don't know if the same process has to be done for multis.

@Pokechu22
Copy link
Collaborator

It still might be useful to have a multireddit-page-<multiname> class, so that one could style each multi differently.

@13steinj
Copy link
Owner Author

13steinj commented Nov 5, 2015

@Pokechu22 Will do.

Do you have any idea if what's applied here would need to be applied for multis or not? I don't have any problems...But then again I don't know why it's done in the first place.

@Pokechu22
Copy link
Collaborator

@13steinj I really have no clue. Does the /stylesheet page get applied to multis? Then it might be... but I'd ask someone who actually understands it.

@13steinj
Copy link
Owner Author

13steinj commented Nov 5, 2015

@Pokechu22 It doesn't get applied to multis as it is; it aborts with a 404. But I've no idea why c.site is actually being manually set; nor do I understand if should be "destaled" / why it needs to be, which was the cause for confusion. I'll ask on /r/redditdev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants