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

Added the 'Export bookmarks' feature. #3724

Merged
merged 7 commits into from
Jun 7, 2024
Merged

Added the 'Export bookmarks' feature. #3724

merged 7 commits into from
Jun 7, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

@MohitMaliFtechiz MohitMaliFtechiz commented Feb 28, 2024

Fixes #822

  • The application now exports the 'bookmark.xml' file to the 'Downloads/org.kiwix...' folder.
  • Introduced an export bookmark feature in the settings screen, allowing users to export all bookmarks with a simple click easily. A dialog prompt appears before exporting, indicating where the exported bookmarks will be saved.
  • A test case for this change was added to our settings test.
screen-20240604-102547.mp4
screen-20240604-171012.mp4

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

Attention: Patch coverage is 36.47059% with 108 lines in your changes missing coverage. Please review.

Project coverage is 53.66%. Comparing base (94feb77) to head (cbefb3d).
Report is 13 commits behind head on main.

Current head cbefb3d differs from pull request most recent head 9c6aeec

Please upload reports for the commit 9c6aeec to get more accurate results.

Files Patch % Lines
...wix/kiwixmobile/core/settings/CorePrefsFragment.kt 19.75% 58 Missing and 7 partials ⚠️
...rg/kiwix/kiwixmobile/core/dao/LibkiwixBookmarks.kt 42.46% 37 Missing and 5 partials ⚠️
...java/org/kiwix/kiwixmobile/core/StorageObserver.kt 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3724      +/-   ##
============================================
- Coverage     53.86%   53.66%   -0.21%     
- Complexity     1376     1389      +13     
============================================
  Files           298      298              
  Lines         11308    11472     +164     
  Branches       1495     1520      +25     
============================================
+ Hits           6091     6156      +65     
- Misses         4226     4318      +92     
- Partials        991      998       +7     

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

@kelson42
Copy link
Collaborator

@MohitMaliFtechiz Thank younfor this PR:

  • Does it mean bookamrks are handled now in libkiwix and not in Objectbox?
  • Why exporting the library.xml? I see no vakue?
  • would you be able to code the import as well so the user just has to choose the bookamrks.xml and the he recovers his bookmarks?

@MohitMaliFtechiz
Copy link
Collaborator Author

Does it mean bookamrks are handled now in libkiwix and not in Objectbox?

@kelson42 Yes, now we are saving and retrieving the bookmarks in libkiwix.

Why exporting the library.xml? I see no value?

library.xml contains the favicon and ZIM file path of the saved bookmarks so without exporting the library.xml we can't open the bookmark and the favicon will not be displayed on the bookmark screen.

would you be able to code the import as well so the user just has to choose the bookamrks.xml and the he recovers his bookmarks?

@kelson42 Yes, we can implement functionality in our application and guide the user to select these two files when importing the bookmarks because we need these two files to properly import the bookmarks. I was also thinking about it and i purposed this in group for your feedback.

@kelson42
Copy link
Collaborator

I really see a peovlem that library.xnl is mandatory to import bookmark.xml. Please open an issue at kiwix/libkiwix.

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 I have opened a ticket in libkiwix kiwix/libkiwix#1069 for this.

@MohitMaliFtechiz MohitMaliFtechiz marked this pull request as draft March 29, 2024 06:00
@kelson42
Copy link
Collaborator

kelson42 commented Jun 3, 2024

@MohitMaliFtechiz I believe, at this time, you don't understand how the import of bookmarks will work without having the library.xml exported/imported. Please complete the feature with only the export feature like requested first.

* The application now exports 'bookmark.xml' file to the 'Android/media/org.kiwix...' folder. Users can copy this file to the 'Android/data/org.kiwix.../files/Bookmarks/' folder to view the exported bookmarks.
* Introduced an export bookmark feature in the settings screen, allowing users to easily export all bookmarks with a simple click. A dialog prompt appears before exporting, indicating the location where the exported bookmarks will be saved and providing instructions on how to import them.
* Added a test case for this change in our settings test.
* Improved the location of exporting the bookmarks.
* Improved the messages that will clearly shows where and in which file bookmarks are exported.
* Refactored the test cases for this new change.
* Now user can easily import the exported bookmarks by just selecting the exported `bookmark.xml` file.
@kelson42 kelson42 merged commit 1b255d5 into main Jun 7, 2024
8 checks passed
@kelson42 kelson42 deleted the Fix#822 branch June 7, 2024 04:40
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.

Export bookmarks feature
3 participants