Skip to content
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

Issue #3428: Swapped text in dialog buttons #3496

Conversation

FawziyahAlebiosu
Copy link
Contributor

@FawziyahAlebiosu FawziyahAlebiosu commented Mar 11, 2020

because, according to Android Convention, they were opposite each other

Description

Fixes #3428 Dialog buttons set as opposite to Android design conventions

What changes did you make and why?
In DialogUtil.java, I replaced R.string.no with R.string.yes making it the text for the positiveButton, and I replaced R.string.yes with R.string.no making it the text for the negativeButton. I did this inside both of the TWO times that showAlertDialog method occurs inside the java file.

Tests performed (required)

Forgive me if I'm wrong, but according to the developer documentation, it mentions that tests are not required if the issue is not labeled with an 'enhancement' tag. So, I did not perform any tests.

Screenshots showing what changed (optional - for UI changes)
BEFORE:
image

AFTER:
image

…ding to Android Convention, they were opposite each other
Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests to make sure this change works as expected?

@FawziyahAlebiosu FawziyahAlebiosu marked this pull request as ready for review March 11, 2020 18:55
@sivaraam
Copy link
Member

@FawziyahAlebiosu Thanks for the PR!

Apologies for not being clear. The screenshot we were expecting was a screenshot of the app's UI after the change. Could you add a screenshot of how the dialog appear in the app after the change? You can trigger the dialog in the app when you try to upload an existing commons image. Here's one image which you could use for testing:

https://upload.wikimedia.org/wikipedia/commons/a/a0/Les_anciens_couvents_de_Lyon_-_039_-_Inscription_romaine_d%27Ainay.jpg

You should see a "Warning" dialog when you try to upload this image. Let us know if you need any help. 🙂

@FawziyahAlebiosu
Copy link
Contributor Author

@FawziyahAlebiosu Thanks for the PR!

Apologies for not being clear. The screenshot we were expecting was a screenshot of the app's UI after the change. Could you add a screenshot of how the dialog appear in the app after the change? You can trigger the dialog in the app when you try to upload an existing commons image. Here's one image which you could use for testing:

https://upload.wikimedia.org/wikipedia/commons/a/a0/Les_anciens_couvents_de_Lyon_-_039_-_Inscription_romaine_d%27Ainay.jpg

You should see a "Warning" dialog when you try to upload this image. Let us know if you need any help. 🙂

Oh my! You're right, I tested it and it definitely does not work as intended yet. I use an emulator, because I don't have an android phone, but I'm definitely going to work on figuring out how to swap the correct method as well tomorrow. Thank you for keeping me on my toes, even though I am a new contributor. I'll let you know if I need any help

@sivaraam
Copy link
Member

I tested it and it definitely does not work as intended yet.

@FawziyahAlebiosu Oops! Looks like I've misled you in one of my previous comments. Sorry about that. 🙁

I'm definitely going to work on figuring out how to swap the correct method as well tomorrow.

You're changing the right methods. No problem there. The thing is this change requires more than just swapping the text. We also have to update the callers of those methods so that the appropriate callbacks are mapped to those buttons. We need to do this as the callers had passed the callbacks with the assumption that "No" would be the positive action and "Yes" would be the negative action. As we're changing it now we also have to change the callers to so that the callbacks are passed appropriately. Hope that helps!

Thank you for keeping me on my toes, even though I am a new contributor.

Our pleasure 😄

…ped text in dialog buttons because, according to Android Convention, they were opposite each other
@FawziyahAlebiosu
Copy link
Contributor Author

yesNo

@FawziyahAlebiosu
Copy link
Contributor Author

I see that my commit to get the dialog box to work as expected went through. I have also included a screen recording to show that I tested it and it works. Thank you for your patience so far, I truly appreciate it!

@sivaraam
Copy link
Member

@FawziyahAlebiosu That's a good start! But there are still other callers of the DialogUtil#showAlertDialog methods which need similar changes. You can use the "Find Usages" option in the context menu that appears when you right click on a method name to find the usage of the method. Alternatively, you can Ctrl + Left mouse click on a method name to see the callers.

() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
onNextButtonClicked();
},
() -> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the DialogUtil class supports passing null for a click action, I think that would be better than taking up 3 lines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the DialogUtil class supports passing null for a click action, I think that would be better than taking up 3 lines

Got it!

…og accurately match up with the new position of positive and negative text on the dialog box

Also removed occurences of empty lambda expressions and used null instead
() -> deleteThisPicture(),
() -> {
uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
() -> { uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uploadItem.setImageQuality(ImageUtils.IMAGE_KEEP); should be on a separate line to the { unless it is a statement lambda ie one method call or value

For example deleteThisPicture(); below can have the braces and colon removed to become a statement lambda.

It can also go further and become a method reference ::deleteThisPicture because the input parameters () are the same as the parameter for the method deleteThisPicture()

@@ -552,7 +552,7 @@ Upload your first media by tapping on the add button.</string>
<string name="exif_tag_name_software">Software</string>

<string name="share_text">Upload photos to Wikimedia Commons directly from your phone. Download the Commons App now: %1$s</string>
<string name="share_via">Share app via...</string>
<string name="share_via">Share app via</string>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the elipsis character is recommended by lint but it is not a part of this ticket, probably something we have to discuss with Translatewiki

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a mistake on my end! I was trying to search for what a string Id meant in the xml file, and realized that I had removed something, so I ctrl+z. I didn’t think git would reflect it since I did not refactor anything.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, we see the difference just because Git has detected it. So, it would be nice if you could revert it. You could use the following suggestion, if you wish:

Suggested change
<string name="share_via">Share app via</string>
<string name="share_via">Share app via...</string>

FYI: Translatewiki handles the ellipisis character just fine. Here's an example of a string from another app which contains the ellipsis character and is translated appropriately: https://translatewiki.net/wiki/Wikimedia:Wikipedia-android-strings-login_in_progress_dialog_message/en

@FawziyahAlebiosu
Copy link
Contributor Author

I was able to test the following methods that call showDialog that I changed, but I need to do another screen recording because the I didn't save them before exiting the emulator :(
Will update with recordings by tomorrow morning.

@sivaraam
Copy link
Member

Will update with recordings by tomorrow morning.

Screen shots would be enough. You don't have to do a screen recording.

@codecov-io
Copy link

codecov-io commented Mar 19, 2020

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 7.27%. Comparing base (65ec071) to head (5080ebd).

Files with missing lines Patch % Lines
...upload/mediaDetails/UploadMediaDetailFragment.java 0.00% 3 Missing ⚠️
...ns/upload/categories/UploadCategoriesFragment.java 0.00% 2 Missing ⚠️
...ain/java/fr/free/nrw/commons/utils/DialogUtil.java 0.00% 2 Missing ⚠️
...w/commons/contributions/ContributionsFragment.java 0.00% 1 Missing ⚠️
...ain/java/fr/free/nrw/commons/quiz/QuizChecker.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             master   #3496      +/-   ##
===========================================
- Coverage      7.75%   7.27%   -0.49%     
- Complexity        0     298     +298     
===========================================
  Files           255     257       +2     
  Lines         11318   11751     +433     
  Branches        924     953      +29     
===========================================
- Hits            878     855      -23     
- Misses        10373   10825     +452     
- Partials         67      71       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FawziyahAlebiosu
Copy link
Contributor Author

FawziyahAlebiosu commented Mar 19, 2020

I have successfully tested that:

  • showDuplicate method (which calls showDialog) works correctly with the new swapped yes and no buttons-see first screen recording.
  • showBadImagePopUp method (also calls showDialog) works correctly-see screen recording below
    realtest
    yestest
  • showNearbyCardPermission method: I tried to trigger this but because I'm running it on an emulator, it gives me a toast that Nearby might not work properly because location can't be found. Any suggestions on how to trigger this so I can test because I DID change it.
  • shownocategoryselected method: changed and tested successfully; see screen recording below
    categoryTest
    Again, Ik I keep saying this but I really appreciate your patience with me thus far. Let me know if I need to change anything or clarify anything.

@FawziyahAlebiosu
Copy link
Contributor Author

One more thing! In total there were about 10 usages of showDialog but only these ones were affected by the yes and no swap. Some only had a positive button text and the negative was null, and vice verse. Then there were some that were already correctly assigned like callQuiz method.

@macgills
Copy link
Collaborator

Good work @FawziyahAlebiosu

@macgills macgills merged commit d3bc072 into commons-app:master Mar 20, 2020
maskaravivek added a commit to maskaravivek/apps-android-commons that referenced this pull request Apr 20, 2020
* Versioning

* Update changelog.md

* Optimize imports (commons-app#3272)

* Convert few model classes to kotlin (commons-app#3270)

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3231 "Nearby" always first puts me in Punta Arenas (commons-app#3271)

* Update tables from 10 to 11

* Remove unneeded changes

* Update strings.xml (commons-app#3285)

Improve share_text string for commons-app#3192.

* Localisation updates from https://translatewiki.net.

* color accent changed tto blue in dark theme (commons-app#3234)

* Localisation updates from https://translatewiki.net.

* Fix UI tests (commons-app#3297)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Bugfix/null revision in review (commons-app#3309)

* Fixes commons-app#3305
 * Handle null firstRevision

* initialise explanation

* Fixes commons-app#3307 (commons-app#3308)

* Fixed positional argument format for string in "image_uploaded_by"

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* More natural language instead of a slash (commons-app#3318)

* Remove unnecessary space before colon (commons-app#3317)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Versioning for v2.12.1

* Update changelog.md

* Localisation updates from https://translatewiki.net.

* CategoryItem: add javadocs to the file (commons-app#3332)

* Change tempalte character case from EXIF to Exif (commons-app#3330)

* Fixes commons-app#3335 (commons-app#3337)

Handled sqlitexception for adding existig column in app versions which already have COLUMN location_pic

* Issue 3236: Change nearby search text to white (commons-app#3331)

* Clear parent from customView if parent is not null

* Apply white search bar theme to nearby search

* Undo changes from bad merge

* Fix up tag formatting

* Versioning for v2.12.2

* Update changelog.md

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3320 (commons-app#3349)

* Fixes commons-app#3320
* Added SSL certificate for commons beta
* Asked OKHTTP client to use SSLContext from beta certificate
* Probable Fix of commons-app#3345

* Use ConfigUtils to verify flavor

* Fixes commons-app#3345 (commons-app#3350)

* Fixes commons-app#3345
* Trust all hosts for beta
* Added a custom NetworkFetcger for Fresco when on beta

* removed unused assets

* make TestCommonsApplication extend Application instead of Commons Application

* Fixes commons-app#3336 Hotfix: Coordinates of picture are not uploaded (commons-app#3339)

* Fixes commons-app#3336
 * Donot redact locatio by default

* Correction inn default tag save

* Use same key across application for managedExifTags

* Updated key name to avoid class cast in existing build

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3327: Trim whitespaces from title on upload (commons-app#3348)

Trim WhiteSpaces from Image-Title while upload

* Fixes: commons-app#3343 TextUtils.isEmpty creates problems when unit testing with Mockito (commons-app#3344)

* TextUtils: add mock textUtils for tests

* TextUtils: add more methods to mock for testing

* UploadControllerTest: fix the test resulting travis ci to fail

* Fixes: commons-app#3278: Add java docs to methods which have it missing (commons-app#3351)

* achievements/: add Javadocs

* actions/: add Javadocs

* WikiAccountAuthenticator: add Javadocs

* ReasonBuilder: add Javadocs

* di: Add javadocs to DI files

* bookmarks: add Javadocs to bookmarks files

* di: Added more Javadocs

* file: add Javadocs for file picker

* actions: add proper decription to the classes

* Fixes: commons-app#3179 Make category search non case-sensitive (commons-app#3326)

* CategoryClient: fix category search case-sensitivity by converting to lower case as MW api is inherently case-sensitive, the results obtained will be same

* CategoryItem: reverting javadoc changes

* CategoriesModel: make category search case-insensitive

* CategoryItem: fix whitespaces

* Add tests for case-insensitivity

* CategoryClientTest: add more test cases

* CategoryClientTest: fix travis ci test

* CategoriesModelTest: changes mage to CategoriesModel and tested

* Suggest and auto fill title and description based on image location (commons-app#3323)

* Suggest and auto fill title and description based on image location

* with java docs

* Versioning for v2.12.3

* Update changelog.md

* Localisation updates from https://translatewiki.net.

* Fix: Issue commons-app#3367 Bug: SoftKeyboard showing even after switching from nearby tab to contribution tab (commons-app#3368)

Hide keyboard when switched back from NearbyFragment to ContributionsListFragment

* Localisation updates from https://translatewiki.net.

* Adds a Test for Method A categories search (commons-app#3366)

* CategoriesModelTest: add methodA test for categories search

* CategoriesModelTest: use lateinit wherever possible

* CategoriesModelTest: make method name meaningful

* Fixes commons-app#3303 (commons-app#3322)

* Fixes commons-app#3303
* Refactor Nearby to alig lifecycle methods

* Pass updated place list to listfragment

* Added default zoom rate to mapbox

* Removed NearbyListFragmet and added the ui login to handle the same in NearbyParentFragment

* More code refactor
* Make BottomSheetList hideable
* onFragmentHide, hide the bottom sheets

* BigFix, Fragmet visibility, register/un-register camera move based on fragments lifecycke

* More code refactor
* Let the ExecutorUtil have non-ui thread
* Add Location Marker on non-ui thread (the non-ui stuffs)

* BugFixes
* Removed configchanges "orientation" from MainActivity in Manifest (That was messing with the fragment lifecycle)
* Some null checks
* Initialise lastknown location in onMapReady

* UI Fixes
* Adjusted UI to support dark and no-dark themes both (in nearby)
* Do not update map on Location Slightly changed

* Fix failing test case, let TestCommonsApplication extend Application instead of CommonsApplication

* start map view when nearby is visible

* start the map when NearbyFragmet is visible

* More bugfixes
* Added DUMMY view for NearbyPresenter's onDetach State
* Added a wrapper frame layout parent for MapView to preven it from drawing above other views

* More bugfixes (Fixes commons-app#3287)
* Gray out the un-selected markers from the nearby filter list

* BugFix, search this area should search the nearby places for the current camera position

* More BugFixes
* Handle null primitives with proxy
* Current location marker flow via permission flow

* onCameraMove should have null-check on NearbyController.latestSearchLocation instead of currentLocation

* Search for places around last focus location

* Handle location updates
* If the user is browsing the map, donot update the map with current location

* Fixes commons-app#3371 (commons-app#3372)

* Is UserBrowsing should first check if last known location is non-null before checkig if last location and current locations are close

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3382 Fixed Notification Message  Icon Background (commons-app#3383)

* changing background color of conditions in nearby as uniform (according to chip state) (commons-app#3365)

Signed-off-by: Mudit Jain <ciphereck@gmail.com>

* Fixes commons-app#3392 Fixed Nearby List Item Icon's Background (commons-app#3393)

* Hide Review for logged out users (commons-app#3390)

It makes sense to not show the review activity for logged
out users for the same reasons that we don't allow users
to upload images.

We're even considering to limit the review activity to users
with a particular level of achievement[1]. So, it's valid to
not show review activity for logged out users who don't
have achievements levels at all.

[1]: commons-app#2852

* Localisation updates from https://translatewiki.net.

* Fix commons-app#3191 Make the username along with the rewards icon clickable in the Navigation Drawer (commons-app#3401)

* Don't show the quiz pop-up twice (commons-app#3398)

* Avoid showing the quiz pop-up twice to the user

Due to the current flow of code it's possible that in
some cases the quiz pop-up is shown to the user twice.
This is unnecessary and unintentional.

So, change the logic in such a way that the quiz pop-up
would be never be shown twice to the user.

Fixes: commons-app#3281

* Quiz: remove unused parameters from methods

Some methods don't seem to be using the parameters that
they receive. So, just remove the unused parameters.

* Fixed minor Login Bug (commons-app#3373)

* Fixes commons-app#3197 Replace hardcoded dimensions with dimen resource values (commons-app#3402)

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3403 Add padding between privacy policy button and bottom of the screen (commons-app#3404)

Fixes commons-app#3403 Add padding between privacy policy button and bottom of the screen

* code-quality: remove CDATA and <u> tags from string.xml (commons-app#3310)

Remove CDATA and <u> tags from string resources. Instead use setUnderlinedText() method added in Utils to create underlined string resources.

* fix typo commons-app#3417 (commons-app#3418)

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3355 : Do not display pins at all when "Needs Photo" is selected (commons-app#3407)

* ic_custom_greyed_out_marker: removing grey marker

* NearbyParentFragment: changing function name and description

* change method name to hideAllMarkers

* Localisation updates from https://translatewiki.net.

* Fix commons-app#3416 Add snackbar on clicking add/remove from bookmarks (commons-app#3419)

* Added progress dialog for setting wallpaper (commons-app#3427)

* Added progress dialog for setting wallpaper

* Updated dialog strings

* Localisation updates from https://translatewiki.net.

* Fixed a type in NearbyParentFragment.java where significantly was written instead of slightly while adding a log using Timber (commons-app#3432)

* Fixes commons-app#814 Added App Shortcuts (commons-app#3381)

* Fixes commons-app#814 Added App Shortcuts

* removed Review app shortcut

* Added Adaptive icons

* Localisation updates from https://translatewiki.net.

* Replace functions in FileUtilsTest with ones from kotlin-stdlib (commons-app#2943)

* Fix commons-app#3091: Remove odd code in CategoryImagesListFragment (commons-app#3133)

* Moved some Java files to kotlin (commons-app#3439)

* Converted NetworkConnectionType.java to Kotlin

* Converted Urls.java to Kotlin and Updated AboutActivity

* Improved code quality

* Open external links in same activity (commons-app#3395)

It's common for users to expect that re-opening the app would
allow them to "continue where they left off". This also applies
for the case where they leave the app after opening an
external link. It's natural for them to expect that they would
see the webpage they left open when they re-open the app. This
doesn't happen for our app as we open custom tabs in a separate
activity. As a consequence, this makes the experience
un-intuitive.

Fix this by opening custom tabs in the same activity.

Fixes: commons-app#2944

Co-authored-by: Adam Jones <jones_adam@rocketmail.com>

* Update mapbox, gradle and android plugin versions (commons-app#3443)

* Localisation updates from https://translatewiki.net.

* Fix existing Espresso tests (commons-app#3450)

* Fix existing Espresso tests

* Convert class to kotlin

* Added Support for System Wide Dark Theme (commons-app#3460)

* Added Support for System Wide Dark Theme

* changed methods to private

* Moved Strings to strings.xml

* Used Dagger to reduce code repetition

* Changes made as per review suggestions

* Minor Changes

* Fixes as per suggestions

* Minor Fixes as per suggestion

* made the variables static

* removed irrelevant code

* Localisation updates from https://translatewiki.net.

* commons-app#3469 Update Gradle Play Publisher to resolve issues with travis build (commons-app#3470)

* commons-app#3469 Update Gradle Play Publisher to resolve issues with travis build - update GPP/Gradle and use jacoco-android fork with gradle 6.0 support

* commons-app#3469 Update Gradle Play Publisher to resolve issues with travis build - remove extraneous space

* Comment out application id from default config

* About page: Update logos (commons-app#3472)

* Fixes commons-app#3295: Ultimate achievement: Too many contributions (commons-app#3378)

* commons-app#3476 Use individual test commands on CI instead of check  (commons-app#3477)

* commons-app#3476 Use individual test commands on CI instead of check - use individual commands and narrow scope

* commons-app#3476 Use individual test commands on CI instead of check - fix indentation

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#3414:  For v2.13, Handle zoom in media details view (commons-app#3422)

* MediaDetailFragment: add zoom feature

* fragment_media_detail: add SimpleDrawee for Scroll picture

* ZoomableActivity: activity which facilitates zoom in

* activity_zoomable: xml for zoom activity

* zoomControllers: controllers for handling gesture and zooming

* MediaDetailFragment: fixing name of image variable

* MediaDetailFragment: display as per the aspect ratio of image

* add zoom activity to AndroidManifest

* fix travis ci faliure

* fix resizing of image

* Shift contributions to use Room DB (commons-app#3324)

* Part of commons-app#3127
* Added Room Dependency
* Shifted ContributionsDao to use RoomDB

* Save and Fetch contributions via RoomDAO

* Bugfixes, fixed test cases, injected schedulers for ContributionsPresenter

* removed stetho

* Fixed ReviewHelperTest cases

* Fixed test cases in DeleteHelperTest

* Fetch all contributions [TODO add pagination to use this, maybe later in a seperate PR]

* Update Schema false in AppDatabase

* removed parameter from fetchControbutions

* Added logs for fetch contributions

* Fixed test case ContributionsPresenter

* Added an autogenerate primary key, submit save contributions on executor

* fixed getItemAtPosition

* MainActivity Config changes +=orientation

* BugFixes
* Make AppDataBase Singleton
* Set _id as autogenerate primary key [replacing the previously used filename, seems like they are not unique]
* Replace Execxutor Utils with Subscribers on Singles in UploadService
* BugFix, Upload Progress

* Remove un-nescessary null check on contributions in ContributionsListAdapter

* removed ContributionsListFragment [not-implemeted]

* Review suggested changes
* removed un-nescessary null checks
* provide ContributionsDao
* Minor bug fixes

* wip

* delete existing contributions table (from the existing db) on upgrade

* remove un-nescessary null checks in test classes

* shifted media to be a local variable in ReviewHelperTest

* removed captured folder

* Dispose composite disposables in UploadService

* replaced size check with isEmpty ContributionsPresenter

* transform saveContributions to a Completable

* Addressed comments in review
* Typo in Contributions
* ReasonBuilderTest (create media object instead of mocking)
* Use global Gson object instead of creating a new one in Converters

* Provide Gson to Converters from the CommonsApplicationComponent

* use static method instead of field instead of static field to provide GSON in Converters

* Modified gitignore to exclude captures/*

* [WIP] Implemented Espresso tests for upload with multilingual descriptions (commons-app#2830)

* With more upload tests

* Fix tests

* Fix tests

* openStreetMap attribution enabled (commons-app#3485)

* commons-app#3445 Add codestyle to git  - import google java code style, use predefined styles for kotlin/xml (commons-app#3486)

* commons-app#3488 Delete app/prod folder - deleted (commons-app#3489)

* Added AboutActivityTest (commons-app#3475)

* Added AboutActivityTest

* Changes made as per suggestions

* Removed File to resolve conflict

* Removed hardcoded packagename

* Changes as per suggestion

* Removed Unrelated changes

* Fixed Build Issues

* Localisation updates from https://translatewiki.net.

* commons-app#3493 App freezes for 15 seconds when you press Next in UploadMediaDetailsFragment (commons-app#3499)

* commons-app#3493 App freezes for 15 seconds when you press Next in UploadMediaDetailsFragment - add apropriate schedulers and convert justs to fromCallable

* commons-app#3493 App freezes for 15 seconds when you press Next in UploadMediaDetailsFragment - remove test for removed functionality

* commons-app#3493 App freezes for 15 seconds when you press Next in UploadMediaDetailsFragment - replace kotlin with java

* Revert stopgaps related to beta server cert issue (commons-app#3396)

* Revert stopgaps related to beta server cert issue

The upstream issue with Commons beta server has been
fixed now[1]. So, there's no point in stopgapping
the issue anymore. So, revert the related changes.

This reverts fa87eb5
and df426f7 which
correspond to PRs commons-app#3350 and commons-app#3349 respectively.

[1]: https://phabricator.wikimedia.org/T243881#5861983

* Test-fix: fix the failing CI test

* Chek if getContext() is instanceOf CategoryImagesCallback and only then request more images

* commons-app#3471 Remove android.enableUnitTestBinaryResources - remove line (commons-app#3478)

* Change item background according to the theme (commons-app#3480)

* Change item  background according to the theme

* Change background colour of item on being selected

* Change background colors using XML selectors

* solved crashing problem in nomination button (commons-app#3522)

solved crashing problem in nomination button

solved crashing problem in nomination button

* author not shown bug (commons-app#3525)

* Localisation updates from https://translatewiki.net.

* Fixes commons-app#2238 scalebar added in map  (commons-app#3511)

* scalebar added in map

* changes reverted in .idea/Project.xml

* magic numbers replaced with constants for scalebar

* Default setting for scaling unit

* Default setting for scalebar refresh interval

* Reformatted code for adding scalebar

* dimen values for scalebar params

* Fix p18 issue For an item with P18 item, do not add another one (commons-app#3527)

* Add p18value variable to contrib

* set place.pic to candidate contribution

* Add p18 value to contrib

* Passes p18 value to wikidata upload service

* Checks if pic parameter of the wikidata item is empty or not. If not, it does not overrides the existing image, it is just a regular commons upload.

* Make public var private

* Make current tests pass

* Add test case for p18 value is not empty

* Fix wrong log message

* Add nonnul annotation and fix method javadoc

* commons-app#3524 Convert SpinnerLanguagesAdapter to kotlin - converted to kotlin (commons-app#3528)

* commons-app#3524 Convert SpinnerLanguagesAdapter to kotlin - converted to kotlin

* commons-app#3524 Convert SpinnerLanguagesAdapter to kotlin - add KDoc - rework logic - format

* Fixes commons-app#3464, App posts deletion request notifications ({{subst:idw}}) on the wrong user's talk page (commons-app#3495)

* Fixed commons-app#3464: App posts deletion request notifications ({{subst:idw}}) on the wrong user's talk page

* Fixed DeleteHelperTest.kt

* Fixed DeleteHelper tests and null-pointer exception

* Modified DeleteHelper makeDeletion() test

* Reverted unintentionally modified Project.xml

* Raising exception when nominating for deletion with empty creator name

* Fixed code style

* Fixed code style

* Fixes commons-app#3465 Use AndroidX Pref (commons-app#3521)

* [WIP] Fixes commons-app#3465 Use AndroidX Pref

* Deleted Unused Files

* Added singleLineTitle

* Updated Gradle Properties

* Migrated to Androidx

* Inline Variable change

* optimise imports

* Fixed Crash on empty input

* Add a dialog to prompt user if location is off in Nearby when L… (commons-app#3438)

* Fixes commons-app#3359 Duplicate Photos in Contributions Page (commons-app#3515)

* Fixes commons-app#3359
* Cache thumb url & imageUrl in local db
* Use Fresco's ImageRequest to show images in ContributionViewHolder[this was the issue, we should have always used this to show the image]
* Deleted DisplayableContribution (not needed anymore)
* Exposed abstract function in ContributionDao to updateContribution

* * Make position private in ContributionViewHolder
* Remove MediaDataExtractor from ContributionsFragment

* * Show placeholder image for Contributions while the image loads
* setHasStableId's ContributionsAdapter

* make Random variable private in ContributionViewHolder

* replace local variable-if-with ternary operator in ContributionViewHolder

* Fix indentation/formatting of ternary operator in ContributionViewHolder

* I might revert this commit[I have reasons]

* Create in-memory drawables in CVH's onBind, caches are bad, add mental overhead

* Revert "I might revert this commit[I have reasons]"

This reverts commit 627ac91.

* minor formatting changes, reverted 627ac91

* uh-oh missed semicolon, java

* minor formatting changes

* Fixes 3536 (commons-app#3537)

* Removed the focus change listener of the username edittext (commons-app#3538)

* Modify PR template (commons-app#3548)

* Localisation updates from https://translatewiki.net.

* Issue commons-app#3428: Swapped text in dialog buttons  (commons-app#3496)

* Issue commons-app#3428: Swapped text in dialog buttons because, according to Android Convention, they were opposite each other

* Fixed Issue commons-app#3428 so it actually works correctly now: Swapped text in dialog buttons because, according to Android Convention, they were opposite each other

* Made sure that all of the places where the two types of showAlertDialog accurately match up with the new position of positive and negative text on the dialog box
Also removed occurences of empty lambda expressions and used null instead

* modified deletThisPicture to be accurate lambda call

* reverted mistake where ellipses replaced the three dots

* commons-app#3532 Issue with gitignore - synchronise section with default plugin state (commons-app#3535)

* Fixes commons-app#3473 Changed Names and Order or Theme Options (commons-app#3556)

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes  (commons-app#3543)

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - refactor FileProcessor

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - refactor and rename GpsExtractor

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - convert ImageCoordinates to kotlin

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - convert FileProcessor to kotlin

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - minor reformatting

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - fix compilation and naming issues

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - remove empty test

* commons-app#3408 Refactoring the FileProcessor and GPSExtractor classes - set coordinates for upload item if user chooses it

* Change "Archived" notifications to "Read" notifications (commons-app#3554)

* Change archived to read

* Change string names

* Fix hardcoded string in similar image dialog (commons-app#3563)

Fixes commons-app#3557

* Change BiMap to HashMap (commons-app#3572)

* Change BiMap to HashMap

* Change containsKey to containsValue and delete BiMap.java

* Localisation updates from https://translatewiki.net.

* PULL_REQUEST_TEMPLATE: request only issue number (commons-app#3545)

For some time now, GitHub is showing cards when we hover over an issue
number which gives us a quick summary of the issue. The issue title is
shown in the card among other things.

Given that and the fact that we already require the issue number to be
specified in the pull request description, it's now moot to
ask the contributors to include the issue title in the pull request
description. So, let's remove this unnecessary burden from them.

* Fix title/desc not getting filled for nearby picture (commons-app#3577)

* Wiki itemname displaying in toast (commons-app#3569)

* Wiki itemname displaying in toast

* Wikidata label displaying in toast

* Wikidata label displaying in toast

* wikiItemName added to parcelable methods

* Wikidata label displayed in toast

* Wikidata label displayed in toast

* commons-app#3579 p18Value causes NPE in WikidataEditService createClaimWithLogging - add null check (commons-app#3580)

* Fixes commons-app#3494 (commons-app#3519)

* better names for the upload warning dialog buttons commons-app#3494

* Dialog button pt2

* dialog buttons pt3

* round 4..

Co-authored-by: Hdot <a.hudaa@hotmail.com>

* Fix auto zoom issue commons-app#3391 Zoom level gets reset at every second. (commons-app#3564)

* Add method to check if curr location marker is vsible or not

* Recenter map if users see their current location marker

* Add new methods to Contract

* Localisation updates from https://translatewiki.net.

* PULL_REQUEST_TEMPLATE: clarify that issue number needs to be replaced (commons-app#3599)

Some contributors seem to be missing the fact that they have to mention
the issue number right after `Fixes ` to ensure the corresponding issue
gets closed[1] when the PR gets merged.

Clarify this by using a better phrase that clearly states that they
have to replace the placeholder text with the issue number.

[1]: https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

* swipe away failed notification (commons-app#3598)

* issue-commons-app#3567: logos in about activity visible (commons-app#3592)

* Fixes commons-app#3479: Implement Progress Bar for Zoom Activity  (commons-app#3481)

* ZoomableActivity: add hierarchy to view for displaying progress bar

* CircularProgressBar: circular progress bar for ZoomableDraweeView

* ZoomableActivity: add indeterministic loading spinner

* activity_zoomable: add inderterministic Progressbar

* remove circular progressbar and make changes to controller listener

* Fixes commons-app#3575 (commons-app#3602)

* Donot show random colors as placeholders for contributions items
* Theme contributionsItem background as mainBackground from attributes

* Fixes commons-app#3611 (commons-app#3613)

* Properly generate Parcealables for Media & Contribution

* issue-commons-app#3606: cancel in translate goes back to about screen (commons-app#3610)

* Localisation updates from https://translatewiki.net.

* Fixed issue commons-app#3195 ordering contribution list (commons-app#3589)

* issue-commons-app#3195: order contribution list refactored

* issue-commons-app#3195: ordered contribution list

* exit app on back pressed in tutorial (commons-app#3597)

* exit app on back pressed in tutorial

* exit app from ongoing tutorial

* exit app on back press in tutorial

* Fixes commons-app#3466  No crash information in crash email (Gmail) (commons-app#3605)

* Send ACRA logs as file instead

* no need to set it true, default is true

* Fixed issue commons-app#3195 ordering contribution list (commons-app#3589)

* issue-commons-app#3195: order contribution list refactored

* issue-commons-app#3195: ordered contribution list

* Update wiki page links (commons-app#3608)

We've moved the documentation to a separate repo.

So, change the old links to point to the corresponding
places in the documentation repo.

* Fixes commons-app#3506: Image height remains zero for some time on bad network (commons-app#3513)

* optimise width loading

* amending as per the reviews

* aspect ratio updates after layout completion

* MediaDetailFragment: update aspect ratio using onGlobalLayoutListener

* remove unnecessary imports

* commons-app#3492 Add inspections to git - add inspection profile (commons-app#3631)

* commons-app#3628 Update Gradle Plugin - bump version (commons-app#3629)

* commons-app#3624 DateTimeFormat wrong - match pattern returned from servers (commons-app#3625)

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Copy place name on long click (commons-app#3609)

* Copy place name on long click

* Remove hard coded string

* Fixed logout problem commons-app#3547 (commons-app#3649)

* fixed logout problem

fixed logout problem

fixed logout problem

fixed logout problem

fixed logout problem

* added error handling on logout

* Fast scroll issue fixed (commons-app#3593)

* fast scroll fixed in explore activity

* fast scroll fixed in explore activity

* fast scroll issue in explore

* fastscroll removed from explore

* Converted DialogUtil to Kotlin (commons-app#3621)

* Converted DialogUtil to Kotlin

* Kotlin syntax and standard changes

* Removed ;

* Added missing null

* Added missing null

* Removed unnecessary code

* Reduced functions

* added let to customView

* reverted "let" changes

* reverted "let" changes

* removed if-statements

* replaced with "it"

* fixed overflow error

* Function rename

* Used named arguments

* Fix Typo

* single lined

* Update DialogUtil.kt

* changed default value

* ReviewController: remove call to review category notif builder while sending thanks (commons-app#3655)

* With data-client added as library module (commons-app#3656)

* With data-client added as library module

* Fix build

* Fixed username visible after logout bug (commons-app#3648)

* Localisation updates from https://translatewiki.net.

* commons-app#3630 [Library Discussion] Core-ktx (commons-app#3660)

* Convert download code to kotlin (commons-app#3665)

* Remove unused constructor (commons-app#3668)

* commons-app#3658 Throw exception instead of allowing nullable network models onError - peek response body and throw error (commons-app#3659)

* commons-app#3658 Throw exception instead of allowing nullable network models onError - peek response body and throw error

* commons-app#3658 Throw exception instead of allowing nullable network models onError - allow for more general error response catching

* Address code review comments (commons-app#3669)

* Fixes commons-app#3436 and commons-app#2881: Media Detail design Overhaul (commons-app#3505)

* ic_map_dark_24dp: map icon for white background

* ic_info_outline_dark_24dp: info icon for dark background

* MediaDetailFragment: update the spacer as per image aspect ratio

* fragment_media_detail: design overhaul

* fragment_media_detail: remove redundant background color statements

* make requested changes

* add dark mode support

* minor ui tweak

* white map icon in dark mode

* make rquested changes

* make requested changes to layout

* fix misalignment of category list

* subtle amendments

* convert comments to javadocs

* minor amendments

* minor changes

* add styles for media detail

* Media detail fragment refactored

* make suggested changes

* minor name fix

* fix the delete button border

Co-authored-by: Josephine Lim <josephinelim86@gmail.com>
Co-authored-by: Manuel Alcaraz <47950933+m-alzam@users.noreply.github.com>
Co-authored-by: translatewiki.net <l10n-bot@translatewiki.net>
Co-authored-by: neslihanturan <tur.neslihan@gmail.com>
Co-authored-by: Zoran Dori <zorandori4444@gmail.com>
Co-authored-by: ANKIT <bhardwajankit1414@gmail.com>
Co-authored-by: Ashish Kumar <ashishkumar468@gmail.com>
Co-authored-by: Amir E. Aharoni <amir.aharoni@mail.huji.ac.il>
Co-authored-by: Kshitij Bhardwaj <44129798+kbhardwaj123@users.noreply.github.com>
Co-authored-by: Malcolm Smith <malcolmsmith18@gmail.com>
Co-authored-by: Alicia <12453997+albendz@users.noreply.github.com>
Co-authored-by: Somanshu <somanshS14@gmail.com>
Co-authored-by: animeshk08 <32506591+animeshk08@users.noreply.github.com>
Co-authored-by: Madhur Gupta <30932899+madhurgupta10@users.noreply.github.com>
Co-authored-by: Mudit Jain <ciphereck@gmail.com>
Co-authored-by: Kaartic Sivaraam <kaartic.sn@zohocorp.com>
Co-authored-by: Yash Khare <yashsja@gmail.com>
Co-authored-by: Aastha Bist <abist119@gmail.com>
Co-authored-by: gouri-panda <gouripanda4@gmail.com>
Co-authored-by: Aryan Tyagi <aryantyagiofficial@gmail.com>
Co-authored-by: Veyndan Stuart <veyndan@gmail.com>
Co-authored-by: Aristos Pasalidis <33037826+rtsketo@users.noreply.github.com>
Co-authored-by: Adam Jones <jones_adam@rocketmail.com>
Co-authored-by: Seán Mac Gillicuddy <seantheappdev@gmail.com>
Co-authored-by: Anmol Gupta <44764339+6point022@users.noreply.github.com>
Co-authored-by: taakanksha <37452934+aakankshaa23@users.noreply.github.com>
Co-authored-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Co-authored-by: 318anushka <45694892+318anushka@users.noreply.github.com>
Co-authored-by: Vitaly V. Pinchuk <vetal.978@gmail.com>
Co-authored-by: Fawziyah Alebiosu <fawziyah.alebiosu@gmail.com>
Co-authored-by: hudlerr <ha241@student.le.ac.uk>
Co-authored-by: Hdot <a.hudaa@hotmail.com>
Co-authored-by: Prince Amankwah <iprins88@yahoo.com>
Co-authored-by: Prince Amankwah <pramankwah@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialog buttons set as opposite to Android design conventions
4 participants