Don't request category default filters on pages that don't have categories#1827
Don't request category default filters on pages that don't have categories#1827
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cellio
left a comment
There was a problem hiding this comment.
I tested to make sure all affected pages load fine and they do. There are other pages that don't have categories (search results and help are the ones that immediately came to mind); I assume that we can make a similar change there later but don't need to do anything now? (The pages look fine in my testing.)
I started to review the JS but quickly got in over my head. Left a couple markers in places where I'd figured out that an apparent diff isn't (to help future reviewers), then bailed on that part. We'll need someone more fluent there.
Is the brace style that Prettier doesn't support one that our JS-facing team prefers, or has just inherited? Would there be any objection to adopting Prettier's style? Is the decision affected by whether Prettier will autoformat so we don't have to make any manual changes? |
@trichoplax Stroustrup's brace style is in our style guidelines and, I believe, @ArtOfCode- prefers it too. I personally don't have an opinion on the matter (I rarely do when it comes to formatting - happy to work with any as long as a formatter can be configured to automatically bring code into required shape). The other brace style (same line) is much more common, though, for JS, and will save us from having to add a plugin, but it's not my decision to make (we might also want to try an alternative formatter - I just haven't used any except for Prettier for years at this point, it's extremely popular and is quite polished, even if very opinionated). Deferring to @ArtOfCode- |
I feel the same way. Only asked in case it would save us a dependency (if everyone happens to not mind). |
Partially addresses #1808 (unnecessary requests for category default filters on pages that don't have a category such as user tabs). As a side-effect, finally adds proper Prettier config to format our JS assets (note that prettier-plugin-brace-style is needed to support our choice of brace style - Prettier's team is dead set on not supporting it).