owid-grapher icon indicating copy to clipboard operation
owid-grapher copied to clipboard

Ability to fully specify display order of options in explorers

Open marcelgerber opened this issue 2 years ago • 5 comments

Core problem

Currently in explorers, one can only specify a global display order of options. For example, with the following config:

Roman Dropdown	Greek Dropdown
A		α
A		β
A		γ
B		β
B		α

then for Roman Dropdown = B it has α, β for Greek Dropdown, since α comes globally before β.

In particular, it is not possible to have Greek sorted differently for A and B.

For the political regimes explorer, @bastianherre would like to be able to do exactly that.

Context

Bastian writes this here:

Sometimes the explorer lists the sub-metrics in the order in which I listed it in the spreadsheet, sometimes it does not. Is there any way to make it such that it always uses my specified order?

Additional considerations

  • Make sure to check that existing explorers don't change too much in their options order.

marcelgerber avatar Jun 13 '22 17:06 marcelgerber

I would estimate this to take 4 hours to one day. but there might be complications if some piece of code depends on the order of options.

marcelgerber avatar Jun 13 '22 17:06 marcelgerber

This also come up as an issue in the demography explorer.

marcelgerber avatar Jul 05 '22 18:07 marcelgerber

Rated this as priority 2, keeping in mind that we want to build a global health explorer later this year where we will probably also run into this issue.

marcelgerber avatar Jul 12 '22 10:07 marcelgerber

@marcelgerber I recalled you had a specific idea on how to solve this. My sense is that we only want it if it doesn't add a new horrible layer of maintenance, i.e. if we have a very clear config and abstraction for doing it. Otherwise we might accept it as a limitation of explorers.

larsyencken avatar Jul 26 '22 11:07 larsyencken

Reducing the prio for now, but we can bump it again if hit it in a bad way for a new explorer.

larsyencken avatar Jul 26 '22 11:07 larsyencken

Hello from the health explorer - running into this issue again :) It would be useful to be able to control the ordering of different drop down metrics -https://docs.google.com/document/d/19hTiUnrHnKp_DMRtvn4d0bRabxSM6mlzBmTuLk7MspI/edit?disco=AAAAhz6qF9s

spoonerf avatar Oct 21 '22 09:10 spoonerf

This issue has had no activity within 10 months. It is considered stale and will be closed in 7 days unless it is worked on or tagged as pinned.

github-actions[bot] avatar Aug 18 '23 07:08 github-actions[bot]