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

Fixes of Display Navigation History #3239

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Fixes of Display Navigation History #3239

merged 1 commit into from
Mar 10, 2023

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Feb 21, 2023

Fixes #3042

  • I have use WebBackForwardList list of WebView class for showing navigation history(backward and forward).
  • I have create a dialog to show NavigationHistory to user (this list is scrollable), when user long click on backward and forward button.
Backward History Forward History
backwardhistory forwardhistory
  • I have create automated test (NavigationHistoryTest) for testing this functionality.

In the preference panel, an option should allow to clear the history.

@kelson42 , since we are not saving history to database, we are using webview history for showing backward and forward list. In webview we have only one method clearHistory() to clear the history(but it will clear full history for currently opened book, so user can not go back and forward. so that's why i have not implemented this).

  • Added navigation history delete feature to delete all navigation history.
navigation.history.mp4

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft February 21, 2023 12:44
@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Patch coverage: 76.31% and project coverage change: +0.53 🎉

Comparison is base (9dad7cb) 49.62% compared to head (21da71e) 50.15%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #3239      +/-   ##
=============================================
+ Coverage      49.62%   50.15%   +0.53%     
  Complexity        25       25              
=============================================
  Files            299      304       +5     
  Lines          10010    10162     +152     
  Branches        1329     1348      +19     
=============================================
+ Hits            4967     5097     +130     
+ Misses          4356     4355       -1     
- Partials         687      710      +23     
Impacted Files Coverage Δ
...obile/core/page/history/NavigationHistoryDialog.kt 66.66% <66.66%> (ø)
.../kiwix/kiwixmobile/core/main/CoreReaderFragment.kt 34.38% <75.00%> (+2.61%) ⬆️
...e/page/history/adapter/NavigationHistoryAdapter.kt 100.00% <100.00%> (ø)
.../page/history/adapter/NavigationHistoryDelegate.kt 100.00% <100.00%> (ø)
.../page/history/adapter/NavigationHistoryListItem.kt 100.00% <100.00%> (ø)
...age/history/adapter/NavigationHistoryViewHolder.kt 100.00% <100.00%> (ø)
...kiwix/kiwixmobile/core/utils/dialog/KiwixDialog.kt 34.34% <100.00%> (+1.70%) ⬆️
...rg/kiwix/kiwixmobile/core/search/SearchFragment.kt 62.22% <0.00%> (+3.33%) ⬆️
...g/kiwix/kiwixmobile/core/main/CoreWebViewClient.kt 37.50% <0.00%> (+7.50%) ⬆️

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review February 22, 2023 13:04
@kelson42
Copy link
Collaborator

In the preference panel, an option should allow to clear the history.

@kelson42 , since we are not saving history to database, we are using webview history for showing backward and forward list. In webview we have only one method clearHistory() to clear the history(but it will clear full history for currently opened book, so user can not go back and forward. so that's why i have not implemented this).

This is exactly what we want: remove old traces of navigation. What is the problem?

@MohitMaliFtechiz
Copy link
Collaborator Author

What is the problem?

@kelson42 , I'm not implementing this because ,let's suppose user on 7th page and he clear the history, then he can not go back to previous page or forward if any page in forward (then current page will become the first page).

This is exactly what we want: remove old traces of navigation.

Okay if this is the case ,i'm implementing this it's need a small change in code.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft February 27, 2023 06:37
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review February 27, 2023 10:58
@kelson42
Copy link
Collaborator

kelson42 commented Mar 6, 2023

@gouri-panda can you please review this PR?
@MohitMaliFtechiz can you please rebase?

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft March 9, 2023 05:41
@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as ready for review March 9, 2023 05:56
@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 , I have rebase the PR and resolved the conflicts. @gouri-panda now you can re-review this PR.

Copy link
Collaborator

@gouri-panda gouri-panda left a comment

Choose a reason for hiding this comment

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

@MohitMaliFtechiz Thanks 🎉

@kelson42 kelson42 merged commit 18d2d40 into develop Mar 10, 2023
@kelson42 kelson42 deleted the Issue#3042 branch March 10, 2023 05:27
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.

Display Navigation History
4 participants