Skip to content

Added ContextMenu Button for Previewing Online Books #1110

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

Merged
merged 2 commits into from
May 18, 2024

Conversation

ShaopengLin
Copy link
Collaborator

Fix #1100

Changes:

@ShaopengLin ShaopengLin force-pushed the Issue#1100-add-preview-button branch from eee8fb2 to 346fb55 Compare May 14, 2024 23:04
@ShaopengLin ShaopengLin force-pushed the Issue#1100-add-preview-button branch from 346fb55 to 73ee0b6 Compare May 15, 2024 16:33
@ShaopengLin ShaopengLin force-pushed the Issue#1100-add-preview-button branch from 73ee0b6 to 2d22286 Compare May 16, 2024 00:09
Copy link
Collaborator

@veloman-yunkan veloman-yunkan left a comment

Choose a reason for hiding this comment

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

Good.

Please split the PR into two commits:

  1. Extracting a piece of inline code into a new function ContentManager::getRemoteLibraryUrl() so that you can take advantage of it while implementing the desired functionality.
  2. Implementing the functionality itself.

As a general rule - we care not only about the final code but also about the path of arriving at it. As a series of small commits the change is easier to comprehend. Also it allows to distinguish changes that affect user-observable behaviour from refactoring changes where only the organization of the code is concerned.

Refactored existing file static function makeHttpUrl to a member function that retrieves the remote library url from the request manager. Will be used for implementing the preview functionality.
Added action to open preview of an online book in native web browser. The option is available for books with states  Online, Downloading, and Paused.
@ShaopengLin ShaopengLin force-pushed the Issue#1100-add-preview-button branch from 2d22286 to 0c86518 Compare May 18, 2024 18:37
@kelson42 kelson42 merged commit ba6fee9 into kiwix:main May 18, 2024
4 checks passed
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.

Support for previewing online books
3 participants