getmango / Mango

Mango is a self-hosted manga server and web reader
https://getmango.app
MIT License
1.71k stars 123 forks source link

[Feature Request] Add "Right to Left" support to "Paged" mode #220

Closed nduja closed 2 years ago

nduja commented 3 years ago

Is your feature request related to a problem? Please describe.

When reading manga which is right to left, I find it more intuitive to press the left side of the screen. It more closely matches read a physical book.

Describe the solution you'd like

Instead of a "Paged" mode, offer "Right to left" and "Left to Right". This would simply change which side of the screen is next and previous.

Describe a small use-case for this feature request

Reading anything that goes Right to Left.

Additional context

I'm happy to write a pull request for this, but wanted to check if you like the idea of the feature before spending any time. Putting an extra check around these two lines to swap the boolean depending on the reading direction should do the trick.

https://github.com/hkalexling/Mango/blob/8829d2e237889d0ec232a92a485b3ef4086ecaa0/src/views/reader.html.ecr#L55-L56

hkalexling commented 3 years ago

Hi, thanks for the suggestion and the offer to work on it! I am always open to new features as long as they are disabled by default and don't clutter the UI. I agree it's a great feature to have, but I think instead of outright replacing the page mode with "right to left" and "left to right", it might be better to add an option to the paged reader to enable right to left.

For the UI, I think we can add a checkbox to the modal for toggling the behavior and have it stored in the browser local storage, and of course, this option should only be visible when in the paged mode. The option should also be disabled by default to not break the current experience.

Screenshot 2021-08-21 at 1 09 56 PM

Let me know what you think!

nduja commented 3 years ago

Thanks, sounds good to me. I was thinking how to do it with minimal changes, but a toggle in the modal is definitely the way to go.

I'll start poking around and let you know how I go.

GlassedSilver commented 3 years ago

To extend on this thought: if you have odd ones in your library that go another direction it could be helpful to have a metadata field to specify reading direction (and maybe even top-to-bottom for webtoons) and the reader to be auto-adjust to that OR to force one specific mode.

Best of both worlds.

Also touches on #5 I think.

mango-assistant[bot] commented 2 years ago

Hi there! The feature has been added in v0.25.0. Thanks for the feature request!