mihon icon indicating copy to clipboard operation
mihon copied to clipboard

Add Manga Notes

Open imkunet opened this issue 1 year ago • 6 comments

Foreword

This is my first time ever working on anything Android related (the time of me downloading Android Studio is about two days ago), so any feedback on how to improve or pointing out any pitfalls is appreciated. This is also my first time contributing to a medium-sized open source project.

Manga Notes

What

This feature adds built-in per-manga ~~markdown~~[^1] notes to help remember the details of manga inside and outside your library. It can be accessed through the top overflow menu or a button just below the tags through a button.

[^1]: ~~Markdown was chosen over something like rich text for being just enough for formatting if ever needed without requiring any additional bundle overhead without interfering with normal text.~~ EDIT: The current revision uses rich text (HTML) for compatibility with the WYSIWYG editor

Why

Picture this: you have 50 or so forgettable isekai[^2] manga in your library. Because they are all in fact the same story with slight modifications, you lose track of the individual differences in each manga.

With the notes feature, you can add small (or large) reminders about the plot to each (easily) forgettable manga to make the reading experience of new chapters not completely horrible.

[^2]: Meaning: "Another world"

Intentions

I will commit to helping maintain this feature (when necessary) and improve this feature as to not place undue burden upon existing project maintainers.

Known issues

  • ~~No collapsing/expanding notes on manga screen~~ Addressed: Recent design revisions have the manga notes in the collapsible description section
  • Manga screen lazy list "jumps" when there is an extraordinarily long note
  • ~~No limit on note size (in theory could work correctly with notes 2^31-1 characters long, but not tested)~~ Addressed: Imposed a 10k length limit with a visible warning when close to limit (tested)
  • AOSP keyboard hates all Mihon TextFields and its auto-suggestion selects 1 space character extra behind the current word (not related to this feature itself)
  • Possibly conflicts with #398

Demonstration

https://github.com/mihonapp/mihon/assets/13318546/659b4cfe-63c1-425f-b40c-aba145b88d70

imkunet avatar Feb 19 '24 09:02 imkunet

This comment is no longer relevant.

With the new rebase on main as well as the 0e0a9aa (Make spotless) commit (as well as the detekt gradle task) the information in this comment no longer makes any sense.

Its contents are hidden here for posterity.

Hidden

Commenting on the remaining failing ./gradlew detekt violations after ce9a3ac[^1]: [^1]: detekt errors re-formatted for reading convenience


This is a pre-existing issue with this function.

/mihon/data/src/main/java/tachiyomi/data/manga/MangaMapper.kt:8:17 [LongParameterList] The function mapManga(...) has too many parameters. The current threshold is set to 6.

This is a pre-existing issue with this function.

/mihon/data/src/main/java/tachiyomi/data/manga/MangaMapper.kt:58:24 [LongParameterList] The function mapLibraryManga(...) has too many parameters. The current threshold is set to 6.

This is a pre-existing issue with this data class.

/mihon/app/src/main/java/eu/kanade/tachiyomi/data/backup/models/BackupManga.kt:43:18 [MagicNumber] This expression contains a magic number. Consider defining it to a well named constant.

Pretty much all the previews in the codebase have the same issue.

/mihon/app/src/main/java/eu/kanade/presentation/manga/components/MangaNotesSection.kt:96:13 [UnusedPrivateMember] Private function MangaNotesSectionPreview is unused.


Let me know if there are any important issues that need to be fixed.

imkunet avatar Mar 05 '24 09:03 imkunet

I've created a mock-up for this.

User interaction would be: View -> (Sheet or fullscreen page presenting the full note) ↳ Edit notes -> Save

Mockup

CrepeTF avatar Mar 24 '24 12:03 CrepeTF

Why not view and edit notes buttons?(Instead of only the view button) Seems like an extra step for nothing

Turhvjbufv avatar Mar 24 '24 12:03 Turhvjbufv

Hi @CrepeTF .

I'm not sure if putting it in a outlined rounded rectangle is a good idea.

The padding on the sides removes vertical space that can be used for text and the button is quite distracting as I believe the text of your notes are should be first and foremost.

On the other hand, I like how attention grabbing it is and draws your attention to whatever you wrote about the manga. Perhaps there is a middle ground somewhere? It might be weird to have a big colored notes box when there are no notes added yet.

imkunet avatar Mar 24 '24 23:03 imkunet

Rebased off of main, prevent silly merge commit from messing everything up. :)

imkunet avatar Sep 19 '24 07:09 imkunet

Good to see you're still motivated despite me not reviewing. If you can hop on to Mihon discord for design discussion that'll be great.

AntsyLich avatar Sep 19 '24 07:09 AntsyLich

Updated demonstration video with recent changes:

https://github.com/user-attachments/assets/248c6362-cb6c-40a9-8473-cbb43489bdc1

imkunet avatar Sep 20 '24 09:09 imkunet

Is this still being worked on?

KairuDeibisu avatar Jan 19 '25 22:01 KairuDeibisu

There has been discussion in the Discord right around the time I stopped working on this about the exact character limit, particularly opposing thoughts on whether markdown or html or richtext should be used, or whether the characters are to be limited to 250. At the moment, I'm not quite sure what to do... though later today I might do a rebase and recheck the sentiment in the Discord chat with respect to the current feature set.

imkunet avatar Jan 19 '25 22:01 imkunet

This is probably ready for review pending any last suggestions for changes left. The character has a soft limit of 250 (which is limited by the "characters" in the editor box), and is transparently stored as markdown (unbeknownst to the user) so if in the future there arises a need to migrate over to another system, there should be little pain in parsing and migrating.

imkunet avatar Jan 19 '25 23:01 imkunet

Is this UI same as the last video you sent?

AntsyLich avatar Jan 26 '25 23:01 AntsyLich

awesome, well docne guts..

tomorrow beers on me

On Thu, Sep 19, 2024 at 9:13 AM Kyle Nguyen @.***> wrote:

Rebased off of main, prevent silly merge commit from messing everything up. :)

— Reply to this email directly, view it on GitHub https://github.com/mihonapp/mihon/pull/428#issuecomment-2360171917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDGX37KTAJVYMC7V2GC4MDZXJ2RTAVCNFSM6AAAAABDPB7QHGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRQGE3TCOJRG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- in /dev/null no one can hear your scream...

nakedlittlezombie avatar Jan 26 '25 23:01 nakedlittlezombie

It's mostly the same aside from a string change and removing the heading button. Current UI:

https://github.com/user-attachments/assets/fdf54932-6342-4bf5-b2e4-7b18aaddea74

imkunet avatar Jan 27 '25 00:01 imkunet

https://github.com/user-attachments/assets/b07abe12-dfd0-4675-9a79-81c3e70b92f1

imkunet avatar Jan 27 '25 16:01 imkunet

Add changelog entry

AntsyLich avatar Feb 07 '25 11:02 AntsyLich

Missed some names because of the vestiges of how it used to work, hopefully that's been smoothed over now. Thanks for the catch!

imkunet avatar Feb 07 '25 20:02 imkunet

Please make the notes screen plain like keep notes IMG_20250218_115107

AntsyLich avatar Feb 18 '25 05:02 AntsyLich