Skip to content

Commit 55dd2e8

Browse files
authored
fix: align message reactions vertically to the center of the message list (#3064)
1 parent 8d25ead commit 55dd2e8

3 files changed

Lines changed: 16 additions & 17 deletions

File tree

examples/vite/src/AppSettings/AppSettings.scss

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -379,18 +379,17 @@
379379
}
380380

381381
.app__settings-modal__body {
382-
grid-template-columns: 1fr;
382+
grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
383383
}
384384

385385
.app__settings-modal__tabs {
386-
border-right: 0;
387-
border-bottom: 1px solid var(--border-core-default);
388-
display: flex;
389-
gap: 8px;
390-
padding: 10px 12px;
391-
overflow-x: auto;
392-
overscroll-behavior: contain;
393-
overflow-y: hidden;
386+
border-right: 1px solid var(--border-core-default);
387+
border-bottom: 0;
388+
display: block;
389+
gap: 0;
390+
padding: 10px;
391+
overflow-y: auto;
392+
overflow-x: hidden;
394393
}
395394
}
396395
}

examples/vite/src/AppSettings/tabs/Reactions/ReactionsTab.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ export const ReactionsTab = () => {
8181
<div className='app__settings-modal__field-label'>Horizontal alignment</div>
8282
<div className='app__settings-modal__options-row'>
8383
<Button
84-
aria-pressed={!reactions.flipHorizontalPosition}
84+
aria-pressed={reactions.flipHorizontalPosition}
8585
className='app__settings-modal__option-button str-chat__button--outline str-chat__button--secondary str-chat__button--size-sm'
8686
onClick={() =>
8787
appSettingsStore.partialNext({
88-
reactions: { ...reactions, flipHorizontalPosition: false },
88+
reactions: { ...reactions, flipHorizontalPosition: true },
8989
})
9090
}
9191
>
9292
Align start
9393
</Button>
9494
<Button
95-
aria-pressed={reactions.flipHorizontalPosition}
95+
aria-pressed={!reactions.flipHorizontalPosition}
9696
className='app__settings-modal__option-button str-chat__button--outline str-chat__button--secondary str-chat__button--size-sm'
9797
onClick={() =>
9898
appSettingsStore.partialNext({
99-
reactions: { ...reactions, flipHorizontalPosition: true },
99+
reactions: { ...reactions, flipHorizontalPosition: false },
100100
})
101101
}
102102
>

src/components/Message/styling/Message.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@
296296

297297
.str-chat__message-inner {
298298
.str-chat__message-reactions-host {
299-
justify-self: flex-start;
299+
justify-self: flex-end;
300300

301301
&:has(.str-chat__message-reactions--flipped-horizontally) {
302-
justify-self: flex-end;
302+
justify-self: flex-start;
303303
}
304304

305305
&:has(.str-chat__message-reactions--top) {
@@ -343,10 +343,10 @@
343343

344344
.str-chat__message-inner {
345345
.str-chat__message-reactions-host {
346-
justify-self: flex-end;
346+
justify-self: flex-start;
347347

348348
&:has(.str-chat__message-reactions--flipped-horizontally) {
349-
justify-self: flex-start;
349+
justify-self: flex-end;
350350
}
351351

352352
&:has(.str-chat__message-reactions--top) {

0 commit comments

Comments
 (0)