cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Lots of issues of style controlling for Value Display in Thingworx 8.5

seanccc
17-Peridot

Lots of issues of style controlling for Value Display in Thingworx 8.5

Hi, 

Value Display has big changes in Thingworx 8.5,  which lead to lots of issues: 

1.  The render property cannot set style anymore. (It's a known regression issue of feature lost I think)

2.  It's allowed to set style theme on value display, but: 

     2.1  The style theme doesn't work in a contained mashup for value display(for example, text color doesn't take effect)

     2.2  The style theme must be same in the same mashup (limitation)

     2.3  The element in style theme doesn't has value display(limitation)

3.  The base style properties cannot only control the "novalue" property,  if the the value bind to value display to data,  then the style can NOT be controlled. 

4. The html of value display introduces "shadow dom" , but the customCss editor doesn't allow to use ^ or ^^ to access the dom from the parent .  I understand of the purpose of shadow dom is to spearated it from the parent,  but because of  issue #1,2,3,  we even don't have a easy workaround with customCss.  

5.  We do can develop a custom widget which is used to access the shadow dom via javascript ,  but it's not the proper way to handle such a common style setting. 

 

Any improvement plan for the above issues ? 

 

Regards,

Sean

 

ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:seanccc)

Hi Sean

 

here is some input that hopefully will help:

 

1) you are right this is something known and documented at https://www.ptc.com/en/support/article/CS317147 . There is though no statement as yet on when this will be addressed.

 

2) Regarding the Style Theme I think some of the behaviour you are mentioning are the expected behaviour of a theme. The Style Themes chapter in Help Center has the following:

"When you apply a style theme to a top-level mashup, it is also applied to all embedded widgets and mashups"

This implies that the Style Theme of a contained mashup never takes effect because the style theme of the container mashup takes precedence. I think that covers 2.1 and 2.2.

For 2.3 there is indeed no specifics about value display though we can manage the text style through it but indeed not everything. For that I would recommend opening a Product idea as this is the way product managers will be aware of the demand.

 

3) indeed, this would also require opening a Product Idea to submit this enhancement request

 

4) I think you can access at least some of the shadow with css code like shown in https://www.ptc.com/en/support/article/CS319193.
Additional example, to change the color of the bound text, you could use

 

.widget-ptcsvaluedisplay::part(item-value)::part(label){
color: red;
}

 

I hope some of it will help you

Kind regards

Christophe

 

 

 

View solution in original post

2 REPLIES 2
cmorfin
19-Tanzanite
(To:seanccc)

Hi Sean

 

here is some input that hopefully will help:

 

1) you are right this is something known and documented at https://www.ptc.com/en/support/article/CS317147 . There is though no statement as yet on when this will be addressed.

 

2) Regarding the Style Theme I think some of the behaviour you are mentioning are the expected behaviour of a theme. The Style Themes chapter in Help Center has the following:

"When you apply a style theme to a top-level mashup, it is also applied to all embedded widgets and mashups"

This implies that the Style Theme of a contained mashup never takes effect because the style theme of the container mashup takes precedence. I think that covers 2.1 and 2.2.

For 2.3 there is indeed no specifics about value display though we can manage the text style through it but indeed not everything. For that I would recommend opening a Product idea as this is the way product managers will be aware of the demand.

 

3) indeed, this would also require opening a Product Idea to submit this enhancement request

 

4) I think you can access at least some of the shadow with css code like shown in https://www.ptc.com/en/support/article/CS319193.
Additional example, to change the color of the bound text, you could use

 

.widget-ptcsvaluedisplay::part(item-value)::part(label){
color: red;
}

 

I hope some of it will help you

Kind regards

Christophe

 

 

 

seanccc
17-Peridot
(To:cmorfin)

Hi Christophe, 

 

Thank you for the quick reply.  It's very helpful.  I'll try the css you mentioned to controll the style of value display. 

 

Regards,

Sean

Announcements


Top Tags