-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from GetStream/channel-list-and-preview
Channel list and preview
- Loading branch information
Showing
22 changed files
with
5,199 additions
and
4,948 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
7 changes: 6 additions & 1 deletion
7
.github/workflows/release.yml → .github/workflows/workflow.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
const postcssLogical = require('postcss-logical'); | ||
const postcssDirPseudoClass = require('postcss-dir-pseudo-class'); | ||
const postcssFlexGapPolyfill = require('flex-gap-polyfill'); | ||
|
||
module.exports = { | ||
syntax: 'postcss-scss', | ||
plugins: [postcssLogical({ preserve: true }), postcssDirPseudoClass(), postcssFlexGapPolyfill()], | ||
plugins: [postcssLogical({ preserve: true }), postcssDirPseudoClass()], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,42 @@ | ||
.str-chat-channel-list { | ||
.str-chat__channel-list { | ||
height: 100%; | ||
overflow-y: auto; | ||
|
||
.str-chat__channel-list-messenger { | ||
height: 100%; | ||
|
||
.str-chat__channel-list-messenger__main { | ||
height: 100%; | ||
|
||
.str-chat__channel-list-empty { | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
padding: var(--str-chat__spacing-4); | ||
|
||
svg { | ||
width: calc(var(--str-chat__spacing-px) * 136); | ||
height: calc(var(--str-chat__spacing-px) * 136); | ||
} | ||
} | ||
|
||
// Empty channel list for theme-v1 | ||
.str-chat__channel-list-empty-v1 { | ||
display: none; | ||
} | ||
} | ||
} | ||
|
||
.str-chat__load-more-button { | ||
display: flex; | ||
justify-content: center; | ||
margin: var(--str-chat__spacing-2) 0; | ||
} | ||
|
||
// This is displayed only in theme-v1 | ||
.str-chat__down-main { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,90 @@ | ||
@use '../utils'; | ||
|
||
@mixin channel-preview-layout { | ||
// & selector is required for the postcss-logical plugin to properly transform the logical properties | ||
/* stylelint-disable-next-line scss/selector-no-redundant-nesting-selector */ | ||
& { | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-start; | ||
width: 100%; | ||
padding: var(--str-chat__spacing-3) var(--str-chat__spacing-2); | ||
margin: 0; | ||
text-align: start; | ||
|
||
:not(:last-child) { | ||
margin-inline-end: var(--str-chat__spacing-2); | ||
} | ||
} | ||
} | ||
|
||
@mixin channel-preview-end-layout { | ||
// & selector is required for the postcss-logical plugin to properly transform the logical properties | ||
/* stylelint-disable-next-line scss/selector-no-redundant-nesting-selector */ | ||
& { | ||
display: flex; | ||
flex-direction: column; | ||
width: 100%; | ||
|
||
:not(:last-child) { | ||
margin-block-end: var(--str-chat__spacing-0_5); | ||
} | ||
} | ||
} | ||
|
||
// Unread badge will be bigger than channel name -> this would cause a layout shift when the unread badge appears -> this trick won't let the unread badge to increase the height of the container avoiding the layout shift | ||
@mixin unread-badge-layout-fix { | ||
overflow-y: visible; | ||
|
||
.str-chat__channel-preview-end-first-row { | ||
overflow-y: visible; | ||
height: var(--channel-name-height); | ||
} | ||
} | ||
|
||
.str-chat__channel-preview { | ||
display: flex; | ||
column-gap: var(--str-chat__spacing-2); | ||
align-items: center; | ||
justify-content: flex-start; | ||
width: 100%; | ||
@include channel-preview-layout; | ||
cursor: pointer; | ||
padding: var(--str-chat__spacing-2); | ||
text-align: start; | ||
|
||
.str-chat__channel-preview-end { | ||
overflow: hidden; // need this for ellipsis text to work | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--str-chat__spacing-0_5); | ||
@include channel-preview-end-layout; | ||
@include unread-badge-layout-fix; | ||
overflow-x: hidden; // need this for ellipsis text to work | ||
|
||
.str-chat__channel-preview-end-first-row { | ||
display: flex; | ||
align-items: center; | ||
|
||
.str-chat__channel-preview-unread-badge { | ||
padding: var(--str-chat__spacing-2); | ||
} | ||
|
||
.str-chat__channel-preview-messenger--name { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.str-chat__channel-preview-messenger--name, | ||
.str-chat__channel-preview-messenger--last-message { | ||
@include utils.ellipsis-text; | ||
} | ||
} | ||
} | ||
|
||
.str-chat__channel-preview-loading { | ||
@include channel-preview-layout; | ||
|
||
.str-chat__channel-preview-end-loading { | ||
@include channel-preview-end-layout; | ||
} | ||
|
||
.str-chat__loading-channels-username { | ||
height: calc(var(--str-chat__spacing-px) * 16); | ||
width: calc(var(--str-chat__spacing-px) * 66); | ||
} | ||
|
||
.str-chat__loading-channels-status { | ||
height: calc(var(--str-chat__spacing-px) * 16); | ||
width: 100%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.str-chat { | ||
box-sizing: border-box; | ||
|
||
* { | ||
box-sizing: border-box; | ||
} | ||
} |
Oops, something went wrong.