Skip to content

Commit

Permalink
Improve responsiveness of channel name and topic.
Browse files Browse the repository at this point in the history
This commit makes two changes:

1. Long channel names are truncated.
2. Topics cannot be shrinked into non-existence.
  • Loading branch information
itsjohncs committed Oct 29, 2021
1 parent 6aeee06 commit 8c34672
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 5 additions & 1 deletion client/components/Chat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
<span type="button" aria-label="Save topic"></span>
</span>
</div>
<span v-else :title="channel.topic" class="topic" @dblclick="editTopic"
<span
v-else
:title="channel.topic"
:class="{topic: true, empty: !channel.topic}"
@dblclick="editTopic"
><ParsedMessage
v-if="channel.topic"
:network="network"
Expand Down
11 changes: 10 additions & 1 deletion client/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,10 @@ textarea.input {
.header .title {
font-size: 15px;
padding-left: 6px;
flex-shrink: 0;
flex-shrink: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.topic-container {
Expand All @@ -1068,6 +1071,12 @@ textarea.input {
flex-grow: 1;
overflow: hidden;
font-size: 14px;
flex-shrink: 99999999;
min-width: 25px;
}

.header .topic.empty {
min-width: 0;
}

.header .topic-input {
Expand Down

0 comments on commit 8c34672

Please sign in to comment.