Skip to content

Commit

Permalink
Revise SDL-0305 Homogenize TextFieldName (#1109)
Browse files Browse the repository at this point in the history
* 0305 Additionally Remove navigationText

While `navigationText` is used as a parameter name in sdl_core, it is not used as a text field name

* apply revisions from issue 1113

* hmi api backticks
  • Loading branch information
iCollin authored Jan 27, 2021
1 parent b0968d6 commit 501d60a
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions proposals/0305-homogenize-textfieldname.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ All fields that currently exist only in the `HMI_API.xml` used to also exist in
+
+ <element name="turnText" since="X.X"/>
+ <description>Turn text for turnList parameter of UpdateTurnList</description>
+ </element>
+
+ <element name="navigationText" since="X.X">
+ <description>Navigation text for turnList parameter of UpdateTurnList</description>
+ </element>
</enum>
```
Expand All @@ -46,8 +42,6 @@ All fields that currently exist only in the `HMI_API.xml` used to also exist in

`turnText` is added because it exists in the [`HMI_API.xml`](https://github.com/smartdevicelink/sdl_core/blob/6.1.1/src/components/interfaces/HMI_API.xml#L629) and can be used in the [`UpdateTurnList` RPC](https://smartdevicelink.com/en/docs/hmi/master/navigation/updateturnlist/).

`navigationText` is added because it exists in the [`HMI_API.xml`](https://github.com/smartdevicelink/sdl_core/blob/6.1.1/src/components/interfaces/HMI_API.xml#L630) and can be used in the [`UpdateTurnList` RPC](https://smartdevicelink.com/en/docs/hmi/master/navigation/updateturnlist/).

#### HMI_API.xml

```xml
Expand All @@ -58,28 +52,42 @@ All fields that currently exist only in the `HMI_API.xml` used to also exist in
</element>
- <element name="timeToDestination"/>
+ <element name="timeToDestination">
+ <description>Optional time to destination field for ShowConstantTBT</description>
+ <description>Optional time to destination field for `ShowConstantTBT`</description>
+ </element>
- <!-- TO DO to be removed -->
- <element name="turnText"/>
+ <element name="turnText">
+ <description>Turn text for turnList parameter of UpdateTurnList</description>
+ <description>Turn text for `turnList` parameter of `UpdateTurnList`</description>
+ </element>
<element name="navigationText">
<description>Navigation text for turnList parameter of UpdateTurnList</description>
</element>
- <element name="navigationText">
- <description>Navigation text for turnList parameter of UpdateTurnList</description>
- </element>
- <element name="notificationText">
- <description>Text of notification to be displayed on screen.</description>
- </element>
</enum>
...
<struct name="Turn">
<param name="navigationText" type="Common.TextFieldStruct" mandatory="false">
- <description>Uses navigationText from TextFieldStruct.</description>
+ <description>Describes the `Turn` using `TextFieldName` `turnText`</description>
</param>
<param name="turnIcon" type="Common.Image" mandatory="false">
</param>
</struct>
```

`notificationText` is removed because it does not exist in the `MOBILE_API.xml` and is not used currently.
`navigationText` is removed because it does not exist in the `MOBILE_API.xml` and is not used currently.

The comment `<!-- TO DO to be removed -->` is removed because it is no longer relevant.

Descriptions are added to both `timeToDestination` and `turnText`.

#### HMI Integration Guidelines

Clarify that `UpdateTurnList` is using `fieldName` `turnText` within `TextField` parameter `navigationText`.

## Potential downsides

The author doesn't know of any downsides to this proposal.
Expand All @@ -88,10 +96,10 @@ The author doesn't know of any downsides to this proposal.

The `MOBILE_API.xml` changes will have no impact on existing code as only additions are made.

The `HMI_API.xml` changes will require updates to HMIs to remove `notificationText` from their capabilities and an update to Core to remove the processing of the `notificationText` `TextFieldName` capability.
The `HMI_API.xml` changes will require updates to HMIs to remove `notificationText` and `navigationText` from their capabilities and an update to Core to remove the processing of the `notificationText` and `navigationText` `TextFieldName` capabilities.

## Alternatives considered

The author considered making no changes to the spec but this would be confusing to developers and would cause problems when another element is added to the `TextFieldName` enum.

The author considered not removing `notificationText` but this solution would also cause problems when another element is added to the `TextFieldName` enum.
The author considered not removing `notificationText` or `navigationText` but this solution would also cause problems when another element is added to the `TextFieldName` enum.

0 comments on commit 501d60a

Please sign in to comment.