-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[WIP] Added Caption and UI for depicts #2970
Closed
vanshikaarora
wants to merge
206
commits into
commons-app:backend-overhaul
from
vanshikaarora:upload_caption_depict
Closed
Changes from 190 commits
Commits
Show all changes
206 commits
Select commit
Hold shift + click to select a range
f4e495b
[WIP] Fixes #2942. Set 'depicts' automatically for images uploaded vi…
VitalyVPinchuk a7712f0
Feature/refractor uploads [WIP] (#2887)
ashishkumar468 80dff48
refactored title
vanshikaarora 6085c75
ui for depicts
vanshikaarora 492a9a6
Merge branch 'master' into fix-2942
VitalyVPinchuk e18f0e1
bug fix
vanshikaarora 74590cb
basic architecture for depicts
vanshikaarora d54225a
Merge branch 'refactor_uploads' of https://github.com/commons-app/app…
vanshikaarora f237113
adde architecture components for depicts
vanshikaarora 8ec0159
[WIP] ApacheHttpClientMediaWikiApi.wikidataEditEntity: JSON param cre…
VitalyVPinchuk 79d37ff
resolved dagger errors
vanshikaarora 0fec78b
multilingual captions and next button error resolved
vanshikaarora 94e97b0
fixed next button issues in depicts fragment
vanshikaarora 0068418
captions and depicts
vanshikaarora 2a748d9
resolved previous button click issues
vanshikaarora c5a50b8
fixed bindview error and added multi-captions
vanshikaarora 8a32aed
replaced description and caption with uploadmediadetail
vanshikaarora 3fdd445
refactored few classes
vanshikaarora 2de87a0
modified ui of depicts
vanshikaarora d624e68
minor fixes
vanshikaarora b53803b
Bug fix, reduced the add description edit text clickable bound (#2973)
ashishkumar468 9ea80c9
moved depicts before categories
vanshikaarora 6a8644e
replaced previous filename with captions
vanshikaarora fa0891d
removed time from filename
vanshikaarora 6e849e6
Merge branch 'refactor_uploads' of https://github.com/commons-app/app…
vanshikaarora 5e1d785
Merge branch 'master' into fix-2942
VitalyVPinchuk c078d28
added depicts suggestions
vanshikaarora f7971ee
Merge branch 'master' into fix-2942
VitalyVPinchuk 32c1043
[WIP] Wikidata Sandbox (Q4115189) test
VitalyVPinchuk 9b988bd
changes layout of layout_upload_depicts
vanshikaarora db8523d
changed layout of upload_depicts
vanshikaarora 48d05d0
code stuck at IO_SCHEDULER
vanshikaarora e05b337
Merge branch 'master' into refactor_uploads
maskaravivek a93c22c
labels and description for depicts activity
vanshikaarora 82d1201
Bugfix/uploads (#3000)
ashishkumar468 7dd42c3
Fix memory leak (#3001)
maskaravivek 0b357be
Bugfix/uploads (#3002)
ashishkumar468 0782e72
Bugfix/uploads (#3011)
ashishkumar468 ee9baf6
bugfix/uploads (#3012)
ashishkumar468 95f272a
merge conflict with strings (#3016)
ashishkumar468 bf5bb76
Merge branch 'master' into refactor_uploads
maskaravivek 08cd28f
[WIP] Fixed duplicated subscriprion for 'addPropertyP180'
VitalyVPinchuk a8ef2f9
Merge branch 'master' into fix-2942
VitalyVPinchuk 5d73d29
added documentation
vanshikaarora d900748
fixed issue #3006
vanshikaarora be6b726
resolved issue #3004
vanshikaarora 76d2ed1
fixed issue with categoryPresenterTest.kt
vanshikaarora 00d50d7
send captions as labels
vanshikaarora 99bda68
Merge branch 'master' into fix-2942
VitalyVPinchuk 6a6dd20
fixed issue with the captions
vanshikaarora eeb9fe1
resolved merge conflicts
vanshikaarora 3fe29da
optimised imports
vanshikaarora f25b8b7
Merge branch 'master' of https://github.com/commons-app/apps-android-…
vanshikaarora c7b7b17
Merge branch 'fix-2942' of https://github.com/VitalyVPinchuk/apps-and…
vanshikaarora ee13ada
added upload for captions
vanshikaarora 3c5e286
resolved merge conflicts with refactor_uploads
vanshikaarora a9f9231
minor changes
vanshikaarora 6e3d271
resolved issue with uploading captions
vanshikaarora 39be6a4
resolved issue with api call
vanshikaarora b88fa14
uploading captions to wikibase
vanshikaarora ec2367f
added some tests and documentation
vanshikaarora 35e757b
undo formatting changes
vanshikaarora 8a8c511
uploaded captions as labels to wikibase
vanshikaarora dfd0dba
minor changes
vanshikaarora 5dc45a5
Fix bugs in peer review flow (#3039)
maskaravivek 31b5179
Merge branch 'master' into 2.11-release
maskaravivek a1ce272
rebased branch with master
vanshikaarora ec9c964
resolved error with spinner adpater
vanshikaarora bb00bba
adding captions to local database
vanshikaarora f7c6758
Fixed issue #3035
vanshikaarora 4a6bb78
fixed issue #3033
vanshikaarora cbd52ec
fixed issue #3005
vanshikaarora 59327e0
Merge branch 'master' into upload_caption_depict
maskaravivek 59ac109
fixed issue #3005
vanshikaarora 2021e49
Merge branch 'upload_caption_depict' of https://github.com/vanshikaar…
vanshikaarora 3886439
added search for depicts
vanshikaarora 942ebbe
fixed issue with compile time
vanshikaarora 160fdb5
fixe issue with project build
vanshikaarora e8db428
fixed issue #3044
vanshikaarora 39f7251
merged uploading depicts into branch
vanshikaarora ead14c6
uploading depicts
vanshikaarora bb570a5
Localisation updates from https://translatewiki.net.
translatewiki abf641b
rebased branch
vanshikaarora 256c587
fixed crash due to depicts
vanshikaarora d3b4e42
modified depicts interface
vanshikaarora 03d540a
Merge branch 'backend-overhaul' of https://github.com/commons-app/app…
vanshikaarora b59e044
merged backend-overhaul
vanshikaarora 94f3b6e
Localisation updates from https://translatewiki.net.
translatewiki fb1e213
Resolve merge conflicts
maskaravivek a6a50f6
Fix issues with API calls
maskaravivek 2936d9b
Merge branch 'backend-overhaul' into mergeConflicts
maskaravivek 76d6736
Use wikidata token
maskaravivek 4df55eb
Merge branch 'backend-overhaul' into mergeConflicts
maskaravivek ebb339b
Merge pull request #6 from maskaravivek/mergeConflicts
vanshikaarora bacc9bc
searching depictions from depicts activity
vanshikaarora 32715d9
Set defaults to ON for all EXIF tags (#3068)
VitalyVPinchuk 3a029a2
added some documentation and other changes
vanshikaarora b210b1b
fixed crash on selecting depictions
vanshikaarora 7167094
sending wikidataentity id to upload depictions
vanshikaarora 583cfd3
added changes after review
vanshikaarora 1560b77
Localisation updates from https://translatewiki.net.
translatewiki c045773
Fixed issue with next button diabling in media detail activity
vanshikaarora d6dc1b8
added tests for depictions
vanshikaarora ef686b2
added all the unit tests and fixed few more issues
vanshikaarora 8cd9bd5
Fix category search bug (#3080)
ashishkumar468 1a60fec
Merge remote-tracking branch 'origin/2.11-release'
misaochan a2bf5c2
showing captions in media details
vanshikaarora 0574b75
Localisation updates from https://translatewiki.net.
translatewiki 308d703
show captions in media details
vanshikaarora b09f7ce
added documentations and worked upon review comments
vanshikaarora d03fc5e
parsing response for depictions
vanshikaarora 2107a60
displaying captions and depiction QID in media detail
vanshikaarora 1f0a1e9
added documentation
vanshikaarora 824c091
fetching labels from QIDs
vanshikaarora 7debc09
captions working perfectly
vanshikaarora 1947778
added documentations and code cleaning
vanshikaarora 2b1a8a8
minor changes
vanshikaarora 2c7d210
Localisation updates from https://translatewiki.net.
translatewiki 6becc39
minor changes
vanshikaarora 32c82e9
Showing items in explore
vanshikaarora 423d7ae
added search via depicts in explore
vanshikaarora 9cc915b
Added setOffscreenPageLimit in ViewPager
ashishkumar468 1b03170
Merge pull request #7 from ashishkumar468/bugfix/search
vanshikaarora b15c1f7
resolved merge conflicts
vanshikaarora a41806f
Merge branch 'upload_caption_depict' of https://github.com/vanshikaar…
vanshikaarora ab1ba3a
resolved merge conflicts wih backend-overhaul
vanshikaarora b976619
show captions in explore
vanshikaarora 22be5b5
show captions in home
vanshikaarora cf576c0
showing depict images under items
vanshikaarora 0049e2b
added documentation and code refactoring
vanshikaarora 7fc7783
enabled pagination in depiction search
vanshikaarora 85fbe59
added some tests and media deatils in depiction detail activity
vanshikaarora ac8e347
fixed bug with back button in media
vanshikaarora f9a9854
fixed issue #3100
vanshikaarora 29e0fca
fixed issue #3098
vanshikaarora 6295408
fixed issue #3099
vanshikaarora 369137a
fixed issue #3104 and #3098
vanshikaarora 238a91a
showing captions in place of title in home and explore:media
vanshikaarora 2c94e4e
show captions in explore:depiction image list activity
vanshikaarora e7a6d8d
showing depictions in media details
vanshikaarora 19d8202
showing depictions in media details in production flavor
vanshikaarora 46978b4
fixed issue #3108 and #3107
vanshikaarora b64ebbc
fix isse #3108
vanshikaarora ee2b7be
fixed issue #3110 and #3112
vanshikaarora c22762b
fixed issue #3113
vanshikaarora 096199d
added documentations
vanshikaarora 39834fb
fixed issue #3076 and #3109
vanshikaarora 83a5b77
added depiction search test
vanshikaarora 1607bd9
fixed issue #3113
vanshikaarora e791477
fixed issue #3111
vanshikaarora bcd4577
fixed issue #3106
vanshikaarora 7aeb3d1
Showing items in explore
vanshikaarora c20bfe1
minor change
vanshikaarora f3389a5
fixed issue #3118 and some other changes
vanshikaarora ce70d29
added MVP in searchdepictionsfragment
vanshikaarora bd47547
added mvp architecture
vanshikaarora 456c4b7
added MVP architecture to DepictedImagesDetailsActivity
vanshikaarora fd03dcf
added documentation and some minor changes
vanshikaarora 6807d0d
added image to depicted item in search depictions
vanshikaarora 1912356
* Use callbacks from renderer to fetch thumbnails
ashishkumar468 574e1bd
Merge pull request #8 from ashishkumar468/bugfix/depitcions-thumbnails
vanshikaarora 6c453ee
adding fresco to load image in depictions
vanshikaarora 262b4a6
adding thumbnail image for depictions in upload and explore
vanshikaarora d23d06f
pagination issues
vanshikaarora 9909d64
fixed issue --(showing previous depiction thumbnail in explore)
vanshikaarora 7eaf00d
Fixed the logic for pagination
ashishkumar468 f34281b
hide progress on success of last page
ashishkumar468 408c9cf
Merge pull request #9 from ashishkumar468/bugfix/pagination
vanshikaarora 570b720
Merge branch 'test_scroll' into upload_caption_depict
vanshikaarora f536f3c
adding sub-items and parent items to search in explore
vanshikaarora ac82747
minor changes for review comments
vanshikaarora 3370b11
fixed issue #3119
vanshikaarora e778de4
fixed issue #3130
vanshikaarora 685d8f8
changes after review comments
vanshikaarora a9244b4
showing child classes for depictions
vanshikaarora 7348d2d
Showing child items
vanshikaarora 970e45e
showing parent classes for depicted items
vanshikaarora 758928e
adding localised search for parent and child items
vanshikaarora 47aad06
clicking on any child class or parent class should call the correspon…
vanshikaarora 7cc08b7
fixed issue of showing wrong thumbnail for P18 item
vanshikaarora 2ec7823
fixed issue #3132
vanshikaarora d8fc744
added test for DepictedImagesPresenter.java
vanshikaarora b01e769
added unit tests for depicted items parent and child classes
vanshikaarora 1d82963
removed unused imports and code formatting
vanshikaarora a78f5aa
fixed issue in search test
vanshikaarora f0c2e2c
deleting unnecessary .attach_pid9313 file
vanshikaarora dc59f60
deleting unnecessary .attach_pid9655 file
vanshikaarora 8836ae2
added SearchDepictionsPresenterTest
vanshikaarora 77b1478
Merge branch 'upload_caption_depict' of https://github.com/vanshikaar…
vanshikaarora 909cd4e
changes after review comments
vanshikaarora e400285
updates for review comments
vanshikaarora 4bf86c3
added more documentations
vanshikaarora 6bee22a
removed unused code and classes and addressed spacing changes
vanshikaarora 3da6530
changes after review
vanshikaarora 555c740
fixed build issues in the app
vanshikaarora 74de3ff
worked on some review comments
vanshikaarora d267006
fixed issue:wrong thumbnail appears on wikidata item
vanshikaarora 954e020
minor change
vanshikaarora 05e7d85
worked on some review changes
vanshikaarora 4645d0b
worked on review comments
vanshikaarora 5db6140
minor change
vanshikaarora c082cb0
addressed remaining review comments
vanshikaarora 5ddea4a
replaced hardcoded jpgs with pageIds to fetch captions
vanshikaarora c75222e
added documentation
vanshikaarora 3a2c96b
removed hardcoded extensions and worked on review comments
vanshikaarora 73419bb
review comments
vanshikaarora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
app/src/androidTest/java/fr/free/nrw/commons/DepictionSearchTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package fr.free.nrw.commons | ||
|
||
import androidx.test.runner.AndroidJUnit4 | ||
import org.junit.Rule | ||
import org.junit.runner.RunWith | ||
import android.net.Uri | ||
import androidx.test.espresso.Espresso | ||
import androidx.test.espresso.action.ViewActions | ||
import androidx.test.espresso.matcher.ViewMatchers | ||
import androidx.test.rule.ActivityTestRule | ||
import fr.free.nrw.commons.upload.UploadActivity | ||
import org.hamcrest.Matchers | ||
import org.hamcrest.core.AllOf | ||
import org.junit.Test | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class DepictionSearchTest { | ||
@get:Rule | ||
var activityRule = ActivityTestRule(UploadActivity::class.java) | ||
|
||
@Test | ||
fun TestForCaptionsAndDepictions() { | ||
val imageUri = Uri.parse("file://mnt/sdcard/image.jpg") | ||
|
||
// Build a result to return from the Camera app | ||
|
||
|
||
// Stub out the File picker. When an intent is sent to the File picker, this tells | ||
// Espresso to respond with the ActivityResult we just created | ||
|
||
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text)) | ||
.perform(ViewActions.typeText("caption in english")) | ||
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text)) | ||
.perform(ViewActions.typeText("description in english")) | ||
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages)) | ||
.perform(ViewActions.click()) | ||
Espresso.onView(ViewMatchers.withId(R.id.spinner_description_languages)).perform(ViewActions.click()); | ||
Espresso.onData(AllOf.allOf(Matchers.anything("spinner text"))).atPosition(1).perform(ViewActions.click()); | ||
Espresso.onView(ViewMatchers.withId(R.id.caption_item_edit_text)) | ||
.perform(ViewActions.typeText("caption in some other language")) | ||
Espresso.onView(ViewMatchers.withId(R.id.description_item_edit_text)) | ||
.perform(ViewActions.typeText("description in some other language")) | ||
Espresso.onView(ViewMatchers.withId(R.id.btn_next)) | ||
.perform(ViewActions.click()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Test for captions and Depictions is in two files ?
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.
This is for the base test mentioned here #3031. I thoought it should all be in a continuation that's why I have put it in a single class