The-CodingSloth / haha-funny-leetcode-extension

MIT License
392 stars 75 forks source link

create a "solve another" button on non-hyper torture mode and refactor popup to make contributions easier. #99

Closed wllfaria closed 6 months ago

wllfaria commented 6 months ago

So, i've spoken on discord about this. But here is a more detailed overview of what I have in mind for this one:

Create a "Solve another" button:

Currently, while on non-hyper torture, you are only prompted to solve a single exercise and then you are free for the day. The goal of this issue is to provide a way for the user to request another problem to be solved, with the ability to be required to solve it, or just optionally.

By that I mean, the user could either re-enable the redirects until he solve the next problem he asked for, or he could use the internet normally but have a new problem for him to solve (add a configuration for this);

The main issue here is that currently the only way to fetch a new problem is to use updateStorage() which by default re-enables the redirects. Thus there is another change I'm proposing.

Refactor background.ts and popup.tsx to make contributions and extensions easier.

Here my goal is to separate areas that are currently coupled together so that extensions are easier to be made, extensions such as the one I described above; What i have in mind currently is to have a way to fetch problems without re-enabling every other aspect of the extension, and making the popup ui less bloated by separating stuff into new components.

As told on discord, im also starting to work on this one, so it can be assigned to me, I'll update this issue with my progress on it.

wllfaria commented 6 months ago

I just created a PR with the implementation of the solveAnother, and moved a few functions to a better suitable place IMO, let me know if you want any changes to this.

I'm also willing to further refactor the code if it is desired to do so. As an idea we could expand the concept of the extension to not only leetcode but other coding problems websites but this might require major refactors