OverPoweredDev / Junior

A bookmarking app specialised towards online webnovels. Built in Flutter and Dart.
GNU General Public License v3.0
26 stars 9 forks source link

Add dynamic link generation based on chapter #25

Closed Redev22 closed 2 years ago

Redev22 commented 3 years ago

If i put in the "link" field the link of the novel i then always need to open it and search for the correct chapter between (sometimes) literally thousands of others. Luckily a lot of novel websites use a simple NameOfTheWebsite.com/name-of-the-novel-ChapterNumber Example: https://boxnovel.com/novel/the-tutorial-is-too-hard/chapter-307/

My request is to add a feature that dynamically generated the correct link with the right chapter: Example input by the user (when creating the novel) https://boxnovel.com/novel/the-tutorial-is-too-hard/chapter-FUZZ/ The app logic searches for the word FUZZ (make it whatever you want) in the string and replaces it with the chapter number, this final link is the one that will be opened when you touch the "Link to novel" button in the homepage There should also be a switch for this functionality when creating a novel because some sites don't follow this pattern for their URLs or require a few options to work correctly Example https://dreamsofjianghu.ca/2018/10/18/adnd-001/ needs 0-padding on the left to make the number always 3 digits (here adnd is the short name of the novel) Another example: this website appeared to have a linear progression that started from an high number but it's not always the same: Chapter 11= https://m.wuxiaworld.co/Cultivation-Chat-Group/1253538.html Chapter 12= https://m.wuxiaworld.co/Cultivation-Chat-Group/1253539.html (just +1) Chapter 13= https://m.wuxiaworld.co/Cultivation-Chat-Group/1046598.html (wtf) Chapter 14= https://m.wuxiaworld.co/Cultivation-Chat-Group/1253540.html (and we are back to normal) So instead of adding support for all of these it's better to simply disable the function when needed.

OverPoweredDev commented 3 years ago

Recogising is the only thing that might be hard. To make it optional we can just add a omnibox menu (ā‹®) to the Novel Link, with an option to 'Make the link Dynamic'. And then have the user keep dynamic parts as <num>

eg. https://boxnovel.com/novel/the-tutorial-is-too-hard/chapter-<num>/ turns into https://boxnovel.com/novel/the-tutorial-is-too-hard/chapter-307/ at currChapter == 307

for 0-padding, the most I can think of is something like an identifier like <num-3> for 3 digit numbers or something. This might be useful so I'll put it on the list. Should be done in a while šŸ˜¤

OverPoweredDev commented 3 years ago

I'm a bit focused on getting 1.3.1 up with the reload on swiping up feature and updated bug report links. This one should be out by 1.3.2

Only other thing I'm concerned about is that people might be confused on how to use it. Even the switch to Volume mode from chapter is hard to recognise. So any ideas for that, apart from the changelog of course?

Redev22 commented 3 years ago

The way I would do it is like this: (please ignore bad photoshop) a button that when pressed adds the <num> string to the input field and brings focus there (so that the user can notice it), then the user will be confused and press on the info button that will show a small bit of text (i hate info buttons that redirect to another page, the info should come up on top of everything, maybe with a small black background and disappear on touch) that will simply explain that <num> will be replaced with the current chapter number when the link is clicked example That's how I would do it but I never made a UI and I don't know dart so take what i say with a grain of salt.

Redev22 commented 3 years ago

and for the switch to volume thing, I agree it's pretty hidden, I discovered it only after reading the changelog, maybe add behind the two buttons the same background that has been given to every other button? That would make it more explicit but I don't know if it will ruin the style of the page

OverPoweredDev commented 3 years ago

The pop-up information box (the kind I use for showing the changelogs) seems like a good idea. Everytime you select the dynamic option, it'll pop-up on screen. Won't affect the user once the link is already dynamic though so shouldn't be too annoying. Yeah this can work!

As for the volume thing, making the background lighter might ruin the page too much. I'll try reducing the opacity (0.85 -> 0.7) so it's more noticeable. But showing widget info through changelogs is too tedious, might want to work on making that a separate static screen in the app

Redev22 commented 3 years ago

Nice, I was thinking about having the info pop up only when the i button is pressed but that also works. Just be sure to add a "show this info every time" switch that can be turned off on the popup, else it would become annoying fast.

OverPoweredDev commented 3 years ago

The i button gives me an idea, an extra menu just for a single option is kinda overkill. Plus it looks kinda ugly (That's why the Chapter/Volume and Ongoing/To Read/Complete stuff looks like it does now). Instead of making it a menu option, we can just keep it enabled all the time and only add the info button to the right of the Novel Link subtitle.

This works because something like <num> is very unlikely to show up in a url and constantly bombarding people with the descriptions for use would be super annoying. So adding a simple information pop-up on pressing the i would be more than enough to show people how it'll work.

Since I'm done with 1.3.1, I prototyped it to check how it looks and it seems great! Take a look

Link Info Pop-Up

Redev22 commented 3 years ago

Nice and clean šŸ‘šŸ‘

OverPoweredDev commented 3 years ago

Dynamic Links up and running with commit e1b72b561e8e06876848ab760fe52bdbc6e8c533