Skip to content
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

Added proof of concept for filtering #134

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

allenselew
Copy link

@allenselew allenselew commented Aug 25, 2023

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!

</div>
</div>
<div id="filtering">
<button id="filtering__toggle">Enable Filtering</button>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would probably need to have a translation added for locales

@HSZemi
Copy link
Member

HSZemi commented Nov 3, 2023

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
Copy link
Member

HSZemi commented Dec 1, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants