SiegeEngineers / aoe2techtree

Age of Empires II Tech Tree
https://aoe2techtree.net/
MIT License
225 stars 59 forks source link

Added proof of concept for filtering #134

Open allenselew opened 1 year ago

allenselew commented 1 year ago

Hey SiegeEngineers,

Thanks for all your work on this project so far. It's the best aoe2 tech tree on the internet for sure.

This PR is a proof of concept to add a filtering mode which allows users to quickly answer questions like "Which civs have Arbalest, Thumb Ring, and Heavy Cav Archer?". Normally that would require looking at three separate tooltips' advanced stats and discerning the union of highlighted civs. Not so easy at a glance:

union-example

I figured it'd be easier if I could just click on all the techs I was interested in and see one list of civs that have access to all of the selected filters.

You can see a quick example of filtering in this gif below: aoe2techtree-filtering-poc

I don't think the level of design/polish here is anywhere close to being ready to merge, but figured I'd put it up to generate discussion and see if this is the kind of feature that would fit into this app. If not, perhaps it'd be something I could contribute as a separate site for SiegeEngineers.

Cheers!

HSZemi commented 10 months ago

Sorry I have not gotten back to you on this, my August has been pretty busy. Your demonstration looks quite neat! I hope I can find time to check it out in more detail in the coming days.

HSZemi commented 9 months ago

After having a proper look, some things to consider:

  1. I think you don't actually need the data in filtertechtrees. Isn't that just a repeat of the civ data? When you click on a unit caret, you should be able to check for civs that have the numeric ID in their units list.
  2. The tech tree is built to use the full available height if I recall correctly. So when you add a bar at the top, I imagine you'll be spawning a scrollbar at the side. Maybe that can be avoided somehow