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

feat(ai): Improve styling of the chat widget #14278

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

planger
Copy link
Contributor

@planger planger commented Oct 9, 2024

What it does

  • General improvements of margins and paddings
  • Give code a nicer border and more space
  • Replace aggressive buttons for code parts with more subtle icons
  • Format tool call result more nicely

Contributed on behalf of STMicroelectronics

image

How to test

Use the chat view and let an LLM generate some code, bullet list (ordered, unordered), use tool functions and check if all looks better than before.

Follow-ups

The code content part renderer could still be improved:

  • Mouse wheel scroll above a code part doesn't scroll the chat view
  • Sometimes the code is cut, this might be because of code line breaks, which we should avoid and show a horizontal scroll bar instead
  • Test with a few color themes too

Review checklist

Reminder for reviewers

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works for me

@@ -128,7 +128,7 @@ const CopyToClipboardButton = (props: { code: string, clipboardService: Clipboar
const copyCodeToClipboard = React.useCallback(() => {
clipboardService.writeText(code);
}, [code, clipboardService]);
return <button className='theia-button main' onClick={copyCodeToClipboard}>Copy</button>;
return <div className='button codicon codicon-copy' title='Copy' onClick={copyCodeToClipboard}></div>;
Copy link
Member

Choose a reason for hiding this comment

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

we should add role='button' for accessibility reasons

@@ -150,7 +150,7 @@ const InsertCodeAtCursorButton = (props: { code: string, editorManager: EditorMa
}]);
}
}, [code, editorManager]);
return <button className='theia-button main' onClick={insertCode}>Insert at Cursor</button>;
return <div className='button codicon codicon-insert' title='Insert at Cursor' onClick={insertCode}></div>;
Copy link
Member

Choose a reason for hiding this comment

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

same here

@planger planger added this to the 1.55.0 milestone Oct 10, 2024
* General improvements of margins and paddings
* Give code a nicer border and more space
* Replace aggressive buttons for code parts with more subtle icons
* Format tool call result more nicely

Contributed on behalf of STMicroelectronics
@planger planger force-pushed the ai-improve-chat-styling branch from d810384 to f2b2e61 Compare October 10, 2024 13:56
@planger planger merged commit c7fb4f5 into eclipse-theia:master Oct 10, 2024
10 of 11 checks passed
@planger planger deleted the ai-improve-chat-styling branch October 10, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants