owid / owid-grapher

A platform for creating interactive data visualizations
https://ourworldindata.org
MIT License
1.35k stars 227 forks source link

Add functionality to select several entities with one search #3666

Open paarriagadap opened 1 month ago

paarriagadap commented 1 month ago

Core problem

When we search for a text in the entity selector, it is not possible to pick more than one option since the search restarts after the first pick. It would be nice to have the option for cases like America, Africa, Europe, or Asia, where there are commonly multiple subregions. Also, for regions defined with the source between parentheses so we don't need to type for each one of them.

Proposed solution

A possible solution could be to implement a multiple selection by holding the Shift button in the keyboard, similar to the hidden option available for maps.

Context

Original Slack conversation here.

Two examples of the current configuration here:

https://github.com/owid/owid-grapher/assets/63430031/0a228ffb-ae29-4b80-a73d-80585a542121

https://github.com/owid/owid-grapher/assets/63430031/1d069da1-e213-4faf-9168-8004b3e42f7e