A user may expect that a unit will be assumed if none is present, such as in some design tools where px is generally assumed. This breaks the data model however, as units must be present as part of the text and cannot be assumed, so we can attempt to ameliorate this by adding the unit ourselves.
Requirements
Add a default-unit attribute to the <units-text-field>, if present add a unit to the data (e.g. if data is "10" add "10px" if the default-unit is "px") and send a message, this should happen when:
timer delay (determine the correct timing for this)
What package(s) should this feature be added to?
@microsoft/fast-tooling
Summary
Description
A user may expect that a unit will be assumed if none is present, such as in some design tools where
px
is generally assumed. This breaks the data model however, as units must be present as part of the text and cannot be assumed, so we can attempt to ameliorate this by adding the unit ourselves.Requirements
default-unit
attribute to the<units-text-field>
, if present add a unit to the data (e.g. if data is "10" add "10px" if thedefault-unit
is "px") and send a message, this should happen when: