Python-Type-Challenges
Python-Type-Challenges copied to clipboard
Refactor random button
Description
Use HTMX refactor random button.
Done
homepage random button sidebar random button Resolve #104
It is ready for review.
I definitely love the change. My only feedback is to consider whether this can be done without pre-loading the "random" challenge, i.e. preserve the old behavior to delay the pick until users have clicked on "random". If this is not achievable, it would be helpful to describe why. Thanks.
If preserve the old behavior to delay the pick until users have clicked on "random", the address bar will display https://python-type-challenges.zeabur.app/random when the user clicks the button. However, if the user refreshes the page, they will not be able to return to the previous challenge.
I already tried to dynamically modify hx-get, but it could not work.
I have an new idea for avoiding the first /random request, wait for me to refactor the code.
It is ready for review.
Thanks. I'll need to take a closer look at this.