Improve timeline scroll, media layout, avatars, and emoji coverage.
Remember room scroll position across switches, reserve image/video heights from Matrix dimensions, cache authenticated media blobs for avatars, restore jumbo emoji-only messages, and extend emoji font unicode-range for Unicode 15 glyphs.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createVar, keyframes, style, styleVariants } from '@vanilla-extract/css';
|
||||
import { createVar, globalStyle, keyframes, style, styleVariants } from '@vanilla-extract/css';
|
||||
import * as htmlCss from '../../../styles/CustomHtml.css';
|
||||
import { recipe, RecipeVariants } from '@vanilla-extract/recipes';
|
||||
import { DefaultReset, color, config, toRem } from 'folds';
|
||||
|
||||
@@ -117,6 +118,7 @@ export const MessageBase = recipe({
|
||||
collapse: {
|
||||
true: {
|
||||
marginTop: 0,
|
||||
paddingTop: config.space.S0,
|
||||
},
|
||||
},
|
||||
autoCollapse: {
|
||||
@@ -209,6 +211,8 @@ export const UsernameBold = style({
|
||||
fontWeight: 550,
|
||||
});
|
||||
|
||||
const jumboEmojiSize = toRem(70);
|
||||
|
||||
export const MessageTextBody = recipe({
|
||||
base: {
|
||||
wordBreak: 'break-word',
|
||||
@@ -226,8 +230,9 @@ export const MessageTextBody = recipe({
|
||||
},
|
||||
jumboEmoji: {
|
||||
true: {
|
||||
fontSize: '1.504em',
|
||||
lineHeight: '1.4962em',
|
||||
lineHeight: 1,
|
||||
overflow: 'visible',
|
||||
overflowY: 'visible',
|
||||
},
|
||||
},
|
||||
emote: {
|
||||
@@ -240,3 +245,29 @@ export const MessageTextBody = recipe({
|
||||
});
|
||||
|
||||
export type MessageTextBodyVariants = RecipeVariants<typeof MessageTextBody>;
|
||||
|
||||
const jumboEmojiClass = MessageTextBody.classNames.variants.jumboEmoji.true;
|
||||
|
||||
globalStyle(`${jumboEmojiClass} .${htmlCss.EmoticonBase}`, {
|
||||
height: jumboEmojiSize,
|
||||
padding: 0,
|
||||
overflow: 'visible',
|
||||
verticalAlign: 'middle',
|
||||
});
|
||||
|
||||
globalStyle(`${jumboEmojiClass} .${htmlCss.Emoticon.classNames.base}`, {
|
||||
fontSize: jumboEmojiSize,
|
||||
height: jumboEmojiSize,
|
||||
minWidth: jumboEmojiSize,
|
||||
lineHeight: 1,
|
||||
position: 'static',
|
||||
top: 0,
|
||||
overflow: 'visible',
|
||||
});
|
||||
|
||||
globalStyle(`${jumboEmojiClass} .${htmlCss.EmoticonImg}`, {
|
||||
height: jumboEmojiSize,
|
||||
width: jumboEmojiSize,
|
||||
maxHeight: 'none',
|
||||
objectFit: 'contain',
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user