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 collaboration UI #1491
Add collaboration UI #1491
Commits on Sep 9, 2021
-
Added tests for getCollaborators method from CollaboratorsRepository
The SimperiumCollaboratorsRepository now has a dependency for Bucket<Note>, thus, all tests that use the instance directly had to be updated.
Configuration menu - View commit details
-
Copy full SHA for f190dd7 - Browse repository at this point
Copy the full SHA f190dd7View commit details -
Added more tests to getCollaborators in case the note is deleted/trash
Given that notes are synchronized across different devices, there may be the case in which a user will try to get the collaborators of a note that was deleted or is in the trash. For those cases, we cannot add collaborators.
Configuration menu - View commit details
-
Copy full SHA for 099f6d0 - Browse repository at this point
Copy the full SHA 099f6d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8504289 - Browse repository at this point
Copy the full SHA 8504289View commit details -
Configuration menu - View commit details
-
Copy full SHA for e37d61d - Browse repository at this point
Copy the full SHA e37d61dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3b5a75 - Browse repository at this point
Copy the full SHA e3b5a75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d0c126 - Browse repository at this point
Copy the full SHA 8d0c126View commit details -
Configuration menu - View commit details
-
Copy full SHA for 650f353 - Browse repository at this point
Copy the full SHA 650f353View commit details -
Refactor getCollaborators to use a generic method that is reused
Created the getNote method that will be reused in addCollaborator and getCollaborators since these methods need a Note object.
Configuration menu - View commit details
-
Copy full SHA for 4323206 - Browse repository at this point
Copy the full SHA 4323206View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6077431 - Browse repository at this point
Copy the full SHA 6077431View commit details -
Remove validation in CollaboratorsRepository
Collaborator validation should not be responsibility of addCollaborators.
Configuration menu - View commit details
-
Copy full SHA for 78804ca - Browse repository at this point
Copy the full SHA 78804caView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb02c32 - Browse repository at this point
Copy the full SHA cb02c32View commit details -
Configuration menu - View commit details
-
Copy full SHA for f23d6b3 - Browse repository at this point
Copy the full SHA f23d6b3View commit details -
Change methods that load a note in CollaboratorsRepository to suspend
Since loading a note does a database query, we change all the methods in SimperiumCollaboratorsRepository to suspend methods. To be able to test properly the repository, we need to inject the dispatcher, so we updated the dispatcher in all the test and created a provider for Hilt.
Configuration menu - View commit details
-
Copy full SHA for e2cd8da - Browse repository at this point
Copy the full SHA e2cd8daView commit details
Commits on Sep 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for f56fee0 - Browse repository at this point
Copy the full SHA f56fee0View commit details -
Move NoteTest to unit tests directory since it doesn't require emulator
Tests on model does not require emulator. They can run fast and are better suited to run as unit tests instead of connected tests.
Configuration menu - View commit details
-
Copy full SHA for 4d42dd5 - Browse repository at this point
Copy the full SHA 4d42dd5View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf7b357 - Browse repository at this point
Copy the full SHA cf7b357View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1c96ca - Browse repository at this point
Copy the full SHA b1c96caView commit details -
Configuration menu - View commit details
-
Copy full SHA for f92cca8 - Browse repository at this point
Copy the full SHA f92cca8View commit details -
Refactor TagValidationResult to be part of ValidateTagUseCase
Make explicit that TagValidationResult is part and just used in ValidateTagUseCase.
Configuration menu - View commit details
-
Copy full SHA for a59dacf - Browse repository at this point
Copy the full SHA a59dacfView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb75708 - Browse repository at this point
Copy the full SHA cb75708View commit details -
Configuration menu - View commit details
-
Copy full SHA for 542abb0 - Browse repository at this point
Copy the full SHA 542abb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ff6d51 - Browse repository at this point
Copy the full SHA 9ff6d51View commit details -
Configuration menu - View commit details
-
Copy full SHA for f480b6c - Browse repository at this point
Copy the full SHA f480b6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ace9aee - Browse repository at this point
Copy the full SHA ace9aeeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c1893c - Browse repository at this point
Copy the full SHA 3c1893cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6526a9a - Browse repository at this point
Copy the full SHA 6526a9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a1226cd - Browse repository at this point
Copy the full SHA a1226cdView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec634b3 - Browse repository at this point
Copy the full SHA ec634b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a565bc - Browse repository at this point
Copy the full SHA 9a565bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for cc75ba6 - Browse repository at this point
Copy the full SHA cc75ba6View commit details -
Added tests for getCollaborators method from CollaboratorsRepository
The SimperiumCollaboratorsRepository now has a dependency for Bucket<Note>, thus, all tests that use the instance directly had to be updated.
Configuration menu - View commit details
-
Copy full SHA for 9f4da82 - Browse repository at this point
Copy the full SHA 9f4da82View commit details -
Added more tests to getCollaborators in case the note is deleted/trash
Given that notes are synchronized across different devices, there may be the case in which a user will try to get the collaborators of a note that was deleted or is in the trash. For those cases, we cannot add collaborators.
Configuration menu - View commit details
-
Copy full SHA for 6c6cf72 - Browse repository at this point
Copy the full SHA 6c6cf72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26b0b72 - Browse repository at this point
Copy the full SHA 26b0b72View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4368547 - Browse repository at this point
Copy the full SHA 4368547View commit details -
Configuration menu - View commit details
-
Copy full SHA for f0b0038 - Browse repository at this point
Copy the full SHA f0b0038View commit details -
Configuration menu - View commit details
-
Copy full SHA for abe2a13 - Browse repository at this point
Copy the full SHA abe2a13View commit details -
Remove validation in CollaboratorsRepository
Collaborator validation should not be responsibility of addCollaborators.
Configuration menu - View commit details
-
Copy full SHA for 8e00d4c - Browse repository at this point
Copy the full SHA 8e00d4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3886d18 - Browse repository at this point
Copy the full SHA 3886d18View commit details -
Change methods that load a note in CollaboratorsRepository to suspend
Since loading a note does a database query, we change all the methods in SimperiumCollaboratorsRepository to suspend methods. To be able to test properly the repository, we need to inject the dispatcher, so we updated the dispatcher in all the test and created a provider for Hilt.
Configuration menu - View commit details
-
Copy full SHA for c7cacb8 - Browse repository at this point
Copy the full SHA c7cacb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81248eb - Browse repository at this point
Copy the full SHA 81248ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for a5cf149 - Browse repository at this point
Copy the full SHA a5cf149View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09539c9 - Browse repository at this point
Copy the full SHA 09539c9View commit details -
Add tests for CollaboratorsViewModel
Add tests for loadCollaborators and removeCollaborator. Add collaborator will be handled in another ViewModel.
Configuration menu - View commit details
-
Copy full SHA for c229a96 - Browse repository at this point
Copy the full SHA c229a96View commit details -
Implement loadCollaborators and removeCollaborators
Moved NoteInTrash and NoteDeleted as UiState since the UI must make a decision when the note is in trash or deleted. The ViewModel will not provide collaborators for notes in these states.
Configuration menu - View commit details
-
Copy full SHA for 164bdfb - Browse repository at this point
Copy the full SHA 164bdfbView commit details -
Remove event field in CollaboratorsViewModel
This field is not needed now but might be added later when UI is implemented.
Configuration menu - View commit details
-
Copy full SHA for 73cb547 - Browse repository at this point
Copy the full SHA 73cb547View commit details -
Configuration menu - View commit details
-
Copy full SHA for 989ad8a - Browse repository at this point
Copy the full SHA 989ad8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4db6c32 - Browse repository at this point
Copy the full SHA 4db6c32View commit details
Commits on Sep 14, 2021
-
Add Empty UiState for collaborators
In case there are not collaborators added, a special state is returned since the UI will perform certain actions for this case.
Configuration menu - View commit details
-
Copy full SHA for 52484cf - Browse repository at this point
Copy the full SHA 52484cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for dc2eb09 - Browse repository at this point
Copy the full SHA dc2eb09View commit details -
Configuration menu - View commit details
-
Copy full SHA for 91faf5a - Browse repository at this point
Copy the full SHA 91faf5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3869c29 - Browse repository at this point
Copy the full SHA 3869c29View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4960180 - Browse repository at this point
Copy the full SHA 4960180View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1288c87 - Browse repository at this point
Copy the full SHA 1288c87View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72f814b - Browse repository at this point
Copy the full SHA 72f814bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1974cbf - Browse repository at this point
Copy the full SHA 1974cbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 53d4855 - Browse repository at this point
Copy the full SHA 53d4855View commit details -
Configuration menu - View commit details
-
Copy full SHA for 951d9ff - Browse repository at this point
Copy the full SHA 951d9ffView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8eedbe9 - Browse repository at this point
Copy the full SHA 8eedbe9View commit details -
Add remove collaborator dialog and action to event
Show an alert dialog before removing a collaborator. In case the user taps on Remove, then call the ViewModel to remove the collaborator.
Configuration menu - View commit details
-
Copy full SHA for a8aac3a - Browse repository at this point
Copy the full SHA a8aac3aView commit details
Commits on Sep 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 8060e8b - Browse repository at this point
Copy the full SHA 8060e8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 07cddcd - Browse repository at this point
Copy the full SHA 07cddcdView commit details -
Add AddCollaboratorViewModel to handle UI state to add collaborator UI
Initial version without implementation of AddCollaboratorViewModel.
Configuration menu - View commit details
-
Copy full SHA for f9b35a0 - Browse repository at this point
Copy the full SHA f9b35a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 81bc463 - Browse repository at this point
Copy the full SHA 81bc463View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4524e01 - Browse repository at this point
Copy the full SHA 4524e01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 33c653d - Browse repository at this point
Copy the full SHA 33c653dView commit details -
Configuration menu - View commit details
-
Copy full SHA for da63130 - Browse repository at this point
Copy the full SHA da63130View commit details -
Add noteId parameter to AddCollaboratorEvent
The noteId is sent to the fragment so it can add the collaborator to the correct Note
Configuration menu - View commit details
-
Copy full SHA for 9fc0768 - Browse repository at this point
Copy the full SHA 9fc0768View commit details -
Configuration menu - View commit details
-
Copy full SHA for c3d6f53 - Browse repository at this point
Copy the full SHA c3d6f53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2472473 - Browse repository at this point
Copy the full SHA 2472473View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09a82e4 - Browse repository at this point
Copy the full SHA 09a82e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 01acd51 - Browse repository at this point
Copy the full SHA 01acd51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c3dfd9 - Browse repository at this point
Copy the full SHA 8c3dfd9View commit details -
Configuration menu - View commit details
-
Copy full SHA for e58d5d9 - Browse repository at this point
Copy the full SHA e58d5d9View commit details -
Add support for update on collaborators locally and from the network
Listen to changes on the note that might mean the collaborators were updated. This works for when a new collaborator is added locally or from another client.
Configuration menu - View commit details
-
Copy full SHA for a34ed2f - Browse repository at this point
Copy the full SHA a34ed2fView commit details -
Remove progress dialog in collaborators list
The list of collaborators is obtained from a single note. Loading the note is not a heavy task, thus, the progress bar in this case is overkill.
Configuration menu - View commit details
-
Copy full SHA for 2f09db5 - Browse repository at this point
Copy the full SHA 2f09db5View commit details -
Handle cases when the note is trashed or deleted
If the user is editing the collaborators of a note that is trashed or deleted, the user is returned to the list of activities since collaborators cannot be added to trashed or deleted notes.
Configuration menu - View commit details
-
Copy full SHA for a11cccd - Browse repository at this point
Copy the full SHA a11cccdView commit details -
Improve positioning of views in layout to handle list of collaborators. The list is scrollable to handle long list of collaborators.
Configuration menu - View commit details
-
Copy full SHA for cdaab94 - Browse repository at this point
Copy the full SHA cdaab94View commit details -
Handle data for AddCollaboratorFragment through arguments
When the configuration changes, Android tries to recreate the dialog fragment. Since the previous AddCollaboratorFragment's constructor had one parameter, the instance could be recreated. Now we pass the note ID through Bundle objects as arguments.
Configuration menu - View commit details
-
Copy full SHA for 31adb38 - Browse repository at this point
Copy the full SHA 31adb38View commit details -
Reformat manifest with the previous format and add CollaboratorsActivity with android:configChanges="orientation|keyboardHidden|screenSize"
Configuration menu - View commit details
-
Copy full SHA for 3a6fc8a - Browse repository at this point
Copy the full SHA 3a6fc8aView commit details
Commits on Sep 16, 2021
-
Maintain instance of fragment when configuration change
Now the fragment stays when the configuration changes, thus, we do not have to handle instance creation.
Configuration menu - View commit details
-
Copy full SHA for af4191a - Browse repository at this point
Copy the full SHA af4191aView commit details -
Avoid updating collaborators list after collaborator removed
The action of removing a collaborator will be handled by the flow when the collaborators changed.
Configuration menu - View commit details
-
Copy full SHA for 3d5ec3c - Browse repository at this point
Copy the full SHA 3d5ec3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b34083 - Browse repository at this point
Copy the full SHA 0b34083View commit details -
Configuration menu - View commit details
-
Copy full SHA for b233ddf - Browse repository at this point
Copy the full SHA b233ddfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1fbb316 - Browse repository at this point
Copy the full SHA 1fbb316View commit details -
Configuration menu - View commit details
-
Copy full SHA for 564a7fd - Browse repository at this point
Copy the full SHA 564a7fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1875ab8 - Browse repository at this point
Copy the full SHA 1875ab8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ade889 - Browse repository at this point
Copy the full SHA 4ade889View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fd52e0 - Browse repository at this point
Copy the full SHA 6fd52e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 066aed3 - Browse repository at this point
Copy the full SHA 066aed3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 119c408 - Browse repository at this point
Copy the full SHA 119c408View commit details
Commits on Sep 17, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 0e1bbb6 - Browse repository at this point
Copy the full SHA 0e1bbb6View commit details
Commits on Sep 20, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b124559 - Browse repository at this point
Copy the full SHA b124559View commit details -
Configuration menu - View commit details
-
Copy full SHA for 027ae7e - Browse repository at this point
Copy the full SHA 027ae7eView commit details -
Use IO context just for getNote
Use the IO dispatcher in the getNote method and let all other three methods free of using any dispatcher.
Configuration menu - View commit details
-
Copy full SHA for fa33aa2 - Browse repository at this point
Copy the full SHA fa33aa2View commit details -
Configuration menu - View commit details
-
Copy full SHA for cb3d1ad - Browse repository at this point
Copy the full SHA cb3d1adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d054fd - Browse repository at this point
Copy the full SHA 9d054fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb411c5 - Browse repository at this point
Copy the full SHA bb411c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0f7531 - Browse repository at this point
Copy the full SHA d0f7531View commit details -
Configuration menu - View commit details
-
Copy full SHA for 79168d2 - Browse repository at this point
Copy the full SHA 79168d2View commit details -
Flip setupViews and setObservers
Keep consistency on how the two methods are layered afterwards.
Configuration menu - View commit details
-
Copy full SHA for c248403 - Browse repository at this point
Copy the full SHA c248403View commit details -
Configuration menu - View commit details
-
Copy full SHA for f44e932 - Browse repository at this point
Copy the full SHA f44e932View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9cff3e1 - Browse repository at this point
Copy the full SHA 9cff3e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 833acdf - Browse repository at this point
Copy the full SHA 833acdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 198ee8b - Browse repository at this point
Copy the full SHA 198ee8bView commit details -
Configuration menu - View commit details
-
Copy full SHA for f731ffc - Browse repository at this point
Copy the full SHA f731ffcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78df3d6 - Browse repository at this point
Copy the full SHA 78df3d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d321b84 - Browse repository at this point
Copy the full SHA d321b84View commit details -
Configuration menu - View commit details
-
Copy full SHA for a2229c9 - Browse repository at this point
Copy the full SHA a2229c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for af1df21 - Browse repository at this point
Copy the full SHA af1df21View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0918454 - Browse repository at this point
Copy the full SHA 0918454View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cd381c - Browse repository at this point
Copy the full SHA 8cd381cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c93954 - Browse repository at this point
Copy the full SHA 9c93954View commit details
Commits on Sep 21, 2021
-
Add tests for calls to collaboratorsChanged() method
To be able to test this method, we need to mock the whole class. We mock CollaboratorsRepository and all the calls that the tests made.
Configuration menu - View commit details
-
Copy full SHA for 56de650 - Browse repository at this point
Copy the full SHA 56de650View commit details -
Add IO dispatcher parameter to SimperiumTagsRepository
This is mostly for testing purposes since it is easier to inject a test dispatcher to avoid multithreading bugs in the testing library for coroutines.
Configuration menu - View commit details
-
Copy full SHA for 32eca5b - Browse repository at this point
Copy the full SHA 32eca5bView commit details
Commits on Sep 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 74171ed - Browse repository at this point
Copy the full SHA 74171edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74730be - Browse repository at this point
Copy the full SHA 74730beView commit details -
Inflate layout for dialog using the context themed wrapper
Even though the dialog was using the correct mode (light or dark), the view inside the dialog was not. To make the view inside the dialog mode aware, we use the context theme wrapper to inflate the layout.
Configuration menu - View commit details
-
Copy full SHA for 84ee1e4 - Browse repository at this point
Copy the full SHA 84ee1e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4fc4d25 - Browse repository at this point
Copy the full SHA 4fc4d25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48d67ef - Browse repository at this point
Copy the full SHA 48d67efView commit details
Commits on Sep 23, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 208f343 - Browse repository at this point
Copy the full SHA 208f343View commit details -
Configuration menu - View commit details
-
Copy full SHA for dbaf20c - Browse repository at this point
Copy the full SHA dbaf20cView commit details