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
Added the feature to display the external link in the warning dialog box #3193
Conversation
Few remarks:
|
Okay, willl remove "Link-"
I guess all there buttons are on three different lines, also I did not did not change anything related to the buttons. This is how the dialog box looks on the develop branch |
@shankarpriyank Don't remove the link, remove "Link -" label. We know this is a lonk, not needed to explain it. |
Hey @kelson42 I have removed the label, and also fixed the failing tests. |
@shankarpriyank Thank you, @gouri-panda will review your work. Give him a few days. |
@shankarpriyank You can suppress this by annotating method supress warnings or make a constant value. |
Thanks, I understand the supressing alternative, but what do you mean by " make a constant value?" Also can you please help me with the failing tests, I don't have much experience in testing,but after having a look at the log it seems to me like that the mock objects in some ways different to the real one. |
Constant value means create a constant variable. The error is simply means you can't put only numbers in arguments. By doing that we can put different number in different locations by mistake. In order to not make this mistake we can put a constant variable and use it everywhere else. |
I guess I have done that same thing
I declared these variables and then passed them as arguments in this function
|
core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/AlertDialogShower.kt
Outdated
Show resolved
Hide resolved
@kelson42 Are you ok with the UI? |
@gouri-panda AFAIK the UI has not been fixed, so would like to see a proper UI, the current one buttons are not properly aligned. |
@kelson42 Ok. @shankarpriyank Please change the UI as @kelson42 mentioned. Then I'll review the other parts :) Also, the other errors haven't been fixed yet. |
If the alignment problen can not be fixed, please open a dedicated ticket. Then we could finally review and merge this PR. |
It should be also confirmed that #2966 has been fixed. |
@shankarpriyank This test is failing.
The |
@MohitMaliDeveloper Can you please complete the work here so we can move ahead? |
Hey @kelson42 I am still working on modifying the tests so that they pass. I donot have much experience in testing and this is the first time I am encountering mocks so its a bit challenging. I could use some help to fix the tests. |
@shankarpriyank Sorry, my bad, I had the feeling you were in a dead-end. |
core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/AlertDialogShower.kt
Outdated
Show resolved
Hide resolved
).show() | ||
true | ||
} | ||
textView.text = Html.fromHtml("</br><a href=$url> <b>$url</b>") |
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.
Suggestion: Instead of converting a link to html text, you can always use spannable string, and implement a custom click behaviour here, instead of leaving it to OS.
What is the status here? |
The functionality has been implemented, but I am unable to modify the tests so that they pass. Took some help from @4shutosh but still no success. |
@MohitMaliDeveloper Any chance you can complete and review his PR? |
ok |
Codecov ReportBase: 49.68% // Head: 49.63% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #3193 +/- ##
=============================================
- Coverage 49.68% 49.63% -0.05%
Complexity 25 25
=============================================
Files 290 291 +1
Lines 9800 9834 +34
Branches 1309 1311 +2
=============================================
+ Hits 4869 4881 +12
- Misses 4266 4282 +16
- Partials 665 671 +6
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@MohitMaliFtechiz Have you finished the necessary work? Shoukd you remove the draft mode? |
@kelson42 ,
Ui changes are left. |
@MohitMaliFtechiz OK, who will do that? |
@kelson42 , I'm working on it. |
@kelson42 , Example :- In Portrait Mode In Landscape Mode If we want to change the UI then we need to use a custom layout with |
@MohitMaliDeveloper Not too bad, can we reduce the big white space? Please rebase the PR as well. |
@kelson42 , unfortunately not, it's automatically takes height according to it's views (when we call
I have re base the PR and resolved the conflicts. |
@MohitMaliDeveloper Is that ready to review (please rebase and fix conflicts)? |
@kelson42 , i'm waiting for your feedback on above comment. that's why this PR in draft, if that is okay for you then this PR is ready for review. |
@MohitMaliFtechiz LGTM. If you request something from me, please specificaly ask with a question mark. |
71a9314
to
711c719
Compare
@kelson42 , I have resolved the conflicts. @gouri-panda this PR is ready for review. |
@MohitMaliDeveloper Thanks! Will do! |
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.
@MohitMaliDeveloper @shankarpriyank I overviewed the PR. I leave some comments about this. The external link colour doesn't look good on the dark theme. Just a small friendly reminder, please don't change the unrelated code to tickets as you did here, changing the licence and renaming the function names.
core/src/main/java/org/kiwix/kiwixmobile/core/utils/dialog/AlertDialogShower.kt
Outdated
Show resolved
Hide resolved
@gouri-panda , thanks for your feedback.
|
@MohitMaliDeveloper Did you push it? I don't see recent changes. |
hi @gouri-panda , |
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.
@shankarpriyank @MohitMaliDeveloper Thanks for the work 🎉 !
…ethod and improved code
44a8892
to
4af50e3
Compare
Fixes #2966
Fixes #2965
Made changes to files related to Dialog Boxes, to show the URL of external link in the warning dialog box
Screenshots