[PATCH] Sorting buttons -- IN PROGRESS

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Message
Author
iksi99
Krill Swarm
Posts: 14
Joined: Sun Jul 01, 2012 9:47 pm

[PATCH] Sorting buttons -- IN PROGRESS

#1 Post by iksi99 » Mon Jul 02, 2012 10:05 pm

I'm trying to make some buttons to sort the sidepanel planets by Population, Farming, etc. and I have an idea how to do it, but because it changes the interface I thought I should consult with others about the position of the buttons in the sidepanel. Please give your opinion in the replies. Also, if this is already in progress somewhere else or has been done already, let me know.

EDIT So far, all new code is in the SidePanel.cpp
Last edited by iksi99 on Tue Jul 03, 2012 1:38 pm, edited 1 time in total.
Ilija Anastasijević - iksi99

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Sorting buttons -- IN PROGRESS

#2 Post by Geoff the Medio » Mon Jul 02, 2012 10:31 pm

Something like this, with droplists to select a sorting method, and a better-centred resource summary...
Attachments
SidePanel_Sort_Show.png
Current Layout (left) and Mockup (right)
SidePanel_Sort_Show.png (114.5 KiB) Viewed 624 times

iksi99
Krill Swarm
Posts: 14
Joined: Sun Jul 01, 2012 9:47 pm

Re: [PATCH] Sorting buttons -- IN PROGRESS

#3 Post by iksi99 » Tue Jul 03, 2012 1:00 pm

Geoff the Medio wrote:Something like this, with droplists to select a sorting method, and a better-centred resource summary...
OK, will do.
Ilija Anastasijević - iksi99

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [PATCH] Sorting buttons -- IN PROGRESS

#4 Post by eleazar » Tue Jul 03, 2012 3:14 pm

I'm not sure sorting is desirable in the side panel. It is a very short list, so sorting adds little, and destroys the spatial recognition part.

We definitely need a sortable planet list, but IMHO it should be for all known planets, not just the ones in a single system.

Filtering the sidepanel, maybe by "All", "Yours", and "Inhabited" might be useful in the side panel, maybe reducing the filtered-out planets to a minimized view.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Sorting buttons -- IN PROGRESS

#5 Post by Geoff the Medio » Tue Jul 03, 2012 3:30 pm

eleazar wrote:I'm not sure sorting is desirable in the side panel. It is a very short list, so sorting adds little, and destroys the spatial recognition part.
Whether filtering / collapsing some, or sorting, is better, I'm not sure, but I vaguely recall sorting being requested a few times... But some sort of display adjustment on the list would be good, as it's annoying to have to scroll down to the single populated planet in a system with 8 or so planets.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [PATCH] Sorting buttons -- IN PROGRESS

#6 Post by eleazar » Tue Jul 03, 2012 5:08 pm

Geoff the Medio wrote:...But some sort of display adjustment on the list would be good, as it's annoying to have to scroll down to the single populated planet in a system with 8 or so planets.
Ah, that's a very legitimate complaint. I'd forgotten about that with my nice big screen.

But if that is the core issue, i think it would best be solved by making the sidebar remember its scroll position for each system. It is always nice to find things where you left them.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Sorting buttons -- IN PROGRESS

#7 Post by Geoff the Medio » Tue Jul 03, 2012 5:20 pm

eleazar wrote:But if that is the core issue, i think it would best be solved by making the sidebar remember its scroll position for each system. It is always nice to find things where you left them.
It's also easy to miss a planet that's scroll off when looking through systems that haven't previously been scrolled through. Having sorting or hiding options so the important ones are on the top / less important ones shrunk would avoid this and be more usable.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [PATCH] Sorting buttons -- IN PROGRESS

#8 Post by eleazar » Tue Jul 03, 2012 6:34 pm

