Skip to content

Add continuous long-form comic reading mode - #275

Merged
maforget merged 6 commits into
maforget:devfrom
illusive5943:feature/continuous-longform-reader
Aug 25, 2026
Merged

Add continuous long-form comic reading mode#275
maforget merged 6 commits into
maforget:devfrom
illusive5943:feature/continuous-longform-reader

Conversation

@illusive5943

@illusive5943 illusive5943 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What this adds

This adds a fourth page layout, Long Form (Continuous), for webtoons, manhwa, and other comics made from vertically ordered images.

In this mode ComicRack treats the filtered book as one scrollable strip:

  • pages are stacked top-to-bottom without artificial gaps;
  • mouse wheel, keyboard, drag, and touch input move smoothly across page boundaries instead of triggering paged navigation;
  • Original keeps each image at its native dimensions and centers narrower pages;
  • Fit Width fills the reader, while Fit Best keeps a narrower bounded column;
  • the current page and reading progress follow the leading visible page.

The mode is available from the existing Page Layout menus and can be assigned in keyboard shortcuts. Existing Single Page, Two Pages, and Adaptive behavior remains unchanged, as do saved rotation and page-margin settings outside continuous mode.

Implementation notes

The reader keeps lightweight geometry for the ordered pages, but decodes and renders only visible pages and their immediate neighbors through the existing page pool. It reuses the existing renderer, scrolling surface, fit controls, and navigation state rather than introducing a separate viewer.

Automatic webtoon detection, per-comic layout defaults, a dedicated icon, and translation updates are deliberately left out of this first pass.

Screenshots

Page Layout menu

Long Form (Continuous) in the Page Layout menu

Continuous Fit Width view

Mixed-width generated pages stitched together in Continuous Fit Width mode

Continuous Original Size view

Mixed native page widths preserved and centered in Continuous Original Size mode

All three screenshots use a generated test comic and contain no personal desktop or library content.

Testing

  • restored packages and built the Release configuration with Visual Studio MSBuild;
  • tested hardware and software rendering in isolated ComicRack profiles;
  • tested mixed native widths and tall pages with Original, Fit Width, and Fit Best;
  • tested wheel, keyboard, drag, and background scrolling across page seams;
  • tested 125% zoom and resizing for stable horizontal centering;
  • tested saved layout restoration in a fresh profile;
  • ran focused layout checks for visibility, hit-testing, anchor restoration, resize retention, and virtual heights above Int32.MaxValue.

Development note

This feature was developed iteratively with AI-assisted, or “vibe coded,” implementation, followed by a manual review of the final diff, a clean rebase onto dev, focused geometry checks, and application-level testing in isolated profiles. I am calling that out plainly so reviewers know how the patch was produced; feedback on the viewer integration is welcome.

Closes #54

Refs #223

@illusive5943
illusive5943 force-pushed the feature/continuous-longform-reader branch from 16fb428 to cc6139a Compare August 14, 2026 18:19
@illusive5943
illusive5943 marked this pull request as ready for review August 14, 2026 18:35
- Disables changing to Fit Height & Fit All when in Continous Layout
- Changing to Continous Layout when in to FIt Height or Fit All will reset to Fit Width
@maforget

maforget commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Nice work, I will happily merge the code.

Changes I've made:

  • Fit Height & Fit All shouldn't be available while in Continuous Layout.
    • It shows the complete comic which it unreadable and also glitches out. Probably depends on the page memory allowed because not all pages are shown at the same time. Looks like Christmas lights blinking.
    • I've forced Fit Width when changing to Continuous Layout if the Fit Mode was Fit Height or Fit All.
    • I've disabled the Fit Height or Fit All button when in Continuous Layout.
  • I've changed the name simply to Continuous. It can be used with regular comics so it's not only for long form comics. It's also cleaner, more concise.
  • I've added the French translation.

Bugs I've Found:

  • Changing ImageFitMode resets to page 1 unless going to Original or coming from Original.
  • Docking / Undocking the reader in it's own window doesn't keep the current page position.
  • While using Continuous / Original and enabling Right to Left (ref: OnReadingModeChanged) leaves the image off-center.
    • Seems to require a comic that has a double page and/or the page need to be bigger than the viewport. So resizing the viewer will trigger it.

I will let you figure out these bugs since you probably know more about what is going on.

@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

Build Successful! You can find a link to the downloadable artifact below.

Name Link
Commit b4a46d2
Logs https://github.com/maforget/ComicRackCE/actions/runs/31972791114
Download https://nightly.link/maforget/ComicRackCE/suites/86690122385/artifacts/9270291856

@illusive5943

Copy link
Copy Markdown
Contributor Author

Bugs I've Found:

  • Changing ImageFitMode resets to page 1 unless going to Original or coming from Original.

  • Docking / Undocking the reader in it's own window doesn't keep the current page position.

  • While using Continuous / Original and enabling Right to Left (ref: OnReadingModeChanged) leaves the image off-center.

    • Seems to require a comic that has a double page and/or the page need to be bigger than the viewport. So resizing the viewer will trigger it.

I will let you figure out these bugs since you probably know more about what is going on.

Okay, I'll take a look at those tomorrow and get back to you.

