Closed TheRolfFR closed 2 years ago
how am i supposed to review this? this is too code-y for me x)
how am I supposed to review this? this is too code-y for me x)
@Pomi108 I wasn't expecting you to review the code, I wanted to know if the versions_featured
field would solve the https://github.com/Faithful-Resource-Pack/App/issues/76 issue at the same time ? Would you like all versions of this texture or all of the versions of the path we found?
I see does the versions_featured
field list all versions the texture is present in? I mean including the one you're searching for
Unfortunately it only gives the ones matching the version you looked for. i didn't want all versions else it would be huge but we can change that.
If that's the case then we don't need to include that at all. Displaying all of the versions was the whole point of App#76
Yeah, for now. It'd still be nice to add what I suggested sometime in the future though.
Did this PR can be merged ? @TheRolfFR
I may have to remove the versions_featured
field but else yes
Experimental code to replace Gallery search wizardry made on the client-side with the same displayed format and improved search algorithm:
Improvements
versions_featured
field contains the other versions for the matching path. A wider request including other paths could allow all versions featured in the texture use to be featured.For the moment, we use
res
as the displayed texture. This is translated in the service as a pack name. We could change that too to take as the first argument the pack name.Benchmarks
All results are coming after 3.5s in a remote connection:![image](https://user-images.githubusercontent.com/18086786/176519392-14ac97aa-538e-45bc-82ae-fea1ad0343d3.png)
And results with search makes the request a little faster:![image](https://user-images.githubusercontent.com/18086786/176519468-53a55ecf-d54d-44fc-9b29-e6efd9c6eb0e.png)
If production is using "local" URLs it could go much faster.
There is always room for improvement, and we can develop this PR as you wish.