torrust / torrust-index-gui

This repository serves as the frontend for the Torrust Index project.
https://torrust.com
Other
32 stars 16 forks source link

Direct URL search currently non-functional. #593

Closed ty5e3a45 closed 3 months ago

ty5e3a45 commented 3 months ago

Hey, When making a search in the demo, the URL displays as https://index.torrust-demo.com/torrents?search={search terms}&sorting=UploadedDesc&pageSize=50&page=1&layout=default. However, when opening the URL directly, the search doesn't occur. Same thing occurs when refreshing a search results page. Out of curiosity, are these being cached and that be the culprit? edit: Alternately, could it be torrust not checking the URL parameters on page load?

Additionally, though less important as a bug, when performing a search from the home screen, the URL displays as https://index.torrust-demo.com/torrents?search={search terms}&sorting=UploadedDesc&pageSize=50&page=1&layout=default. However, when repeating the same search from the previous search result page, it displays as https://index.torrust-demo.com/torrents?search={search terms}.

josecelano commented 3 months ago

Hey, When making a search in the demo, the URL displays as https://index.torrust-demo.com/torrents?search={search terms}&sorting=UploadedDesc&pageSize=50&page=1&layout=default. However, when opening the URL directly, the search doesn't occur. Same thing occurs when refreshing a search results page. Out of curiosity, are these being cached and that be the culprit? edit: Alternately, could it be torrust not checking the URL parameters on page load?

Hi, @ty5e3a45, that seems to be a bug. It seems the "search" field is not updated from the URL.

There is no cache at all.

Additionally, though less important as a bug, when performing a search from the home screen, the URL displays as https://index.torrust-demo.com/torrents?search={search terms}&sorting=UploadedDesc&pageSize=50&page=1&layout=default. However, when repeating the same search from the previous search result page, it displays as https://index.torrust-demo.com/torrents?search={search terms}.

Yes, that's another bug. In general, "search" capabilities need to be improved greatly, not only the UX but also the results. The backend does not search for terms in the file names inside the torrent file, for example.

josecelano commented 3 months ago

I've also updated the demo: https://index.torrust-demo.com/torrents?search=Debian&sorting=UploadedDesc&pageSize=50&page=1&layout=default

ty5e3a45 commented 3 months ago

Appreciate the fix, thanks.