Skip to content

Commit 9e61e27

Browse files
Add release notes for gauge 4.0.0
1 parent 82e0aa6 commit 9e61e27

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

releases/gauge.md

+42
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Releases
22

3+
4+
### 4.0.0 (2019, March 14)
5+
6+
#### Breaking changes:
7+
- [Add enumerations for string properties](https://github.com/NativeScript/nsplugins-internal/issues/169)
8+
9+
10+
11+
## What is the current behavior?
12+
1. Enum-looking properties are difficult to use, because their type is string and they are hard to guess. Example:
13+
```
14+
scaleStyle.ticksLayoutMode = "Outer";
15+
```
16+
2. Color related properties are not using the Color type, instead they are of type string. Example:
17+
```
18+
scaleStyle.lineColor = "SlateGray";
19+
```
20+
21+
## What is the new behavior?
22+
1. The enum-looking properties have their enums, so they are easier to use. Example:
23+
```
24+
scaleStyle.ticksLayoutMode = GaugeScaleLayoutMode.Outer;
25+
```
26+
2. The Color related properties are using the type especially created for handling colors - Color:
27+
```
28+
scaleStyle.lineColor = new Color("SlateGray");
29+
```
30+
31+
Related to [this issue](https://github.com/NativeScript/nsplugins-internal/issues/169).
32+
33+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
34+
35+
## &#x1F534; BREAKING CHANGES &#x1F534;
36+
37+
1. The following enumerations are created: `GaugeScaleLayoutMode`, `GaugeIndicatorCapMode`. They are used where appropriate.
38+
2. Every property that contains "color" in its name (for example: `majorTicksStrokeColor`, `lineColor`, etc.) is now of type `Color` (was `string`).
39+
40+
Migration steps:
41+
- replace every "magic string" usage with a value from the relevant enum
42+
- replace every "Color string" usage with values of type `Color`
43+
44+
345
### 3.8.0 (2018, December 20)
446

547
#### Features:

0 commit comments

Comments
 (0)