From 94b924354eedfa0e1f3d35d0c22a18f06a9e9572 Mon Sep 17 00:00:00 2001 From: "Shibani Basava (from Dev Box)" Date: Sat, 18 Nov 2023 01:02:08 +0000 Subject: [PATCH] chore: cleanup tabs and teaser list --- .../src/components/chat-component.ts | 30 ++++++------ .../src/components/teaser-list-component.ts | 37 +++++++++------ .../src/styles/chat-component.ts | 46 ++----------------- .../src/styles/teaser-list-component.ts | 7 ++- 4 files changed, 48 insertions(+), 72 deletions(-) diff --git a/packages/chat-component/src/components/chat-component.ts b/packages/chat-component/src/components/chat-component.ts index e54b1c47..ebfc03c4 100644 --- a/packages/chat-component/src/components/chat-component.ts +++ b/packages/chat-component/src/components/chat-component.ts @@ -463,12 +463,13 @@ export class ChatComponent extends LitElement { ${this.isDefaultPromptsEnabled ? html` ` : ''} @@ -547,21 +548,18 @@ export class ChatComponent extends LitElement { ] as TabContent[]}" .selectedTabId="${this.selectedAsideTab}" > -
-

${globalConfig.THOUGHT_PROCESS_LABEL}

-
- ${this.chatThoughts - ? html`

${unsafeHTML(this.chatThoughts)}

` - : ''} -
+
+ ${this.chatThoughts + ? html`

${unsafeHTML(this.chatThoughts)}

` + : ''}
-
-

${globalConfig.SUPPORT_CONTEXT_LABEL}

-
    - ${this.chatDataPoints?.map( - (dataPoint) => html`
  • ${dataPoint}
  • `, - )} -
+
+
+ ${teaser.description} + ${this.actionLabel} + + `; + } override render() { return html`
-

${this.title}

-
    + ${this.heading ? html`

    ${this.heading}

    ` : ''} +
      ${this.teasers.map( (teaser) => html`
    • - - ${teaser.description} - ${this.label} - + ${this.clickable ? this.renderClickableTeaser(teaser) : teaser.description}
    • `, )} diff --git a/packages/chat-component/src/styles/chat-component.ts b/packages/chat-component/src/styles/chat-component.ts index a5f85ff5..28b0f577 100644 --- a/packages/chat-component/src/styles/chat-component.ts +++ b/packages/chat-component/src/styles/chat-component.ts @@ -103,10 +103,6 @@ export const chatStyle = css` padding: 0; margin: 0; } - .subheadline--small { - font-size: 12px; - display: inline-block; - } .chat__container { min-width: 100%; transition: width 0.3s ease-in-out; @@ -254,48 +250,14 @@ export const chatStyle = css` display: flex; justify-content: end; } + .tab-component__content { + padding: 20px 20px 20px 0px; + } .tab-component__paragraph { font-family: monospace; font-size: large; border: 1px solid var(--light-gray); - padding: 20px; border-radius: 25px; - } - .defaults__list { - list-style-type: none; - padding: 0; - text-align: center; - display: flex; - flex-direction: column; - justify-content: center; - } - .defaults__list.always-row { - text-align: left; - } - .defaults__list:not(.always-row) { - @media (min-width: 1024px) { - flex-direction: row; - } - } - .defaults__listItem { - padding: 10px; - border-radius: 10px; - background: var(--white); - margin: 4px; - color: var(--text-color); - justify-content: space-evenly; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); - border: 3px solid transparent; - - @media (min-width: 768px) { - min-height: 100px; - } - } - .defaults__listItem:hover, - .defaults__listItem:focus { - color: var(--accent-dark); - background: var(--secondary-color); - transition: all 0.3s ease-in-out; - border-color: var(--accent-high); + padding: 20px; } `; diff --git a/packages/chat-component/src/styles/teaser-list-component.ts b/packages/chat-component/src/styles/teaser-list-component.ts index c085bfc2..4a2be620 100644 --- a/packages/chat-component/src/styles/teaser-list-component.ts +++ b/packages/chat-component/src/styles/teaser-list-component.ts @@ -25,6 +25,11 @@ export const styles = css` display: flex; flex-direction: column; justify-content: center; + } + .teaser-list.always-row { + text-align: left; + } + .teaser-list:not(.always-row) { @media (min-width: 1024px) { flex-direction: row; } @@ -50,7 +55,7 @@ export const styles = css` transition: all 0.3s ease-in-out; border-color: var(--accent-high); } - .teaser-list-item span { + .teaser-list-item .teaser-click-label { color: var(--accent-high); font-weight: bold; display: block;