electricitymaps-contrib icon indicating copy to clipboard operation
electricitymaps-contrib copied to clipboard

Frontend feature request: handle long strings in energy sources panel

Open jarek opened this issue 3 years ago • 6 comments

The "energy sources" list clips strings that are too long:

image (this screenshot is with the English label manually changed to "pumped hydro storage")

Describe the solution you'd like

It would be nice if it instead shifted how much space the text can take up by shortening the production bars instead (within some limits), or wrapped the text, or did something else to allow longer labels.

Additional context

This is an issue for several of the languages, where text is either clipped on display, or had to be abbreviated in the localization file:

image image image image

jarek avatar Sep 09 '22 13:09 jarek

Hey! Can I work on this issue?

Ankitchaudharyy avatar Sep 20 '22 15:09 Ankitchaudharyy

Hey! Can I work on this issue?

Of course!

tonypls avatar Sep 26 '22 09:09 tonypls

jarek Provide Steps to reproduce this issue.

Ankitchaudharyy avatar Sep 26 '22 11:09 Ankitchaudharyy

It looks like in English this issue has been fixed but across other languages there is still an issue that sometime the energy production types in the zone overview panel on the left sometimes puts the label out of view.

A nice way to fix this would be to truncate the pumped hydro string when it's above a certain length and add ellipsis.

image

tonypls avatar Sep 26 '22 12:09 tonypls

Sure. @tonypls Thanks

Ankitchaudharyy avatar Sep 26 '22 12:09 Ankitchaudharyy

It seems this issue is still relevant, but now the string overflows instead of being hidden. A couple of examples in Brazilian Portuguese and Polish:

image image

Lucas-Otavio avatar Jun 20 '24 12:06 Lucas-Otavio