Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Show channel description on long press #3101

Merged
merged 4 commits into from
Mar 2, 2017

Conversation

aounhaider1
Copy link
Contributor

fixes issue reported here: #3051 (comment)
Signed-off-by: Aoun Bukhari bukhari@itemis.de

Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
$scope.showDescription=function(channel,channelType){
var popup = $mdDialog.alert({
title: channel.label?channel.label:channel.channelType?channel.channelType.label:channel.id,
textContent: channel.description?channel.description:channel.channelType?channel.channelType.description:'No description available',
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of showing "No description available", might it make more sense to only offer the long press on channels where there is a description available?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can be, but then user might keep on trying to open the dialog and think its broken?

Copy link
Contributor

Choose a reason for hiding this comment

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

Might be. But then again, the description is localized and thus should be the "no description" message, if possible (which it isn't ;-)).
At many other places, a long press does nothing, so I think it is an expected situation that "nothing happens" means "nothing available" and not "all broken" ;-)

@@ -575,6 +575,20 @@ angular.module('PaperUI.controllers.configuration', [ 'PaperUI.constants' ]).con
$scope.hasProperties = function(properties) {
return util.hasProperties(properties);
}

$scope.showDescription=function(channel,channelType){
Copy link
Contributor

Choose a reason for hiding this comment

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

add a space before the curly bracket?

Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
@aounhaider1
Copy link
Contributor Author

Updated.

<h3 ng-if="!channel.label && !channel.channelType.label">{{channel.id}}</h3>
<p>
{{thing.UID + ':' + channel.id}}<i ng-show="advancedMode" class="material-icons copy-clipboard" copyclipboard="{{thing.UID + ':' + channel.id}}">content_copy</i>
</p>
<p ng-if="channel.description" ng-bind-html="channel.description"></p>
<p ng-if="!channel.description && channel.channelType.description" ng-bind-html="channel.channelType.description"></p>
<p>{{channel.itemType}}</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

something seems to be wrong with the indentation here.

Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
Signed-off-by: Aoun Bukhari <bukhari@itemis.de>
Copy link
Contributor

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

lgtm

@kaikreuzer kaikreuzer merged commit d634eb6 into eclipse-archived:master Mar 2, 2017
@kaikreuzer kaikreuzer modified the milestone: 0.9.0 Jun 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants