Modify

Opened 12 months ago

Last modified 11 months 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 12 months ago.
19077.patch (4.4 KB) - added by simon04 12 months ago.
wikipedia_example.png (2.6 KB) - added by gaben 12 months ago.
the grey text is added by Wikipedia plugin

Download all attachments as: .zip

Change History (16)

Changed 12 months ago by simon04

Changed 12 months ago by simon04

Attachment: 19077.patch added

comment:1 Changed 12 months ago by simon04

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?

comment:2 in reply to:  1 Changed 12 months ago by skyper

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 12 months ago by skyper (previous) (diff)

comment:3 Changed 12 months ago by Klumbumbus

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

comment:4 Changed 12 months ago by skyper

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 Changed 12 months ago by simon04

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.

comment:6 in reply to:  5 Changed 12 months ago by Klumbumbus

Replying to simon04:

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

I too. Wontfix?

comment:7 Changed 12 months ago by simon04

Resolution: wontfix
Status: newclosed

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

comment:8 Changed 12 months ago by gaben

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 12 months ago by simon04 (previous) (diff)

Changed 12 months ago by gaben

Attachment: wikipedia_example.png added

the grey text is added by Wikipedia plugin

comment:9 Changed 12 months ago by simon04

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 Changed 11 months ago by Klumbumbus

Milestone: 20.0520.05old

Milestone renamed

comment:11 Changed 11 months ago by Klumbumbus

Milestone: 20.05old20.05

comment:12 Changed 11 months ago by Klumbumbus

Milestone: 20.05

comment:13 in reply to:  9 Changed 11 months ago by gaben

@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.
to The owner will be changed from team to the specified user.
The owner will change to simon04
as duplicate The resolution will be set to duplicate.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.