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

Apply 'user-mention-me' styles to self mentions span. #938

Merged
merged 4 commits into from Aug 5, 2017

Conversation

jainkuniya
Copy link
Member

screen shot 2017-07-27 at 11 34 26 am

Copy link
Contributor

@borisyankov borisyankov left a comment

Choose a reason for hiding this comment

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

Very likely can be implemented in a simpler way.

props: {
style?: StyleObj,
actions?: Actions,
cascadingStyle?: StyleObj,
attribs?: Object,
ownEmail: string,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is conceptually incorrect.
Our HtmlTagSpan should be aware only of general 'span' related stuff.
If we can not implement the styling by only generic code, we need to create a 'SpanMention' or something similar.

Copy link
Member Author

Choose a reason for hiding this comment

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

Created new Component HtmlTagSpanMention .


mentionButtonRefersToSelf = () => {
const { attribs, ownEmail } = this.props;
return attribs && attribs.class === 'user-mention' && attribs['data-user-email'] === ownEmail;
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering that the mention-self span already have a class called 'user-mention-me', this is likely too much complication.

@jainkuniya
Copy link
Member Author

Updated

@borisyankov
Copy link
Contributor

Looks good to merge.

@borisyankov borisyankov merged commit ad7e2b1 into zulip:master Aug 5, 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

3 participants