Geoff the Medio wrote:
eleazar wrote:But if that is the core issue, i think it would best be solved by making the sidebar remember its scroll position for each system. It is always nice to find things where you left them.
It's also easy to miss a planet that's scroll off when looking through systems that haven't previously been scrolled through. Having sorting or hiding options so the important ones are on the top / less important ones shrunk would avoid this and be more usable.
By what criterion can you sort/hide planets that won't increase the incidence of not seeing planets you would probably wish you had seen? A player too lazy to scroll down the list is not going to change his filter mode frequently enough to avoid missing even more significant planets.

For the issue of it sometimes being non-obvious that there are more planets off the screen, the direct solution is to increase the visibility of the scrollbar, such as pictured here:
Image


As for a compressed sidebar to take up less space and help you focus on more relevant planets, i present this concepts. (i forgot to do the control buttons).
Basically, i imagine you could toggle between minimizing "None", "Uninhabited", or "Not Yours". It would also be nice for instance on the production screen, where planets that you can't build anything on could automatically all be minimized.

EDIT: FYI, in this example, the compressed planets take up 50% as much vertical space.
compressed sidebar.png
compressed sidebar.png (231.87 KiB) Viewed 606 times

Zireael
Space Dragon
Posts: 429
Joined: Mon Aug 15, 2011 5:33 pm

Re: [PATCH] Sorting buttons -- IN PROGRESS

#9 Post by Zireael » Tue Jul 03, 2012 7:04 pm

Like the compressed sidebar. Brilliant!

iksi99
Krill Swarm
Posts: 14
Joined: Sun Jul 01, 2012 9:47 pm

Re: [PATCH] Sorting buttons -- IN PROGRESS

#10 Post by iksi99 » Tue Jul 03, 2012 10:27 pm

I think the best solution is to implement a bit of everything. Agreed?
Ilija Anastasijević - iksi99

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: [PATCH] Sorting buttons -- IN PROGRESS

#11 Post by eleazar » Wed Jul 04, 2012 1:41 am

iksi99 wrote:I think the best solution is to implement a bit of everything. Agreed?
That's too vague to agree with.

What problem specifically are you trying to address?

iksi99
Krill Swarm
Posts: 14
Joined: Sun Jul 01, 2012 9:47 pm

Re: [PATCH] Sorting buttons -- IN PROGRESS

#12 Post by iksi99 » Wed Jul 04, 2012 2:16 pm

eleazar wrote:
iksi99 wrote:I think the best solution is to implement a bit of everything. Agreed?
That's too vague to agree with.

What problem specifically are you trying to address?
Well, some form of sorting and/or filtering was requested on the tracker page on Sourceforge. So, it's a feature request.
Ilija Anastasijević - iksi99

iksi99
Krill Swarm
Posts: 14
Joined: Sun Jul 01, 2012 9:47 pm

Re: [PATCH] Sorting buttons -- IN PROGRESS

#13 Post by iksi99 » Wed Jul 04, 2012 10:21 pm

I think I'll start working tomorrow. It'll be a droplist used for filtering. Also, can someone tell me how does the PlanetPanelContainer sort planets? I can't find the code anywhere!
Ilija Anastasijević - iksi99

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12268
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: [PATCH] Sorting buttons -- IN PROGRESS

#14 Post by Geoff the Medio » Thu Jul 05, 2012 12:20 am

iksi99 wrote:I...how does the PlanetPanelContainer sort planets? I can't find the code anywhere!
It doesn't; when SetPlanets is called, it iterates over the vector of planet ids passed in, and fills its internal vector of PlanetPanels in the order of the passed-in ids.

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: [PATCH] Sorting buttons -- IN PROGRESS

#15 Post by Bigjoe5 » Thu Jul 05, 2012 1:34 am

I'm not at all fond of the idea of actually removing planets from the sidepanel view. A filter is fine, but it should, IMO, reduce the size of the panels for planets that don't match the filter condition, as in eleazar's mockup.
Warning: Antarans in dimensional portal are closer than they appear.

Post Reply