You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current flattened style causes a lot of duplication, which makes it hard to maintain consistency and add new actions to all views.
Describe the solution you'd like.
Create structs such as PostActions and CommunityActions, and use those as fields in view structs, instead of things like like_score being top-level fields.
Describe alternatives you've considered.
Maybe use shared structs that have more than just the actions.
Additional context
No response
The text was updated successfully, but these errors were encountered:
We'd also be able to use diesel_embed if we did that, which would make the selects a lot easier.
The downside would be that the views won't be as clear, especially since a lot of the actions are timestamps. But I'd still be in favor of this as it'd clean up the code a lot.
This would be good to include in 1.0.0 then, since it would change all the structs a lot.
After #5407 is merged, we can work on this. I can do it if no one else wants to, and because I did a lot of this already for the combined views. Or @dullbananas if you'd rather do it, lmk.
Requirements
Is your proposal related to a problem?
The current flattened style causes a lot of duplication, which makes it hard to maintain consistency and add new actions to all views.
Describe the solution you'd like.
Create structs such as
PostActions
andCommunityActions
, and use those as fields in view structs, instead of things likelike_score
being top-level fields.Describe alternatives you've considered.
Maybe use shared structs that have more than just the actions.
Additional context
No response
The text was updated successfully, but these errors were encountered: