Skip to content
Snippets Groups Projects
Commit 621478ae authored by Mark Jones's avatar Mark Jones
Browse files

Issue #3487723: Only show evaluation interactions once message is loaded.

parent ca6ce387
No related branches found
No related tags found
1 merge request!5Issue #3487723: Only show evaluation interactions once message is loaded.
......@@ -52,6 +52,7 @@ function ai_evaluations_preprocess_ai_chatbot_message(&$variables) {
'#theme' => 'image',
'#uri' => \Drupal::moduleHandler()->getModule('ai_evaluations')->getPath() . '/assets/dislike-button-icon.svg',
'#alt' => new TranslatableMarkup('Downvote'),
'#title' => new TranslatableMarkup('This was an unhelpful response'),
], Url::fromRoute('ai_evaluations.vote', [
'assistant_id' => $variables['assistant_id'] ?? NULL,
'thread_id' => $variables['thread_id'] ?? NULL,
......@@ -64,6 +65,7 @@ function ai_evaluations_preprocess_ai_chatbot_message(&$variables) {
'#theme' => 'image',
'#uri' => \Drupal::moduleHandler()->getModule('ai_evaluations')->getPath() . '/assets/like-button-icon.svg',
'#alt' => new TranslatableMarkup('Upvote'),
'#title' => new TranslatableMarkup('This was a helpful response'),
], Url::fromRoute('ai_evaluations.vote', [
'assistant_id' => $variables['assistant_id'] ?? NULL,
'thread_id' => $variables['thread_id'] ?? NULL,
......
.chat-message-evaluation {
display: none;
}
.chat-message--complete .chat-message-evaluation {
display: block;
}
.chat-message-evaluation {
text-align: right;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment