UX: Topic summary UI improvements due to DMenu changes (#772)

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
This commit is contained in:
Keegan George 2024-08-26 08:32:39 -07:00 committed by GitHub
parent f148452f4c
commit 50c2d56aff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 170 additions and 174 deletions

View File

@ -177,7 +177,7 @@ export default class AiSummaryBox extends Component {
> >
<DMenu <DMenu
@onShow={{this.generateSummary}} @onShow={{this.generateSummary}}
@arrow={{true}} @arrow={{false}}
@identifier="topic-map__ai-summary" @identifier="topic-map__ai-summary"
@onRegisterApi={{this.onRegisterApi}} @onRegisterApi={{this.onRegisterApi}}
@interactive={{true}} @interactive={{true}}

View File

@ -39,8 +39,6 @@
} }
.topic-map__ai-summary-content { .topic-map__ai-summary-content {
.fk-d-menu__inner-content,
.d-modal__body {
.ai-summary-container { .ai-summary-container {
width: 100%; width: 100%;
} }
@ -144,8 +142,7 @@
opacity: 1; opacity: 1;
} }
&.show { &.show {
animation: appear 0.5s cubic-bezier(0.445, 0.05, 0.55, 0.95) 0s animation: appear 0.5s cubic-bezier(0.445, 0.05, 0.55, 0.95) 0s forwards;
forwards;
@media (prefers-reduced-motion) { @media (prefers-reduced-motion) {
animation-duration: 0s; animation-duration: 0s;
} }
@ -189,11 +186,15 @@
width: 100%; width: 100%;
} }
.generated-summary p {
margin: 0;
}
.summarized-on p { .summarized-on p {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
gap: 4px; gap: 0.25em;
margin-bottom: 0; margin-bottom: 0;
} }
@ -208,7 +209,6 @@
color: var(--primary-medium); color: var(--primary-medium);
} }
} }
}
} }
@keyframes ai-summary__indicator-wave { @keyframes ai-summary__indicator-wave {

View File

@ -9,14 +9,9 @@
max-width: 470px !important; //overruling JS max-width: 470px !important; //overruling JS
max-height: calc(100vh - var(--header-offset) - 3rem); max-height: calc(100vh - var(--header-offset) - 3rem);
&__inner-content {
max-height: unset;
padding: 0;
}
.ai-summary__header, .ai-summary__header,
.ai-summary-box { .ai-summary-box {
padding-inline: 1.5rem; padding: 0.75em 1rem;
box-sizing: border-box; box-sizing: border-box;
} }
@ -36,9 +31,6 @@
margin: 0; margin: 0;
} }
} }
&-box {
padding-block: 1rem;
}
} }
} }
} }

View File

@ -0,0 +1,3 @@
.ai-summary-box {
padding: 0.75em 1rem;
}

View File

@ -16,6 +16,7 @@ enabled_site_setting :discourse_ai_enabled
register_asset "stylesheets/modules/ai-helper/common/ai-helper.scss" register_asset "stylesheets/modules/ai-helper/common/ai-helper.scss"
register_asset "stylesheets/modules/ai-helper/mobile/ai-helper.scss", :mobile register_asset "stylesheets/modules/ai-helper/mobile/ai-helper.scss", :mobile
register_asset "stylesheets/modules/summarization/mobile/ai-summary.scss", :mobile
register_asset "stylesheets/modules/summarization/common/ai-summary.scss" register_asset "stylesheets/modules/summarization/common/ai-summary.scss"
register_asset "stylesheets/modules/summarization/desktop/ai-summary.scss", :desktop register_asset "stylesheets/modules/summarization/desktop/ai-summary.scss", :desktop