Skip to content

Commit

Permalink
Add an icon for the chat panel
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed May 29, 2023
1 parent 4d038f1 commit 3433c48
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 1 deletion.
10 changes: 10 additions & 0 deletions packages/chat/src/chatpanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ import { ITranslator } from '@jupyterlab/translation';
import { LabIcon, SidePanel, caretRightIcon } from '@jupyterlab/ui-components';
import { Panel, Widget } from '@lumino/widgets';

import chatSvgstr from '../style/icons/chat.svg';

/**
* The icon for the chat panel.
*/
export const chatIcon = new LabIcon({
name: 'collaboration:chat',
svgstr: chatSvgstr
});

/**
* The chat panel widget.
*/
Expand Down
9 changes: 9 additions & 0 deletions packages/chat/src/svg.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

declare module '*.svg' {
const value: string; // @ts-ignore
export default value;
}
2 changes: 2 additions & 0 deletions packages/chat/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
border: solid 1px;
min-height: 1em;
padding: 3px;
margin-left: 3px;
border-radius: 5px;
}

/* .jp-ChatPanel-promptPlaceholder:empty:not(:focus):before {
Expand Down
20 changes: 20 additions & 0 deletions packages/chat/style/icons/chat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion packages/collaboration-extension/src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { DOMUtils } from '@jupyterlab/apputils';
import { ITranslator, nullTranslator } from '@jupyterlab/translation';

import { ChatPanel } from '@jupyter/chat';
import { chatIcon, ChatPanel } from '@jupyter/chat';

/**
* The default collaborative chat panel.
Expand All @@ -34,6 +34,7 @@ export const chat: JupyterFrontEndPlugin<void> = {
const panel = new ChatPanel({ translator, currentUser: user });
panel.id = DOMUtils.createDomID();
panel.title.caption = trans.__('Collaboration');
panel.title.icon = chatIcon;
app.shell.add(panel, 'right', { rank: 300 });

restorer.add(panel, 'chat-panel');
Expand Down

0 comments on commit 3433c48

Please sign in to comment.