Currently, we are missing the following options to sort party mates in the header: background, Habitica date joined, last time user logged in, and sort by level. There should also be options that allow you to choose between sorting by ascending and descending for each sort type. For this ticket, we'll definitely need to see screenshots to make sure that everything is presented correctly.
can i try this?
I've been meaning to work on a Vuejs project.
@kartikadur Sure! Thank you! Comment here if you have questions or run into trouble.
@Alys I think I have everything mostly figured out, just need a few clarifications.
background refer to in the user profile data?@kartikadur
preferences.background in the user's data. All avatars that use the same background should be grouped together. I believe that's the only requirement for this sort order. There's no need to try to put the avatars in order of the name of the background, or its release date, or anything like that.website/common/locales/en/ not in the other locales directories. See the README in that directory for details. (However if you'd like to help with translations for a language you are fluent in, you'd be welcome to! Guidance for Linguists)Is there a prescribed unit test structure for a given code file?
Is there a prescribed design spec for making changes to UI?
I'm not aware of documentation about that but other admins might post here about it.
@Alys thanks for the update
Since this ticket requires preapproval, I wanted to confirm a few things before I make any design / code choices. Listed below are the sort options, to the best of my understanding.
sortBy option | sortBy order | flavour text (website/common/locales/en) |
---------- | ---------- | ---------- |
background | n/a | background |
class | n/a | class |
date joined | ascending | earliest date joined |
| | descending | latest date joined |
last login | ascending | earliest login |
| | descending | latest login |
level | ascending | lowest level |
| | descending | highest level |
name | ascending | name (a - z) |
| | descending | name (z - a) |
tier | ascending | lowest tier |
| | descending | highest tier |
Another option I am considering for the flavour text is using svg assets similar to and
to indicate ascending and descending, to save space.
A single dropdown for sorting is usually preferable, but 7+ (12 in this case) choices might prove a little unweildy.
Another option is to divide it into 2 dropdowns with 6 (first col) and 2 (second col) choices, but that has its own issues with screen real estate.
Thanks
closed | open - all options | open - filtered options | open - no options |
----- | ----- | ----- | ----- |
|
|
| 
Quick jsFiddle mock up -- I'm using a free/ anonymous account so it might be deleted in the near future.
edit: added some error handling.
I've included a quick mockup of the sort options dropdown. It doesn't have all the sort options and css rules, but is provided for showcase purposes.
sort option not available is displayed.Thanks for all this work! I'm tagging @Tressley on this so that he can give you some feedback on the implementations of the designs.
No problem. This is an interesting interaction design issue.
Hey @kartikadur -- Great work so far! A couple of points of feedback:
cc: @lemoness
@Tressley, thanks for the update.
Does sorting 'class', a categorical parameter, provide any benefits? I would assume a filter would be more suited for it. (ditto with background if it is still being considered).
For 'Date Joined' should I use ascending, descending, or both ?
@kartikadur - Class can be sorted alphabetically (Healer, Mage, Rogue, Warrior), but yes, you're correct in stating a filter would be more appropriate. Date Joined should be both! Sorry for the confusion.
@kartikadur Please also include Last login in both directions since it's one of the most useful sort orders.
I'd like to see Background kept too since it's often the most attractive option unless @Tressley has a specific objection to it. It could be sorted by background key (no need to sort by name). I'd suggest allowing sorting in both directions to give the user the most flexibility in choosing an attractive arrangement for the header. In the past we've had people share themed screenshots of their headers with all visible party members using the same background and I'd like to keep allowing that use case.
@Tressley should I be add filter options in that case or just stick to sort options? Thanks for the clarification.
@Alys Thanks for the update, I'll keep 'Last Login' (asc, desc) as it does seem to have a valid use case, though I am a little shakey on 'Background'
If I may use an example: user wants to take a background themed screenshot. Suppose the user wants a background that appears in position 3 in an alphabetically (or otherwise) sorted order. With sorting they have to coordinate with the entire group to ensure that background options 1 and 2 are not selected by any one. If anyone in the party has not logged in, is unwilling to change their background, or cannot be reached then it poses a problem. With filtering it is a single interaction within habitica. (I can think of a similar use case for Class as well). Of course I will defer to @Alys, @Tressley, and @lemoness's final decision.
Let me know if I can finalize the list as stated below.
@kartikadur That background example is just one of the use cases. A more relevant one that I should have remembered earlier is that some of the backgrounds tile - they've been specifically designed by the artists to be used by two or more players at once with the sort option set to background to take advantage of the tiling. You can see them on the wiki at Backgrounds > Tiling Backgrounds. I'm not sure filtering would be a good alternative - it's only a temporary state isn't it, not a permanent state in the header all the time?
@Alys thanks for letting me know.
In that case, I'll start working on the list below.
@kartikadur -- Let's stick with Sort options for now. I'll need some time to address filters in the design. In the mean time, I think the list you've provided looks good to start working with. @Alys -- Does this hit everything for you?
@kartikadur @Tressley Yes, thanks, that list is good! I'd be happy for the work to start based on it.
I have a slight preference for allowing sorting in both directions for all options to maximise flexibility, but I understand you probably want to keep the list short so it's not worth considering that unless there's other requests for it in future.
I can start based on the current inputs. Let me know if there are suggestions for the flavour text.
I'm reopening this because while it's fixed nicely in the "View Party" modal by kartikadur's PR, a different change is needed for allowing sorting for the header.
@Alys could you give me an update on what is needed? I figure I can work on it since I made the earlier changes.
Ah, sorry, I should have changed the labels on this to indicate it's waiting for a design decision! @kartikadur you'd be most welcome to take this on once a decision has been reached, if you're still interested then! One of us will post here when that happens.
@Tressley
No worries.
@Alys Any progress on the design decision? Is there anything anyone can do to help move that along? I really miss seeing my header sorted by most recent login (so I can tell who's active, and see people's outfits as they change — somehow the default sort order shows all the people in my party who haven't checked in in months) so I'd be motivated to help get this to the point that @kartikadur could resume work if there was anything that someone else could do.
There's been no progress so far.
@Tressley What if we did something simple for now and then it could be revisited later if needed? For example, in the party members list, just under the Sort drop-down, there could be a button labelled "Apply this sort to header". When you click it, your most recent sort selection is saved to your party.order setting so it would then be permanently applied to the header (it would not be permanently applied to the members list - that would keep working the way it does now).
There is a design out for this now, and I've been assigned to work on implementing it. I'll link a PR here once I have something together!
Commenting the Zeplin art board here for quick reference: https://zpl.io/VkYM1Lb