@@ -55,7 +55,7 @@ qx.Class.define("osparc.support.Conversation", {
5555 switch ( id ) {
5656 case "messages-container-scroll" :
5757 control = new qx . ui . container . Scroll ( ) ;
58- this . _add ( control , {
58+ this . _addAt ( control , 0 , {
5959 flex : 1
6060 } ) ;
6161 break ;
@@ -68,7 +68,13 @@ qx.Class.define("osparc.support.Conversation", {
6868 case "load-more-button" :
6969 control = new osparc . ui . form . FetchButton ( this . tr ( "Load more messages..." ) ) ;
7070 control . addListener ( "execute" , ( ) => this . __reloadMessages ( false ) ) ;
71- this . _add ( control ) ;
71+ this . _addAt ( control , 1 ) ;
72+ break ;
73+ case "support-suggestion" :
74+ control = new qx . ui . container . Composite ( new qx . ui . layout . VBox ( 5 ) ) . set ( {
75+ alignY : "middle"
76+ } ) ;
77+ this . _addAt ( control , 2 ) ;
7278 break ;
7379 case "add-message" :
7480 control = new osparc . conversation . AddMessage ( ) . set ( {
@@ -78,7 +84,7 @@ qx.Class.define("osparc.support.Conversation", {
7884 // make it more compact
7985 control . getChildControl ( "comment-field" ) . getChildControl ( "tabs" ) . getChildControl ( "bar" ) . exclude ( ) ;
8086 control . getChildControl ( "comment-field" ) . getChildControl ( "subtitle" ) . exclude ( ) ;
81- this . _add ( control ) ;
87+ this . _addAt ( control , 3 ) ;
8288 break ;
8389 }
8490 return control || this . base ( arguments , id ) ;
@@ -96,8 +102,15 @@ qx.Class.define("osparc.support.Conversation", {
96102 } ) ;
97103 } ,
98104
99- __applyConversationId : function ( value ) {
100- this . __reloadMessages ( true ) ;
105+ __applyConversationId : function ( conversationId ) {
106+ const supportSuggestion = this . getChildControl ( "support-suggestion" ) ;
107+ if ( conversationId ) {
108+ supportSuggestion . exclude ( ) ;
109+ this . __reloadMessages ( true ) ;
110+ } else {
111+ // new conversation, collect context data
112+ supportSuggestion . show ( ) ;
113+ }
101114 } ,
102115
103116 __getNextRequest : function ( ) {
0 commit comments