-
Notifications
You must be signed in to change notification settings - Fork 135
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 support for generic timeline #525
Conversation
Codecov Report
@@ Coverage Diff @@
## master #525 +/- ##
==========================================
+ Coverage 34.35% 39.83% +5.48%
==========================================
Files 68 72 +4
Lines 8104 9368 +1264
Branches 1923 2219 +296
==========================================
+ Hits 2784 3732 +948
- Misses 4538 4580 +42
- Partials 782 1056 +274 |
051bb5c
to
f938ae6
Compare
b89b07b
to
a01341d
Compare
also run migration before compiling, so schema.rs is up to date
still miss tests and query integration
and refactor other tests to use begin_transaction
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.
at first glance this looks good. I'll run some tests when I get the time, to make sure all is 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.
I think you are not calling the query parser when handling local like/reshare
Thanks for the review, everything is fixed now. But… I think posts are correctly removed from timelines when deleted, but not when un-liked or un-boosted (but this can probably be fixed later?). |
they are remove because of cascading remove from sql. The easiest way to have the same comportment might be to add a reference to the like/reshare in 2 optional (and useless) columns, that cascade remove too |
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.
I can't approve this myself as it's my pr, so if someone could review it that would be nice
we should also do a little todolist of things yet missing.
What come to mind is :
- boost/like deletion doesn't remove from tl
- new tl are not automatically filled (make a magic sql query that does this?)
- related to the above, modifying the query of a tl should clear the tl and rebuild it
- having an actual way to modify a tl, else they are not really custom
- I believe query parsing errors are not translated
I seems OK for me (excepted for the things you listed), but I worked on it too, maybe you want to review it, @igalic ? (don't feel forced to do it, I think we can safely merge it if someone else approves the few commits I pushed). And for the issue you listed, maybe it could be handled in another PR ? The basics are here, and this branch is already pretty big… |
I'll see what i can do tonight. |
What I listed was just to have a small todolist of things to add later, not now. This should end in an issue to not get forgotten |
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.
weak 👀 very tired, not finished this review sorry
migrations/postgres/2019-06-24-101212_use_timelines_for_feed/up.sql
Outdated
Show resolved
Hide resolved
migrations/sqlite/2019-06-24-105533_use_timelines_for_feed/up.sql
Outdated
Show resolved
Hide resolved
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.
slightly less tired, more comments, would love to hear your feedback
.map_err(Error::from) | ||
} else { | ||
timeline_definition::table | ||
.filter(timeline_definition::user_id.is_null()) |
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.
again, this duplication begs to be solved generically
d225170
to
e03e3fa
Compare
and I failed my merge >_< |
be7f5a2
to
7e0f967
Compare
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.
👍
} | ||
}) | ||
{ | ||
Err(err)?; |
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.
That is 21 lines of error handling
} | ||
}) | ||
{ | ||
Err(err)?; |
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.
that's another 21 lines of error handling
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.
there should be a better way to do that …
(I'm not saying you have to find that now)
/* | ||
#[test] | ||
fn test_matches_lists_saved() { | ||
let r = &rockets(); |
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.
why is this one commented out?
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.
I have no idea
Conflicts: plume-models/src/instance.rs src/routes/instance.rs
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.
LGTM, this great PR have been waiting for too long!
fix #450
Query example :
lang in [fr, en] and license in [cc] or followed or title contains "Plume"
todolist
make a gui to manage timelines for usermake a gui to manage timelines for instancemake a gui to manage lists for user&instanceadd tests for front end??Abstract syntax for query language