Aidoku icon indicating copy to clipboard operation
Aidoku copied to clipboard

Self-sizing text pages in webtoon reader

Open remytomme opened this issue 5 months ago • 1 comments

Summary

Layout issue in Webtoon mode where each text-based page (PageContent::text) is rendered inside a container that occupies the full height of the screen. This happens regardless of the amount of text content. When chapters are composed of many short text pages (e.g., one paragraph per page), this fixed-height behavior creates large, empty gaps between them, breaking the intended continuous scroll experience.

Problem Description

The fundamental issue is that the layout system treats each text page as a full-screen entity, which is incompatible with the goals of Webtoon mode.

  1. Enable Webtoon reading mode.
  2. Open a chapter composed of multiple PageContent::text items, where each item contains a short paragraph.
  3. Scroll through the chapter.
  • Expected Behavior: The containers for each text block should be dynamically sized to fit their content. This would allow multiple paragraphs to stack vertically and appear on the screen at once, creating a seamless document flow.

  • Actual Behavior: Each text block is placed in a separate, screen-height container. This results in a jarring experience:

    +-------------------------+  <-- Screen-sized container 1
    |                         |
    |        (empty)          |
    |                         |
    | A single paragraph.     |
    |                         |
    |        (empty)          |
    |                         |
    +-------------------------+
    +-------------------------+  <-- Screen-sized container 2
    |                         |
    |        (empty)          |
    |                         |
    | The next paragraph.     |
    |                         |
    |        (empty)          |
    |                         |
    +-------------------------+
    

Analysis

The issue appears to stem from an inconsistent layout model within the Webtoon reader for different PageContent types.

  • Page items of type ::url (images) seem to render with a dynamic height that respects the content's dimensions, allowing them to stack correctly in the continuous vertical flow.

  • In contrast, page items of type ::text are consistently rendered within a container that is constrained to the full height of the screen.

This fixed-height constraint is the direct cause of the visual gaps, as it allocates empty space for text that does not require it. To resolve this, the layout behavior for text pages in Webtoon mode should be brought in line with that of other page types, adopting a dynamic height that wraps the content rather than a fixed, screen-based one.

remytomme avatar Aug 13 '25 23:08 remytomme

unsure exactly how to accomplish this using texture nodes (the library the webtoon reader uses)

Skittyblock avatar Aug 16 '25 13:08 Skittyblock