forked from github/cinny
* Now adapting to small screen sizes, needs improvements * Fix that site only gets into mobile mode when resized * - Added navigation event triggered if user requests to return to navigation on compact screens - People drawer wont be shown on compact screens - Still accessible using settings - would be duplicated UI - mobileSize is now compactSize * Put threshold for collapsing the base UI in a shared file * Switch to a more simple solution using CSS media queries over JS - Move back button to the left a bit so it doesnt get in touch with room icon * switch from component-individual-thresholds to device-type thresholds - <750px: Mobile - <900px: Tablet - >900px: Desktop * Make Settings drawer component collapse on mobile * Fix EmojiBoard not showing up and messing up UI when screen is smaller than 360px * Improve code quality; allow passing classNames to IconButton - remove unnessesary div wrappers - use dir.side where appropriate - rename threshold and its mixins to more descriptive names - Rename "OPEN_NAVIGATION" to "NAVIGATION_OPENED" * - follow BEM methology - remove ROOM_SELECTED listener - rename NAVIGATION_OPENED to OPEN_NAVIGATION where appropriate - this does NOT changes that ref should be used for changing visability * Use ref to change visability to avoid re-rendering * Use ref to change visability to avoid re-rendering * Fix that room component is not hidden by default. This resulted in a broken view when application is viewed in mobile size without having selected a room since loading. * fix: leaving a room should bring one back to navigation Co-authored-by: Ajay Bura <32841439+ajbura@users.noreply.github.com>
133 lines
2.9 KiB
SCSS
133 lines
2.9 KiB
SCSS
@use '../../partials/flex';
|
|
@use '../../partials/text';
|
|
@use '../../partials/dir';
|
|
|
|
.emoji-board {
|
|
--emoji-board-height: 390px;
|
|
--emoji-board-width: 286px;
|
|
display: flex;
|
|
max-width: 90vw;
|
|
max-height: 90vh;
|
|
|
|
&__content {
|
|
@extend .cp-fx__item-one;
|
|
@extend .cp-fx__column;
|
|
height: var(--emoji-board-height);
|
|
width: var(--emoji-board-width);
|
|
}
|
|
& > .scrollbar {
|
|
width: initial;
|
|
height: var(--emoji-board-height);
|
|
}
|
|
&__nav {
|
|
@extend .cp-fx__column;
|
|
justify-content: center;
|
|
|
|
min-height: 100%;
|
|
padding: 4px 6px;
|
|
background-color: var(--bg-surface-low);
|
|
@include dir.side(border, 1px solid var(--bg-surface-border), none);
|
|
|
|
position: relative;
|
|
|
|
& .ic-btn-surface {
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
&__nav-custom,
|
|
&__nav-twemoji {
|
|
@extend .cp-fx__column;
|
|
}
|
|
&__nav-twemoji {
|
|
background: inherit;
|
|
position: sticky;
|
|
bottom: -70%;
|
|
z-index: 999;
|
|
}
|
|
}
|
|
|
|
.emoji-board__content__search {
|
|
padding: var(--sp-extra-tight);
|
|
position: relative;
|
|
|
|
& .ic-raw {
|
|
position: absolute;
|
|
@include dir.prop(left, var(--sp-normal), unset);
|
|
@include dir.prop(right, unset, var(--sp-normal));
|
|
top: var(--sp-normal);
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
& .input-container {
|
|
& .input {
|
|
min-width: 100%;
|
|
width: 0;
|
|
padding: var(--sp-extra-tight) 36px;
|
|
border-radius: calc(var(--bo-radius) / 2);
|
|
}
|
|
}
|
|
}
|
|
.emoji-board__content__emojis {
|
|
@extend .cp-fx__item-one;
|
|
@extend .cp-fx__column;
|
|
}
|
|
.emoji-board__content__info {
|
|
margin: 0 var(--sp-extra-tight);
|
|
padding: var(--sp-tight) var(--sp-extra-tight);
|
|
border-top: 1px solid var(--bg-surface-border);
|
|
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
& > div:first-child {
|
|
line-height: 0;
|
|
.emoji {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
}
|
|
& > p:last-child {
|
|
@extend .cp-fx__item-one;
|
|
@extend .cp-txt__ellipsis;
|
|
margin: 0 var(--sp-tight);
|
|
}
|
|
}
|
|
|
|
.emoji-row {
|
|
display: flex;
|
|
}
|
|
|
|
.emoji-group {
|
|
--emoji-padding: 6px;
|
|
position: relative;
|
|
margin-bottom: var(--sp-normal);
|
|
|
|
&__header {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 99;
|
|
background-color: var(--bg-surface);
|
|
|
|
@include dir.side(margin, var(--sp-extra-tight), 0);
|
|
padding: var(--sp-extra-tight) var(--sp-ultra-tight);
|
|
text-transform: uppercase;
|
|
box-shadow: 0 -4px 0 0 var(--bg-surface);
|
|
border-bottom: 1px solid var(--bg-surface-border);
|
|
}
|
|
& .emoji-set {
|
|
--left-margin: calc(var(--sp-normal) - var(--emoji-padding));
|
|
--right-margin: calc(var(--sp-extra-tight) - var(--emoji-padding));
|
|
margin: var(--sp-extra-tight);
|
|
@include dir.side(margin, var(--left-margin), var(--right-margin));
|
|
}
|
|
& .emoji {
|
|
width: 38px;
|
|
height: 38px;
|
|
padding: var(--emoji-padding);
|
|
cursor: pointer;
|
|
&:hover {
|
|
background-color: var(--bg-surface-hover);
|
|
border-radius: var(--bo-radius);
|
|
}
|
|
}
|
|
} |