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

Iframe-based content viewer #716

Merged
merged 42 commits into from
Sep 22, 2022
Merged

Iframe-based content viewer #716

merged 42 commits into from
Sep 22, 2022

Commits on Sep 21, 2022

  1. Configuration menu
    Copy the full SHA
    dea674e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4db443e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e5f97d9 View commit details
    Browse the repository at this point in the history
  4. Improved browsing history tracking & traversal

    Before this fix, browsing history didn't work at all. Now it mostly
    works but there are still some quirks that must be debugged further.
    
    Since session history handling turns out to be a rather complex topic
    (see https://html.spec.whatwg.org/multipage/history.html) the work in
    that direction will be postponed until other features reach a comparable
    level of readiness.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    4105be9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    228e31c View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7c6c315 View commit details
    Browse the repository at this point in the history
  7. viewer += static/templates/head_taskbar.html

    Javascript code inside taskbar.js doesn't work correctly with the new
    viewer.  Will fix any issues in a clone of static/skin/taskbar.js.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    5b545d8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    58e4571 View commit details
    Browse the repository at this point in the history
  9. viewer_taskbar.js + viewer.html = BFF

    Foundation for never-ending friendship between viewer_taskbar.js and
    viewer.html has been established by a slight change in how the book name
    is obtained and commenting out the rest of the code.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    f41e71b View commit details
    Browse the repository at this point in the history
  10. viewer += <!--static/templates/taskbar_part.html-->

    Added to static/skin/viewer.html the contents of
    static/templates/taskbar_part.html inside a comment block.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    7be7a8e View commit details
    Browse the repository at this point in the history
  11. Enabled the library button on the taskbar

    The greenish taskbar placeholder is gone. The appearance of the old taskbar
    is restored. However the taskbar currently contains only the library
    button (but the latter leads to the currently blank welcome page).
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    0c4d9e8 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    17ff2a0 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    a944671 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4a55b13 View commit details
    Browse the repository at this point in the history
  15. Enabled searchbox in the iframe-based viewer

    Known issues:
    
    - the placeholder text in the searchbox is incorrect
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    77d9777 View commit details
    Browse the repository at this point in the history
  16. Welcome page interoperates with iframe-based viewer

    - /viewer (without any hash) dynamically redirects to the welcome page
    
    - The book links on the welcome page point to the iframe-based viewer
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    eadc0ac View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    7ed01e7 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    9484357 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    29efb88 View commit details
    Browse the repository at this point in the history
  20. Searchbox correctly tracks the current book

    Before this fix there were two issues with the taskbar search box:
    
    1. The book used for the suggestions API was resolved only once during
       the page load and didn't change during navigation.
    
    2. The current book could not be resolved from a search URL.
    
    Now both issues are fixed.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    2083c39 View commit details
    Browse the repository at this point in the history
  21. Hiding of the suggestions drop-down list

    - Suggestions disappear when search is performed as a result of pressing
      enter in the search box.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    9a19373 View commit details
    Browse the repository at this point in the history
  22. Removed old-style taskbar injection

    Double-toolbar in the viewer has gone.
    
    Some clean-up has to be performed after this change.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    40c496d View commit details
    Browse the repository at this point in the history
  23. Dropped TaskbarInfo

    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    0cf4850 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    c73e6f9 View commit details
    Browse the repository at this point in the history
  25. Removed unused param from ContentResponse::build()

    Removed the isHomePage param from one of the variants of
    `ContentResponse::build()`. The other overload is dangerous since
    failing to review&update all of its call site may result in changed
    semantics. Will do it in a couple of separate commits.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    c988511 View commit details
    Browse the repository at this point in the history
  26. Undefaulted bool params of ContentResponse::build()

    This resulted in compiler aided discovery of all call sites where the
    default values were used. For OPDS/catalog requests now passing true for the
    `raw` parameter, since XML content isn't supposed to undergo any
    transformations.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    eb0a45b View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    0ce36e6 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    685e7f8 View commit details
    Browse the repository at this point in the history
  29. Dropped root link injection

    The only place that the root link is now used is in /skin/index.js,
    so added it in static/templates/index.html. But it seems that nothing
    prevents us from from switching from aboslute paths to relative paths
    in /skin/index.js, which will eliminate the need for the root link
    altogether.
    
    As a result of this change content is never decorated by kiwix serve.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    a674561 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    6cc677b View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    b81cb3a View commit details
    Browse the repository at this point in the history
  32. Viewer settings

    Made the viewer respect the `--blockexternal` and `--nolibrarybutton`
    options of `kiwix-serve`. Those options are passed to the viewer
    via the dynamically generated resource `/viewer_settings.js`.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    369406f View commit details
    Browse the repository at this point in the history
  33. Partly respecting the kiwix-serve --nosearchbar option

    `--nosearchbar` option of `kiwix-serve` (despite its misleading name)
    was used to disable the entire taskbar. This commit accounts for the
    existence of that option only partially:
    
    1. Links to books on the welcome/library page are affected - by default
       books are displayed in the viewer, but in a kiwix-serve instance run
       with --nosearchbar books are loaded in the top window.
    
    2. The `/viewer` endpoint is enabled unconditionally, so if anyone
       enters the viewer URL in the address bar they will see books in the
       viewer.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    2be9ac3 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    da23e4e View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    ae01790 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    796e729 View commit details
    Browse the repository at this point in the history
  37. Partly fixed auto-hiding of the toolbar

    Auto hiding of the toolbars on narrow screens works only for the first
    page loaded in the viewer. Navigating to other pages interferes with
    autohiding as follows:
    
    - If the toolbar was hidden, it stays hidden.
    
    - If the toolbar was not hidden, it loses the ability to autohide.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    4e06bb6 View commit details
    Browse the repository at this point in the history
  38. Respecting the --nosearchbar option of kiwix-serve

    If `kiwix-serve` is run with the `--nosearchbar` option the toolbar is
    disabled (hidden) in its viewer.
    
    Note however that certain actions performed by the viewer merely with
    the purpose of keeping the toolbar up-to-date are still carried out.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    cac2d21 View commit details
    Browse the repository at this point in the history
  39. Fix cacheids after a rebase

    A rebase invalidated the cacheids in the previous commits of the
    iframe_based_content_viewer branch. This commit fixes only the current
    state leaving the history with wrong cacheids - this can be an issue
    for `git bisect` being executed on a commit range overlapping with
    the iframe_based_content_viewer branch.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    defa387 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    fa67b45 View commit details
    Browse the repository at this point in the history
  41. Dropped taskbarless test server

    With taskbar no longer being injected into the responses, it doesn't make any
    sense testing the search on different flavours of the server.
    veloman-yunkan committed Sep 21, 2022
    Configuration menu
    Copy the full SHA
    0994a8f View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    0a0f52f View commit details
    Browse the repository at this point in the history