Git Product home page Git Product logo

biblioteca's Introduction

Biblioteca

Read documentation

Download on Flathub

Biblioteca lets you browse and read GNOME documentation.

Among other things, Biblioteca comes with

  • Offline documentation
  • Dark mode support
  • Fuzzy search
  • Mobile / adaptive

ℹī¸ Biblioteca is made possible by Flatpak. Only Flathub Biblioteca is supported.

Screenshot

History

Biblioteca originally started as a built-in offline documentation viewer for Workbench. It was built by Akshay Warrier as a "stretch-goal" of his 2023 GSoC internship under the mentorship of Andy Holmes and Sonny Piers.

The offline documentation viewer has been extracted into a standalone repository/app and became Biblioteca.

Akshay and Sonny keep maintaining this project.

Code of conduct

Biblioteca follows the GNOME Code of Conduct.

  • Be friendly. Use welcoming and inclusive language.
  • Be empathetic. Be respectful of differing viewpoints and experiences.
  • Be respectful. When we disagree, we do so in a polite and constructive manner.
  • Be considerate. Remember that decisions are often a difficult choice between competing priorities.
  • Be patient and generous. If someone asks for help it is because they need it.
  • Try to be concise. Read the discussion before commenting.

License

License GPLv3. Please see the COPYING file.

biblioteca's People

Contributors

a6gibkm avatar akshaywarrier avatar jimmac avatar mcatanzaro avatar sonnyp avatar turtlegarden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

biblioteca's Issues

Display history on right-click of back and forward buttons

In Epiphany, Nautilus, and in libadwaita's various navigation views, if you right click on the back or forward buttons you get a history of pages you can pop to, as so:

An Epiphany tab with some history

In Biblioteca this is not currently implemented. It would be nice to have this, as it would allow people to quickly scrub back through their history and then jump forward. To implement this, it might be helpful to look at how Epiphany does it, since Biblioteca also uses WebKitGTK.

Provide option to show/hide sidebar

We might want to consider always showing the option to show/hide the sidebar. Right now it's only shown when the first breakpoint is triggered. Especially for online docs, we should automatically hide the sidebar (and maybe show it when going back or forward to offline docs again).

The sidebar can become obstructing otherwise
image

Please allow browsing the latest docs

Thank you for this amazing software!

GTK and libadwaita often have new API that is not included in the stable releases for a long time. Please make it possible to view the latest gnome-nightly docs. Perhaps this can be solved by just including this app in gnome-nightly?

Biblioteca 1.3

  • release notes
  • update VTE to 0.76
  • update libshumate to 1.2
  • update meson.build version to 1.3
  • publish!

Provide option to filter docs

From discussion #52 (comment), most people might not need most of the docs that are shipped by default, therefore it makes sense to provide an option to filter docs according to user preference. It might also make up for faster load times. We can have something similar to DevHelp

image

Support tabs

It would be nice to support tabs. I think @AkshayWarrier is already on it.

It should be for current doc only, web browsing will come later.

  • We should support middle+click on sidebar items.
  • As well as "New Tab"
  • And middle+click on doc links

Keyboard does not highlight rows in sidebar

When navigating through the tree view in the sidebar, the row that the keyboard is hovering over is not highlighted. To worsen this, the row cannot be expanded without a pointing device.

Version affected: 1.1, possibly 1.0

This can likely be fixed by setting the rows to focusable.

Skarminspelning.fran.2023-11-17.14-22-16.webm

Provide a Search Provider

I'm really not sure if it's really possible. If not, I guess I will see this issue closed.

I think a search provider would be really useful for this app, so that you can type something like GtkButton and you can open the app directly in the class documentation.

It would save having to keep the app open all the time to search for specific documentation.

Clicking on tags should filter search results

Right now the tags in the search results are created as buttons and clicking on them doesn't do anything. Maybe it's a good idea to automatically apply the tag: filter to the search results when any of the tags are clicked.

API for browing to documentation

It would be pretty cool if Biblioteca had some sort of API that let other apps browse it's content and present it to the user.

This could be used by IDE/editor plugins / LSPs to jump to a specific documentation within Biblioteca.

A good option would maybe be some sort of URI scheme that Biblioteca can handle?

Add Ctrl + L shorcut

I come from DevHelp and I'm used to Ctrl + L giving focus to the search field on the left (it works similarly in Firefox and GNOME Files and Chrome and others). Please add this functionality.

In dark mode the webview flashes

If you start the app in dark mode, there is a bright flash between the time the webview was drawn and the documentation was lodaded.

The reason for that is that the default background color of the webview is white.

We should change the color in dark mode so there is no flash. There is code in Tangram for that IIRC

Forward and backward shortcuts do not always work

I've noticed that the shortcuts only work when the search bar is active or when items in the sidebar list were selected. Is the Webview maybe at fault here?

Also I tried implementing backward and forward mouse buttons (for mice with buttons on the side) but I need to double click when the mouse is above the webview, which does not happen in Workbench.

