-
Notifications
You must be signed in to change notification settings - Fork 189
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
Feature: share articles (back-end part) #1191
Conversation
There is 207 files changed and there are code conflicts. Please split this review into at the very least API and frontend changes and make sure it's actually mergable. |
First good step would be to remove all the language file changes, we don't need those and it makes the overview difficult. But I appreciate the effort. |
Thank you for the feedback. We have just realised that we are actually way behind your recent changes, so we will take some time to adapt our code to make it match your updates. |
Codecov Report
@@ Coverage Diff @@
## master #1191 +/- ##
============================================
+ Coverage 86.43% 86.94% +0.51%
- Complexity 708 724 +16
============================================
Files 61 62 +1
Lines 2543 2620 +77
============================================
+ Hits 2198 2278 +80
+ Misses 345 342 -3
Continue to review full report at Codecov.
|
Like mentioned before:
In addition to that we'll need all commits to have a sign off to comply with the DCO requirement for the nextcloud organisation. |
Yup, still working on it. Should be done soon, I'll leave a comment when it's ready for review :) |
aa1bc7b
to
0f4cffd
Compare
Ok, I think we're ready for review! We've tried to write clear code, and comment parts that were a bit complicated. Also I've put some details about our implementation in the pr description. I'll be watching for your questions or comments! Thanks |
- added field + setters + getters - include field in serialized Item Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Co-authored-by: Sean Molenaar <[email protected]> Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
- Add mapSharedByDisplayNames in ShareService - Update ItemController to call function on items Signed-off-by: Marco Nassabain <[email protected]>
- added testMapSharedByDisplayNames - updated ItemController tests to expect call to function Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
- setting sharedByDisplayName shouldn't mark it as updated Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
Signed-off-by: Marco Nassabain <[email protected]>
fc9d5f6
to
0d340aa
Compare
Done! |
Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (#1191) - Updated the news items table in DB to include sharer data (#1191) - Added route for sharing news items (#1191) - Added share data in news items serialization (#1191) - Added tests for the news items share feature (#1191) - Added sharing articles with nextcloud users (#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (#1217) Signed-off-by: Benjamin Brahmer <[email protected]>
Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (#1191) - Updated the news items table in DB to include sharer data (#1191) - Added route for sharing news items (#1191) - Added share data in news items serialization (#1191) - Added tests for the news items share feature (#1191) - Added sharing articles with nextcloud users (#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (#1217) Signed-off-by: Benjamin Brahmer <[email protected]>
There are no additional changes compared to the latest beta. Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (#1191) - Updated the news items table in DB to include sharer data (#1191) - Added route for sharing news items (#1191) - Added share data in news items serialization (#1191) - Added tests for the news items share feature (#1191) - Added sharing articles with nextcloud users (#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (#1217) - Allow installation on Nextcloud v22 - Remove deprecated API endpoints and occ command (#935) - /api/v1-2/user - /api/v1-2/user/avatar - ./occ news:updater:all-feeds - added feed search (#1402) Fixed - allow calling `/items?getRead=false` without a feed/folder (#1380 #1356) - newestId does not return newest ID but last updated (#1339) - removed reference for deleted repair-steps (#1399) - Fix NotNullConstraintViolation when sharing news items with users (#1406) Signed-off-by: Benjamin Brahmer <[email protected]>
There are no additional changes compared to the latest beta. Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (#1191) - Updated the news items table in DB to include sharer data (#1191) - Added route for sharing news items (#1191) - Added share data in news items serialization (#1191) - Added tests for the news items share feature (#1191) - Added sharing articles with nextcloud users (#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (#1217) - Allow installation on Nextcloud v22 - Remove deprecated API endpoints and occ command (#935) - /api/v1-2/user - /api/v1-2/user/avatar - ./occ news:updater:all-feeds - added feed search (#1402) Fixed - allow calling `/items?getRead=false` without a feed/folder (#1380 #1356) - newestId does not return newest ID but last updated (#1339) - removed reference for deleted repair-steps (#1399) - Fix NotNullConstraintViolation when sharing news items with users (#1406) Signed-off-by: Benjamin Brahmer <[email protected]>
Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (nextcloud#1191) - Updated the news items table in DB to include sharer data (nextcloud#1191) - Added route for sharing news items (nextcloud#1191) - Added share data in news items serialization (nextcloud#1191) - Added tests for the news items share feature (nextcloud#1191) - Added sharing articles with nextcloud users (nextcloud#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (nextcloud#1217) Signed-off-by: Benjamin Brahmer <[email protected]>
There are no additional changes compared to the latest beta. Changed - News now requires a 64bit OS - v2 API implementation (folder part) - Implemented sharing news items between nextcloud users (nextcloud#1191) - Updated the news items table in DB to include sharer data (nextcloud#1191) - Added route for sharing news items (nextcloud#1191) - Added share data in news items serialization (nextcloud#1191) - Added tests for the news items share feature (nextcloud#1191) - Added sharing articles with nextcloud users (nextcloud#1217) - Added sharing articles on social media (Facebook, Twitter) or mail (nextcloud#1217) - Allow installation on Nextcloud v22 - Remove deprecated API endpoints and occ command (nextcloud#935) - /api/v1-2/user - /api/v1-2/user/avatar - ./occ news:updater:all-feeds - added feed search (nextcloud#1402) Fixed - allow calling `/items?getRead=false` without a feed/folder (nextcloud#1380 nextcloud#1356) - newestId does not return newest ID but last updated (nextcloud#1339) - removed reference for deleted repair-steps (nextcloud#1399) - Fix NotNullConstraintViolation when sharing news items with users (nextcloud#1406) Signed-off-by: Benjamin Brahmer <[email protected]>
🚀 Features
This update contains the following features:
🖱️ UI/UX implementation
💻 Code implementation
Sharing an article is implemented by duplicating it. Here's a detailed analysis of our decision.
❌ Idea 1: Sharing by reference
item_id
,shared_by
, andshared_with
.starred
andunread
are columns of thenews_items
model, making it a one-on-one relation. This means that a shared article also shares its'starred
andunread
state between users, which is something we don't want.starred
andunread
fields into the share table, however, this would create a lot of code redundancy, since we would have to rewrite the same code, only for another object.✅ Idea 2: Sharing by copying
ItemMapper
have been modified, mostly with the following update:Share module integration
🧪 Tests
All of our functions are tested to work properly, and existing tests were modified to take into account the share data.
🛑 Known issues - FIXED
👥 Team
We're a team of six students working on this project for our university. Here are the members:
We are from the University of Strasbourg. Special thanks for M. Julien GOSSA for giving us this subject and helping us getting started.
🗓️ Future updates
We are currently starting to work on the addition of three new functionalities for the next part of our project :
🙏 Final words
We have been working on this project for a while, and we have thoroughly studied the existing code before contributing. We have tried our best to write good and understandable code. We have ran manual and automatic tests which the functionality passes.
However, it is possible that we have a couple of bugs lying around. We're open to critisicm, and we'd like to hear what you think about our work.
I hope you like our contribution, as much as we liked contributing! Thank you.