-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marktplaats categories added #3761
Conversation
Pull request artifacts
last change: Sunday 2023-10-22 15:34:58 |
this gonna massively increase the html on frontpage where all bridges are rendered. dont like it |
As the whole list is too big only main categories are used for now.
I removed the sub categories. I just copied them in. I did not see it got so big :). |
Would there maybe be some way to dynamically load the L2 categories based on the L1 category that's selected? I'm guessing not as they're loaded into a constant? |
That would require some JS dependencies. If that would be acceptable than i could add that. |
Renamed unused method to better reflect it usage
Done both |
@Pizzabroodje i think u better can be a separated feature request for that |
Alright I'll do that. The L1 categories can be dynamically loaded using something like this in front of the class declaration (this puts
I don't know if Marktplaats categories ever change, but I don't think I've ever seen that happen in the 10+ years of using it. So not too important anyways. I think hardcoding the L1 categories along with a JS dependency to dynamically load the L2 categories would be best. Then it'll only do a request when selecting a category and thus wouldn't slow down the front page. |
@Park0 Nevermind, fixed it. Was an issue with some square brackets not being closed properly. |
Just tested this; L1 category is indeed required along with the L2 category. Only a L1 category works fine, but only a L2 category does not. |
@Park0 For anyone stumbling upon this thread that wants to search within a L2 category, I modified the first commit a little bit to fix some things, and added the 'Fietsen en Brommers' categories: |
|
Categories completed Added a default empty one Check if the input is not empty before using Added helper methods to generate the categorylist
I made some small fixes. I am not aware of any issues on the current code. @dvikan if your happy with the code it can be merged. |
ci fail |
sorry about the ci being unclear. it complains about public functions that should not be there. make the helper functions non-public and it should be resolved. |
Set the methods to private for the CI
@dvikan Now it seems happy :) |
rssbridge isnt setup nicely to handle much js stuff. also i dont want to maintain js. but we can revisit topic later |
Hopefully fixes #3613
Haven't tested it. I can only that the l2 category is added to the query string. It may be required to also add the l1 category.
Maybe @Pizzabroodje can test that for me :)