-
Notifications
You must be signed in to change notification settings - Fork 329
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
Add route to get brew styling #3075
Add route to get brew styling #3075
Conversation
What is this branch blocked by? |
The User Themes PR #3321 implemented a recursive form of this (retrieve CSS, and also @include CSS from parent theme, which calls it's parent theme, etc.), but that has since been overridden with a dedicated However, it has been requested that we still implement a CSS-only endpoint but just for individual brews, not recursively, which leads us back here. I'm going to copy here the recursive implementation from #3321 along with its test cases, as I think there is still some bits that might be helpful in finishing out this PR: CSS Retrieval
Testing
|
Now that we have a dedicated /theme/ route for the recursive theming, the CSS endpoint can be simpler for only getting the `style` of a single brew. naturalcrit#3075 already has this simpler version, but no testing, so I have copied this into a comment there for implementation when it is ready.
You can functionally get the present theme with the bundle endpoint as they are ordered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems functional.
Can we just add two test cases? One for when the :id
exists, and one where it doesn't? I.e. make sure we handle the error OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too
@G-Ambatte is there something left to do here? |
I just added a couple more checks to the "successful" test, to test if we are sending a 200 status and that the content of the response is just the plain CSS content. Going to merge now. Thanks all! |
This PR resolves #1097.
This PR adds the
/css
route, which returns the stylesheet for a given brew share ID.