Add latest and trending builds list to the build list module
Description of the problem being solved:
- Adds a builds list to the BuildList module that displays latest and trending builds that is fetched from the PoB Archives.
- Adds responsive behaviour to the builds menu.
Steps taken to verify a working solution:
- Tested fetching errors for connection errors, empty build list, some of the keys are missing and success.
- Display status messages depending on the fetch state.
- Checked cpu usage with the new list.
- Checked for invalid and missing pobb links while importing builds
Before screenshot:
After screenshot:
@Wires77 Please take another look, requested changes are done, and I also implemented the similar builds list as I promised in the discord.
New feature, Similar Builds
- Similar Builds button is hidden by default unless the build is imported from somewhere.
- In order for this to work, I'm saving the import links into the xml's Import node. We can also use this for features such as "Reset to imported version" button in import tab, or we can convert this into a tree to introduce versioning in PoB. I didn't add those since it's out of scope, but let me know if you are interested and we can discuss it further.
- Once the button is pressed, I make an API call to see if there are similar builds for the current build in the Archives. Other build providers can also implement their own API's and lists for this (See the fixes section, lists are now website agnostic.)
- My implementation can only find similar builds if the current one's root build are already added to the Archives and classified by the algorithm. Since I'm collecting almost every build from the youtube and reddit, I think it should work for many. If the build is not in the Archives, list will just say "No builds found."
Fixes
- Lists are now website agnostic. Providers can implement their own lists by inheriting ExtBuildListProvider abstract class and adding it the provider list in relevant modules. Please let the PoB Archives stay the default as a courtesy for my efforts.
- API's are now modular. Each provider can list their API's as multiple tabs and implement fetching on their classes.
- Fixed responsiveness issues.
- Fixed the issue where tab buttons not indicating the active one correctly.
- Author names are now hidden, but please uncomment that part in ExtBuildList:Draw function and try it with author names while you are reviewing. I think including author names would be better because people would be more interested if a build is from a reliable youtuber/build maker they know.
- Builds listed in this list, if they are coming from the PoB Archives, will be filtered for edits from now on. So if users edit their builds in any way in the site, it wont be listed to prevent title abuse and injection.
- I didn't remove the new ascendancy portraits, I tried the ones in TreeData but they are made for TreeView, and I think they look bad as 80x80 portraits, also indistinguishable. I can still use the ones in TreeData or move new ones to an appropriate place, please let me know.
Known issues, need help
Please point me in the right direction for these issues, direct fixes by others are also appreciated.
- While in Tree View, similar builds list and the tree share the scrollbar. I'm guessing this can be fixed in PassiveTreeView.
- Scrollbar doesn't snap to the bottom while scrolling and makes multiple round trips up and down.
- In the Builds module, scrollbar doesn't start working until the list is clicked.
Feel free to add new commits fellow PoB Warriors, I'm happy to share this PR and any help/improvement is appreciated.
Changes
- Similar builds can now be queried with any build.
- Moved similar build to a popup, looks better and scrolling issues are fixed.
- Re-enabled author names because I think exiles should prefer known build creators and would like to see them for context. Let me know if I should remove it.
If anything, this should link directly to the build link that Divina scraped from, and not to PoB Archives.
FYI This PR is a hot topic on reddit
https://www.reddit.com/r/pathofexile/comments/1ec10fo/path_of_building_has_been_hijacked_by_a_forprofit/