Skip to content

[GSoC] Update - Porting Arianna to Foliate-js

 at 08:59 PM

Project Recap

As my Google Summer of Code 2024 journey concludes, I’m excited to share the updates on my project: Porting Arianna to Foliate-js. The main goal was to replace the outdated epub.js with actively maintained Foliate-js. In my previous blog post, I discussed the initial progress on integrating Foliate-js into Arianna, including the implementation of Table of Contents (TOC) and metadata handling.

My work done so far

Overcoming Rendering Challenges

light: {
  fg: Config.invert ? Kirigami.Theme.backgroundColor.toString() : Kirigami.Theme.textColor.toString(),
  bg: Config.invert ? Kirigami.Theme.textColor.toString() : Kirigami.Theme.backgroundColor.toString()
}

Navigation Buttons

User Experience and Functionality Refinements

commit: ee6cae02

I added the line backend.progress = action.payload.fraction; in the relocate case. The relocate event is triggered when the location changes. The event’s detail contains properties such as range, index, and fraction. Here fraction is a number between 0 and 1, indicating the reading progress within the section. By utilizing fraction, the slider can now accurately reflect the user’s position in the ebook.

To solve this, I implemented the following changes:

QQC2.Slider {
    onValueChanged: {
        if (pressed) {
            backend.progress = value
        }
    }
    onPressedChanged: {
        if (!pressed) {
            backend.progress = value
            view.runJavaScript(`reader.view.goToFraction(${value})`)
        }
    }
}

> Reflections and Takeaways

The project has been a significant learning experience. The most challenging part for me was making things work and realizing that not everything is as straightforward as I initially thought. It was daunting to dive into a large codebase and try to understand how everything fits together, but this experience taught me the importance of patience and how to reduce problems so they can be simply solved.

Looking Ahead

While significant progress has been made, many things are left to do:

What’s next?

While my GSoC journey is coming to an end, my contributions to Arianna and the open-source community will continue.

I’d like to thank my mentor, Carl Schwan, for the guidance and support throughout the project, the KDE community, and the Google Summer of Code program for this opportunity. This experience has not only improved Arianna but has also been a transformative journey for me as a developer.

Thank you for following along with my progress, see you in my next blog with more progress.