File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
src/components/structures Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ limitations under the License.
133133.mx_RoomDirectory_topic {
134134 cursor : initial ;
135135 color : $light-fg-color ;
136+ display : -webkit-box ;
137+ -webkit-box-orient : vertical ;
138+ -webkit-line-clamp : 3 ;
139+ overflow : hidden ;
136140}
137141
138142.mx_RoomDirectory_alias {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import GroupStore from "../../stores/GroupStore";
3535import FlairStore from "../../stores/FlairStore" ;
3636
3737const MAX_NAME_LENGTH = 80 ;
38- const MAX_TOPIC_LENGTH = 160 ;
38+ const MAX_TOPIC_LENGTH = 800 ;
3939
4040function track ( action ) {
4141 Analytics . trackEvent ( 'RoomDirectory' , action ) ;
@@ -497,6 +497,9 @@ export default class RoomDirectory extends React.Component {
497497 }
498498
499499 let topic = room . topic || '' ;
500+ // Additional truncation based on line numbers is done via CSS,
501+ // but to ensure that the DOM is not polluted with a huge string
502+ // we give it a hard limit before rendering.
500503 if ( topic . length > MAX_TOPIC_LENGTH ) {
501504 topic = `${ topic . substring ( 0 , MAX_TOPIC_LENGTH ) } ...` ;
502505 }
You can’t perform that action at this time.
0 commit comments