Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed TurnList items appear on top of one another #596

Conversation

Ypostolov
Copy link
Contributor

@Ypostolov Ypostolov commented Sep 8, 2021

Fixes #483

This PR is ready for review.

Testing Plan

Navigation-1" group is assigned to mobile app;
SDL and HMI are started;
Navigation app is registered and activated;
ShowConstantTBT is requested successfully;
Mobile app requests UpdateTurnList with turn items without images;

Observe: HMI responds with SUCCESS to Navigation.UpdateTurnList;
HMI shows the list of added turn items in Turn List

Summary

Fixed TurnList items appear on top of one another.

CLA

Comment on lines 95 to 96
classNames:turnListArray[i].turnIcon ? turnListArray[i].turnIcon.isTemplate ? ['list-item','ico-overlay'] : 'list-item':'' ,
classNames:turnListArray[i].navigationText ? turnListArray[i].navigationText.isTemplate ? ['list-item','ico-overlay'] : 'list-item':'' ,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This overwrites the check with the turnIcons (in the previous line) so sending an UpdateTurnList with only turnIcons results in the same overlap issue.

I think the logic should be combined

Suggested change
classNames:turnListArray[i].turnIcon ? turnListArray[i].turnIcon.isTemplate ? ['list-item','ico-overlay'] : 'list-item':'' ,
classNames:turnListArray[i].navigationText ? turnListArray[i].navigationText.isTemplate ? ['list-item','ico-overlay'] : 'list-item':'' ,
classNames:(turnListArray[i].turnIcon?.isTemplate) ? ['list-item','ico-overlay'] :
(turnListArray[i].turnIcon || turnListArray[i].navigationText) ? 'list-item' : '',

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ShobhitAd Looks like navigationText is just a TextFieldStruct which will never have isTemplate parameter so this line can be simplified to check turnIcon only
See 468e164 which works for any combinations as expected

@ShobhitAd ShobhitAd merged commit 6a8f6d3 into smartdevicelink:develop Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants