-
Notifications
You must be signed in to change notification settings - Fork 988
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
mentions #10693
Conversation
Pull Request Checklist
|
Jenkins BuildsClick to see older builds (9)
|
issues
things missing
tested on iOS, |
This is used to quickly render the input field with the proper styling" | ||
[text users mention-regexp] | ||
(if mention-regexp | ||
(loop [[text mention & rest] (string/split text mention-regexp) |
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.
Why not just reduce
?
(def end-mention-regexp | ||
#"(@(?:(?:[A-Z][a-z]*(?:\s[A-Z]?[a-z]*)?(?:\s[A-Z]?[a-z]*)?)|(?:[a-zA-Z0-9\.]*))$)") | ||
|
||
(defn compute-all-text-parts |
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.
we need some tests for this function, it is huge and hard to reading
;; prepare regexp for currently mentioned users | ||
mention-regexp | ||
(when (seq mentioned) | ||
(re-pattern (str "(@" (string/replace |
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.
Can we extract magic values to vars?
fix #10509
current implementation looks good enough performance wise, can be further improved by using more local state as well as react on-key-press in most cases, only changing the "completion?" value instead of recomputing everything