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

Sort Auction items based on stats #181

Closed
GreatApo opened this issue Jun 15, 2020 · 9 comments · Fixed by #194
Closed

Sort Auction items based on stats #181

GreatApo opened this issue Jun 15, 2020 · 9 comments · Fixed by #194

Comments

@GreatApo
Copy link
Member

Ability to sort Auction items based on stats (heal, damage etc)

requested in discord

@mehmetkaradeniz
Copy link
Contributor

mehmetkaradeniz commented Jul 12, 2020

I'm experimenting on this feature. Let me know if you guys have any ideas.

Right now the logic i'm trying to implement is:

  • Parse item tooltip and save it in item data attributes (damage, armour etc)
  • Sort ui based on these attributes

UI
image
image
image

Ideas

  • Highlight sort keyword on item's tooltip after sort action
  • If sort dropdown becomes too long, group items just like horreum resource dropdown
  • Use toggle button for asc, desc instead of dropdown?

@mehmetkaradeniz
Copy link
Contributor

I sent pr for the demo. It can sort auction items by max damage, armour, health and healing values at the moment.
Can be added more stats by extending the keyword model.

For UI I didn't know much so I just made it look like the filter panel.

@GreatApo
Copy link
Member Author

GreatApo commented Jul 13, 2020

@mehmetkaradeniz good work!

I made some improvements (commit 0c134ac)
Hopefully, it will not work for everyone (at least most options)

There is on bug, it doesn't work on 3 items view.

@mehmetkaradeniz
Copy link
Contributor

@GreatApo Nice!

About the bug, can you give more details?
Do you mean when there are 3 items on table, the sort won't work?

I will check the case in the first change I get.

@GreatApo
Copy link
Member Author

I mean when you enable the option to see 3 items in each row :)

@mehmetkaradeniz
Copy link
Contributor

Fixed.

@GreatApo
Copy link
Member Author

That was fast 😂

@mehmetkaradeniz
Copy link
Contributor

Not gonna lie, I didn't even know this 3-view feature existed :)

Hopefully it was an easy fix

@GreatApo GreatApo removed the 🐛 bug label Jul 14, 2020
@GreatApo
Copy link
Member Author

I think it works quite well!

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

Successfully merging a pull request may close this issue.

2 participants