Commit Graph

47 Commits

Author SHA1 Message Date
5b590b9637 REFACTOR: Replace some fa-* uses with helpers 2017-07-27 14:55:41 -04:00
74858fd450 FIX: Don't show emoji selector when ending a line with a colon 2017-06-13 14:25:31 -04:00
13f89a53a3 FIX: Autocomplete wasn't showing up for PM user selection 2017-06-13 13:23:27 -04:00
ab8a1a377c fixes eslint errors 2017-06-05 15:50:15 +02:00
64336a8c75 Emoji 5.0 support 2017-06-05 14:06:23 +02:00
6a7773b681 FIX: Category autocomplete breaks when search menu widget rerenders.
https://github.com/discourse/discourse/pull/4717#issuecomment-284914585
2017-03-08 20:13:48 +08:00
60b7453f3f FIX: Do not trigger fullpage search when selecting autocomplete term with enter. 2017-03-07 11:56:40 +08:00
59922a7899 Extract autocomplete initialization to a function
Create a REGEXP_TAGS_REPLACE regex to remove a chained .replace call

Fix autocomplete positioning
2017-02-27 07:48:14 -05:00
38d7234018 FEATURE: Autocomplete support on advanced search 2017-02-22 08:42:16 -05:00
af90a04bd9 FIX: All clicks should close autocomplete. 2016-10-13 13:28:24 +08:00
4b71fd253b Advanced Search UI
Properly support Categories so it updates the search box correctly

Use category id, as it is more consistent with search results than using the slugs, especially for parent/subcategory

Added Status

Improve AutoComplete so it can receive updates
Added the ability for AutoComplete to receive updates to badge-selector and group-selector

Respect null, which is set via web-hooks

Support both # and category: for category detection.

Only update the searchedTerms if they differ from its current value (this helps the Category Selector receive updates)

Opt in receive updates (#3)

* Make the selectors opt-in for receiving updates

* Opt-in to receive updates

* Fix category detection for search-advanced-options

Fix eslint error

Update user-selector so it can receive updates live too
Make the canReceiveUpdates check validate against 'true'

Converted to use template literals

Refactor the regex involved with this feature
Split apart the init to make it a bit more manageable/testable

Switch the category selector to category-chooser, so it is a dropdown of categories instead of auto-complete

Reduce RegEx to make this happier with unicode languages and reduce some of the complexity
2016-10-04 11:18:01 -04:00
5d2aa957b4 UX: Take into account of header when rendering autocomplete. 2016-09-22 13:42:49 +08:00
a546395397 REFACTOR: Migrate markdown functionality in ES6 2016-07-11 12:57:05 -04:00
41842460b4 UX: Collapse users when composing a private message. 2016-06-29 10:40:38 +08:00
2db42e970d FIX: Autocomplete retriggering when term is blank on keyup. 2016-04-16 23:53:24 +08:00
08e43588f6 FIX: Autocomplete wasn't properly updating d-editor 2016-03-01 15:17:17 -05:00
Sam
bc61cfcad4 correct autocomplete edge case on android
@ backspace @ was not opening an autocomplete
2016-02-24 15:20:12 +11:00
27052717a4 Merge branch 'master' into vdom 2016-02-23 17:23:05 +11:00
d59c9badbe correct build 2016-02-23 17:22:41 +11:00
10aa1923a4 Merge branch 'master' into vdom
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-02-23 17:07:01 +11:00
32d3dd22a0 FIX: broken autocomplete on Android
Android Chrome does not support keypress event, instead use keyup
2016-02-23 17:06:15 +11:00
d0a86f8032 Merge branch 'master' into vdom 2016-02-23 15:58:46 +11:00
6d22354ac3 FIX: cleaner error handling for multiple autocomplete matchers 2016-02-23 15:48:39 +11:00
849c99f83d Remove Discourse.Mobile constants 2016-02-18 12:19:00 -05:00
c7186b1403 FIX: Close autocomplete is term is blank. 2016-02-10 19:50:58 +08:00
b9e8732018 UX: tweak autocomplete to limit hijacking
- Stop eating up back arrow when you hit @
- Clicking anywhere closes autocomplete
- Forward arrow no longer issues autocompletion, instead functions as right arrow
2016-02-08 10:51:59 +11:00
726d81f83b FIX: Don't update autocomplete when removing the key. 2016-02-05 16:47:47 +08:00
fa794ef59d FIX: Deleting characters on category hashtag was not triggering autocomplete. 2016-01-20 17:18:04 +08:00
c1dbf5c1c4 FEATURE: Autolinking to category using hashtags. 2016-01-05 00:12:24 +08:00
8dbf1e457b FIX: Allow '/' to trigger autocomplete. 2015-12-07 20:22:14 +08:00
f835a0ba22 UX: Trigger autocompleter only for specific characters. 2015-11-23 16:33:47 +08:00
8e8e787ad0 FIX: Whitelist parentheses and brackets in autocomplete. 2015-10-16 13:17:51 +08:00
8b59f76f59 FIX: Don't append when there is nothing to append. 2015-10-03 17:22:13 +08:00
e3a80936c8 prefer empty href attribute to # 2015-09-08 18:27:20 +02:00
a77d5d0cef UX: Make autocomplete usable on mobile. 2015-09-03 17:10:08 +08:00
f3e3cbe3b2 FIX: Trigger autocomplete when bounded by non-word characters. 2015-08-26 16:02:42 +08:00
b0541500b4 FIX: eslint deprecations 2015-08-13 15:14:08 -04:00
da9e2792eb FIX: Bugs with autocomplete
It wasn't tearing itself down properly. It was swallowing events.
2015-04-06 14:04:42 -04:00
cf3582bedb FIX: JSHint wasn't validating ES6 files, this fixes a bunch of errors. 2015-02-10 17:21:16 -05:00
Sam
9d43e0ae0c FIX: regression, ESC is not captured correctly 2014-11-01 18:31:16 +11:00
Sam
b4c29a9f3b FIX: regression in autocomplete 2014-10-14 18:22:44 +11:00
f3337ab551 reduce number of times caretPosition() is called 2014-10-15 08:50:47 +02:00
97b60e6422 Fix buggy autocomplete behaviour for non-US keyboards
This change moves the code for actually entering data from the keydown handler to the
keypress handler, which can reliably catch the character entered (rather than
the key pressed).

This is my second attempt at
https://meta.discourse.org/t/typing-shows-on-non-us-keyboard-layouts/20449
without doing dangerous refactoring.

This does not fix the issue reported in
https://meta.discourse.org/t/overly-aggresive-emoji-autocomplete/20691/7
as that is a different bug.
2014-10-11 17:55:48 +02:00
Sam
168c690427 FIX: handle paste events for auto completed fields 2014-10-08 11:59:46 +11:00
ad5e4f98d9 Revert "Merge pull request #2833 from mamhoff/new-bugfix-autocomplete"
This reverts commit 2450d284c50437d7a953488ff40bb8e40c8adf55, reversing
changes made to 489078bfcfce155bec58a4a544dc38b0e4e11cd1.
2014-10-02 16:00:50 -04:00
3fd8fc97a2 BUGFIX: Handle text input in keypress handler for I18n
While the `keydown` handler is the only way of reliably catching special keys,
for textual input `keypress` is preferable, as it can handle thing like parens
without having to hardcode a keyboard.

I moved that code and in the process converted some magic numbers to constants
- mostly so I can read stuff better.
2014-10-01 15:50:09 +02:00
3b76fd82fd ES6: user-search lib and autocomplete. Cancels many promises rather than
leaving them as pending forever.
2014-08-08 13:10:13 -04:00