Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room notifs in autocomplete & composer #1577

Merged
merged 6 commits into from Nov 7, 2017

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Nov 6, 2017

A picture paints a thousand words...

screen shot 2017-11-06 at 15 14 01

We should probably remove the max-width here?

Requires element-hq/element-web#5531

import {PillCompletion} from './Components';
import sdk from '../index';

const AT_ROOM_REGEX = /@\S*/g;
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

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';
Copy link
Contributor

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' 
};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lukebarnard1 lukebarnard1 assigned dbkr and unassigned lukebarnard1 Nov 6, 2017
@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Nov 6, 2017
@lukebarnard1 lukebarnard1 merged commit 47bf991 into develop Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants