-
-
Notifications
You must be signed in to change notification settings - Fork 828
Room notifs in autocomplete & composer #1577
Conversation
import {PillCompletion} from './Components'; | ||
import sdk from '../index'; | ||
|
||
const AT_ROOM_REGEX = /@\S*/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this means that users starting with the first part (of any length) of @room
will be slightly more difficult to mention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but not sure what we can do about this short of changing it to *room or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well we could make it /@room/
, mandating an entire match, so you'd have to type the whole shebang and then press tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would still cause problems for people like late-noughties hitmakers @room5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough!
@@ -58,6 +58,9 @@ const TYPING_USER_TIMEOUT = 10000, TYPING_SERVER_TIMEOUT = 30000; | |||
|
|||
const ZWS_CODE = 8203; | |||
const ZWS = String.fromCharCode(ZWS_CODE); // zero width space | |||
|
|||
const ATROOMPILL_ENTITY_TYPE = 'ATROOMPILL'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
const ENTITY_TYPES = {
AT_ROOM_PILL: 'AT_ROOM_PILL'
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
A picture paints a thousand words...
We should probably remove the max-width here?
Requires element-hq/element-web#5531