@illusive5943 illusive5943 changed the title Add continuous long-form comic reading mode Add continuous comic reading mode Aug 16, 2026
@illusive5943
illusive5943 force-pushed the feature/continuous-longform-reader branch from ea1b7c1 to 37be9a9 Compare August 16, 2026 02:09
@illusive5943 illusive5943 changed the title Add continuous comic reading mode Add continuous long-form comic reading mode Aug 16, 2026
@illusive5943

illusive5943 commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the detailed testing. I've prepared a follow-up on top of 37be9a9 that keeps a page-relative anchor in Continuous mode. Resizing the window, docking / undocking or switching between Original and Fit Width now preserves the same position within the current page. Also pages should no longer drift left and right. I tested the changes with a fixed size and mixed-size test comics.

ComicRack persists only ComicBook.CurrentPage, so closing and re-opening a comic keeps the page number, but loses the vertical position. A proper fix would need new persistent per-comic state such as { page, relative vertical offset }.

@maforget

maforget commented Aug 16, 2026

Copy link
Copy Markdown
Owner

That looks great, seems to work fine. I will test the PR build for a couple days with my regular setup and see if anything popups.

ComicRack persists only ComicBook.CurrentPage, so closing and re-opening a comic keeps the page number, but loses the vertical position. A proper fix would need new persistent per-comic state such as { page, relative vertical offset }.

The current page only seems enough IMHO. It's something to be expected already, although to a lesser extent than long form comics. I mean how long can a page get?

Edit: Something I've just stumbled upon and I will leave here as a note to check on it later. FitOnlyIfOversized doesn't matter anymore because we are forcing it in GetEffectiveDisplayConfig. Is there a reason we force it to False on FitWidth and True for FitBest? I feel both assigments could be deleted there without any effects. If there is a reason we should at least disable the option in the menu as to not confuse the user.

Proposed Changed:

------------ ComicRack.Engine.Display.Forms/ComicDisplayControl.cs ------------
index 45d28f9a..03530737 100644
@@ -2558,14 +2558,9 @@ namespace cYo.Projects.ComicRack.Engine.Display.Forms
 			}
 			ImageFitMode imageDisplayMode = config.ImageDisplayMode;
 			bool fitOnlyIfOversized = config.FitOnlyIfOversized;
-			if (imageDisplayMode == ImageFitMode.FitWidth || imageDisplayMode == ImageFitMode.FitWidthAdaptive)
-			{
-				fitOnlyIfOversized = false;
-			}
-			else if (imageDisplayMode == ImageFitMode.BestFit || imageDisplayMode == ImageFitMode.FitHeight || imageDisplayMode == ImageFitMode.Fit)
+			if (imageDisplayMode == ImageFitMode.BestFit || imageDisplayMode == ImageFitMode.FitHeight || imageDisplayMode == ImageFitMode.Fit)
 			{
 				imageDisplayMode = ImageFitMode.FitWidth;
-				fitOnlyIfOversized = true;
 			}
 			// RTL still controls page navigation, but a vertical strip must not mirror
 			// its horizontal viewport.

@illusive5943

Copy link
Copy Markdown
Contributor Author

The current page only seems enough IMHO. It's something to be expected already, although to a lesser extent than long form comics. I mean how long can a page get?

I agree, most likely not worth the extra effort.

Edit: Something I've just stumbled upon and I will leave here as a note to check on it later. FitOnlyIfOversized doesn't matter anymore because we are forcing it in GetEffectiveDisplayConfig. Is there a reason we force it to False on FitWidth and True for FitBest? I feel both assigments could be deleted there without any effects. If there is a reason we should at least disable the option in the menu as to not confuse the user.

Proposed Changed:

------------ ComicRack.Engine.Display.Forms/ComicDisplayControl.cs ------------
index 45d28f9a..03530737 100644
@@ -2558,14 +2558,9 @@ namespace cYo.Projects.ComicRack.Engine.Display.Forms
 			}
 			ImageFitMode imageDisplayMode = config.ImageDisplayMode;
 			bool fitOnlyIfOversized = config.FitOnlyIfOversized;
-			if (imageDisplayMode == ImageFitMode.FitWidth || imageDisplayMode == ImageFitMode.FitWidthAdaptive)
-			{
-				fitOnlyIfOversized = false;
-			}
-			else if (imageDisplayMode == ImageFitMode.BestFit || imageDisplayMode == ImageFitMode.FitHeight || imageDisplayMode == ImageFitMode.Fit)
+			if (imageDisplayMode == ImageFitMode.BestFit || imageDisplayMode == ImageFitMode.FitHeight || imageDisplayMode == ImageFitMode.Fit)
 			{
 				imageDisplayMode = ImageFitMode.FitWidth;
-				fitOnlyIfOversized = true;
 			}
 			// RTL still controls page navigation, but a vertical strip must not mirror
 			// its horizontal viewport.

Seems ok to remove the forced FitOnlyIfOversized values. They were added to make sure FitWidth always works, while BestFit keeps original size, unless oversized. After the change both will render effectively the same.

You could consider disabling Best Fit alongside with Fit Height and Fit All in Continuous mode.

@maforget

Copy link
Copy Markdown
Owner

Just a Note:
Continuous isn't backwards compatible. Having the option selected when exiting will reset the Config.xml file if going to an older build that doesn't have support it.

@maforget
maforget merged commit 87cfa1d into maforget:dev Aug 25, 2026
1 check 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.

2 participants