Modify

Opened 5 years ago

Last modified 5 years ago

#19077 reopened enhancement

Presets: label suffix/unit at end of text input box

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: preset unit suffix label i18n Cc: skyper

Description

From ticket:8180

Label units at end of text input box:

<text key="somekey" text="Long" unit="m"/>

Attachments (3)

2020-04-12-192637_348x313_scrot.png (9.3 KB ) - added by simon04 5 years ago.
19077.patch (4.4 KB ) - added by simon04 5 years ago.
wikipedia_example.png (2.6 KB ) - added by gaben 5 years ago.
the grey text is added by Wikipedia plugin

Download all attachments as: .zip

Change History (16)

by simon04, 5 years ago

by simon04, 5 years ago

Attachment: 19077.patch added

comment:1 by simon04, 5 years ago

Keywords: i18n added
Milestone: 20.04
Owner: changed from team to simon04
Status: newassigned

Presumably, we'd also need to support <combo>. Maybe we'd also need i18n.

<item name="Pipeline">
  <combo key="diameter" text="Diameter" suffix="mm" values="800,1000" />
  <text key="pressure" text="Pressure" suffix="bar" />
</item>


I'm not convinced that this feature is a big improvement – WONTFIX? Any thoughts?

in reply to:  1 comment:2 by skyper, 5 years ago

Replying to simon04:


I'm not convinced that this feature is a big improvement – WONTFIX? Any thoughts?

It will be more interesting if you could set a different unit which will be added to the value and if the unit is demanded like in #11253 without a default unit.

Last edited 5 years ago by skyper (previous) (diff)

comment:3 by Klumbumbus, 5 years ago

It is not so good for cases like maxspeed where you set no unit if kph but set the unit if mph.

comment:4 by skyper, 5 years ago

I think about a combo for units right (for some languages left) of the value in order to choose the unit. For demanded units like in #11253 with an option to always include the unit otherwise omit the default unit (first position in the list) which should be the default setting.

comment:5 by simon04, 5 years ago

Milestone: 20.04
Owner: changed from simon04 to team
Status: assignednew

I see a lot of trouble to get this feature done properly: unit conversion yes/no, splitting apart and joining tags, with/without space between value and unit, tags with multiple values (220kV;380kV), expert users are annoyed because they have to use two separate input fields, …

I won't work on this feature in the foreseeable future.

in reply to:  5 comment:6 by Klumbumbus, 5 years ago

Replying to simon04:

I see a lot of trouble to get this feature done properly

I too. Wontfix?

comment:7 by simon04, 5 years ago

Resolution: wontfix
Status: newclosed

If anyone is interested to work on this, feel free to reopen.

comment:8 by gaben, 5 years ago

I have a new idea. It is less intrusive than the original solution and maybe easier to implement. Wikipedia plugin already does this on wikidata keys:

the grey text is added by Wikipedia plugin

So the idea is, to put the default unit next to the value. If an explicit unit is provided, there is no need to show anything. Because of this, it would work on combo keys. This can maybe be applied to MapCSS as well because a number without context doesn't mean anything.

I see possible problems with this approach. There are generic keys, like capacity which used from parking slots to storage tanks. To show cubic metre for a storage tank first there should be information about the preset, that is not a parking slot, but a thing with volume (=cubic metre).

For default units, see https://wiki.openstreetmap.org/wiki/Map_Features/Units

What do you think?

Last edited 5 years ago by simon04 (previous) (diff)

by gaben, 5 years ago

Attachment: wikipedia_example.png added

the grey text is added by Wikipedia plugin

comment:9 by simon04, 5 years ago

Milestone: 20.05
Resolution: wontfix
Status: closedreopened

@gaben, your suggestion is somewhat similar to comment:1. Still, there isn't a big advantage compared to what we're doing now – writing the default units in parentheses.

Let's reopen this ticket for some further discussion/evaluation.

comment:10 by Klumbumbus, 5 years ago

Milestone: 20.0520.05old

Milestone renamed

comment:11 by Klumbumbus, 5 years ago

Milestone: 20.05old20.05

comment:12 by Klumbumbus, 5 years ago

Milestone: 20.05

in reply to:  9 comment:13 by gaben, 5 years ago

@simon04: Yeah maybe, it depends. When someone doing QA, it is better to see all the information at once. Currently, to see those units what you mentioned, one should open the preset editor which is an unnecessary extra step in my opinion.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as reopened The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user. Next status will be 'new'.
Next status will be 'needinfo'. The owner will be changed from team to simon04.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.