Context menu contains un-needed items

In the WebView widget, I think the default context menu is used. This includes 'Stop', 'Reload' and 'Inspect Element'. I suggest it would be better if they're removed, leaving just 'Back' and 'Forward'.

Sidebar gets unsynced with webview when collapsing rows

If you have something selected in the sidebar and if its parent row gets collapsed, the sidebar looses its selection and remains unselected even if the webview loads a different page. (Unless you select something again in the sidebar, in which case they sync up again)

This should also be kept in mind while implementing #23, the easiest thing to do would be to have the sidebar unselect the row but sync back again if the webview loads a different page. DevHelp also sort of faces this issue and shows inconsistent behaviour.

Add font size option

Very nice app! I was looking for offline doc viewer for Gtk and Adw. It would be nice to have an option to control docs font size.

App Icon

A marvelous new app, needs a decent app icon. Will be hard to avoid the 'big book' metaphor, but let's see.

Support web content

Since we have a WebView anyway for offline content, we might as well support online content too.

UI is going to be tricky so let's wait until after

Minor adaptivity issues

Right now, Biblioteca has some minor issues with screen size:

  • The tab overview cannot be triggered with a shortcut
  • If the window size is expanded, the overview is still shown
  • The sidebar is not opened when F10 is pressed to activate the menu
  • The sidebar cannot be toggled with a shortcut

I have a branch where I am fixing all of these things, and all but the last are fixed. I would also reccomend adding a button to open the overview in large window mode, somewhat like how GNOME Web does it with a button in the header bar that can trigger it, as the overview is useful to desktop users as well or people who have many tabs open.

Documentation for bindings

It would be great if Biblioteca would provide binding specific documentation for at least Vala, GJS, PyGObject and gtk-rs.
In the simplest form it could do that by having links from all pages to the respective counterpart in these docs.

Biblioteca could also bundle offline versions of these if licensing allows.

Example for where Gtk-4.0's "GtkSwitch.set_active" would link to:

Related issues:

  • #27 - would be required for properly displaying the content, especially if loaded from online sources
  • #47 - such an API/URI schema could also support direcly loading the binding specific pages

Content magically "cuts off" when scrolling

AdwToolbarView was an excellent approach so that the header bar could be raised when scrolling. The problem is that it doesn't seem to be able to detect when the user scrolls within a web view, so you end up with content that is magically "cut off".

imagen

The simplest fix in my opinion would be to make the header bar always raised and that's it.

Fast search on startup breaks app

Hi, there seems to be a race condition upon startup, sometimes leading to a broken view state. It's not super easy to reproduce (I guess more likely on slower hardware?). Here are two different issues that can cause.

The first one simply an unfulfilled search. Nothing major, typing restarts the search.

Screencast.from.08.01.2024.03.23.08.webm

The second case is worse, it leads to a completely broken view. This can only be fixed by opening a new tab and closing the old one.

Screencast.from.08.01.2024.03.23.27.webm

I hope the descriptions help to locate the issue.

Manuals: Selecting item in search view occasionally selects first item in browse view

I haven't found a clear-cut way to reproduce it but sometimes, when you search for something in the search view and select it for the first time, it will initially select the correct item in the browse view (and hence correctly load it in the webview as well) but going back will select the first item in the browse view ("Adw-1").

bug.mp4

I have a feeling this is a bug with GTK because there's possibly nothing that should cause it to do that only the first time around, but it requires further testing.

Upon window resize, manual view dissapears

As the title says, when one shrinks the Manuals window the webview on the right eventually gets smaller and smaller and dissapears. Possibly until mobile view is implemented, a width request can be put on the webview?

Skarminspelning.fran.2023-10-31.10-35-21.webm

Show classes first when searching

When searching for e.g. "scrolledwindow" the GtkScrolledWindow class is not in the first page of results. While one can enter any method and go up, it might make sense to sort the results so that the classes appear first.

Change the theme of gi-docgen docs to match Adwaita

As suggested by @bragefuglseth, we could try changing the styling of gi-docgen generated docs (such as changing bg/fg colors and setting font to Cantarell) to match the theme of Adwaita.

This might also be something we could consider doing for future docsets as well such as devdocs.

Default size of the app is too small in relation to breakpoint and sidebar

The default size of the app is small enough that

  1. The breakpoint collpases the sidebar by default
  2. Even after going slightly over the breakpoint, The main view is not twice as wide as the sidebar.

On possibility would be to add around 100-200px both to the default width and height, and then make the sidebar (slightly) less wider.

Note that the breakpoint is in sp which takes into account font size, I am currently using font scaling factor = 1.25, which is the Large Text option in Settings.

Support find

It's currently not possible to search in the selected doc.

It should be pretty easy we can use Epiphany / DevHelp for inspiration.

Redirect URIs for docs cross-linking other docsets

Currently clicking on a link inside the webview to a docset outside of the one being shown, redirects to a http uri. Instead we should load the local documentation for it if it's available and if we don't we open the documentation as a "browser" page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.