-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Todo for user #3851
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
Todo for user #3851
Conversation
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.
Could you please add tests to make sure this change works as expected?
Thanks for the PR @neslihanturan . These are quite substantial changes, could you add unit tests to your PR please? :) I will test this tomorrow, @maskaravivek or @ashishkumar468 it would be great if one of you could do a code review. |
.idea/codeStyles/Project.xml
Outdated
<option name="CONTINUATION_INDENT_SIZE" value="4" /> | ||
<option name="TAB_SIZE" value="2" /> |
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.
Please reset this
@@ -325,4 +325,4 @@ | |||
</indentOptions> | |||
</codeStyleSettings> | |||
</code_scheme> | |||
</component> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt add any new lines at the and of the file, I dont get what this change is. Any idea?
Yes, as you can see in my second screenshot the keyboard is closed (otherwise the list of categories would not even be displayed).
IMO for a dialog that requires a lot of tapping, it would be a lot better to have an "x" button on the top right to close, rather than closing with every mis-tap. :) |
Codecov Report
@@ Coverage Diff @@
## master #3851 +/- ##
===========================================
- Coverage 8.69% 8.55% -0.15%
Complexity 366 366
===========================================
Files 319 321 +2
Lines 11774 11971 +197
Branches 914 937 +23
===========================================
Hits 1024 1024
- Misses 10693 10890 +197
Partials 57 57
Continue to review full report at Codecov.
|
@misaochan I recognized an issue which is not reported here: 1- Simple, save categories to media object and display media.getCategories() + new categories to user |
|
||
public void updateCategories(List<String> selectedCategories) { | ||
Single<Boolean> resultSingle =reasonBuilder.getReason(media, null) | ||
.flatMap((reason) -> categoryEditHelper.makeCategoryEdit(getContext(), media, selectedCategories, this)); |
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.
Here @ashishkumar468 , there is no need to build a reason. I just tried to mimic the same implementation as deleteHelper which does not raise exception. I don't know what I can put to this line, to be able to call flatMap.
For other implementation, see line 747 of same file
private void onDeleteClicked(Spinner spinner) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not understand @neslihanturan . What is the issue with this implementation?
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.
well, I don't need to buıild a reason as "reasonBuilder.getReason(media, null)". It is only a need for deletion request. I used that line just to be able to implement the same structure with line 747. But my rxjava knowledge doesnt help me to find what to put before .flatMap, if not needed. Is it clear now?
@misaochan this one is ready to be tested and probably be merged, after @ashishkumar468 's help:) |
Hi @neslihanturan , thanks for making the changes! :) It works well for me now, there is just one item from #3851 (comment) that seems to not work:
This problem still happens for me. Once this is fixed I am happy to merge. |
app/src/main/res/values/strings.xml
Outdated
@@ -598,6 +598,18 @@ Upload your first media by tapping on the add button.</string> | |||
<string name="delete_helper_ask_reason_copyright_logo">Logo</string> | |||
<string name="delete_helper_ask_reason_copyright_other">Other</string> | |||
<string name="delete_helper_ask_alert_set_positive_button_reason">Because it is</string> | |||
|
|||
<string name="category_edit_helper_make_edit_toast">Trying to update categories.</string> | |||
<string name="category_edit_helper_show_edit_title">Categories are updated</string> |
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.
Based on my interpretation, the notification title would be "Categories are updated: Success" if the categories are successfully updated, and "Categories are updated: Could not add categories" if they are not, right? In that case I think this string should be Category update
instead of Categories are updated
.
app/src/main/res/values/strings.xml
Outdated
<item quantity="one">Category %1$s is added.</item> | ||
<item quantity="other">Categories %1$s are added.</item> | ||
</plurals> | ||
<string name="category_edit_helper_show_edit_title_failed">Failed</string> |
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.
Is this string ever used?
Great job @neslihanturan ! |
* Add a simple message * Categories are edited * Display categories * read whole page * Revert wrong changes * Add newly added category field * Doesnt displaey alreasy added categories * add strings for notifications * clean code * Readd accidentally removed imports * Fix edit layout style * Fix category update messages * Pass isWikipediaButtonDisplayed information to fragment * Remove unused class * Fix strings * Fix string * Add exeption for uncategorised images too * Revert project.xml changes * fix update buttonvisibility issue * Make sure it works for auto added categories too * make the button visible * Make the button appear when categories are entered * Include cancel button * Make view updated too * Make category view edited * Update categories in an hacky way * Fix unnecessary method call * Add notes for short term fix to display added category * Fix tests * Fix strings * Fix click issue
* Add a simple message * Categories are edited * Display categories * read whole page * Revert wrong changes * Add newly added category field * Doesnt displaey alreasy added categories * add strings for notifications * clean code * Readd accidentally removed imports * Fix edit layout style * Fix category update messages * Pass isWikipediaButtonDisplayed information to fragment * Remove unused class * Fix strings * Fix string * Add exeption for uncategorised images too * Revert project.xml changes * fix update buttonvisibility issue * Make sure it works for auto added categories too * make the button visible * Make the button appear when categories are entered * Include cancel button * Make view updated too * Make category view edited * Update categories in an hacky way * Fix unnecessary method call * Add notes for short term fix to display added category * Fix tests * Fix strings * Fix click issue
Description (required)


Fixes #1870
You can see the todo warning to improve the quality of the image below
After selecting edit icon, a filter will appear
Then after selecting and clicking to update categories button category will be added

Note: I didn't preferred to add an icon to contributions list to indicate the todo list, since #3783 also adds an icon to contributions list. Two different icons for almost same thing would be confusing. I think after this PR is merged, we should move wikipedia association button to inside (media details fragment) and todo (for missing category and wikipedia association) to outside (category list).