mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
pills: Streamline input pills (for user groups).
The main point of this change is to streamline the core
code for input pills, and we use also modify user groups.
The main change to input_pill.js is that you now
configure a function called `create_item_from_text`, and
that can return an arbitrary object, and it just needs
a field called `display_value`.
Other changes:
* You now call `input.create(opts)` to create the
widget.
* There is no longer a cache, because we can
write smarter code in typeahead `source` functions
that exclude ids up front.
* There is no value/optinalKey complexity, because
the calling code can supply arbitrary objects and
do their own external data management on the pill
items.
* We eliminate `prependPill`.
* We eliminate `data`, `keys`, and `values`, and just
have `items`.
This commit is contained in:
@@ -1004,6 +1004,7 @@ JS_SPECS = {
|
||||
'js/localstorage.js',
|
||||
'js/drafts.js',
|
||||
'js/input_pill.js',
|
||||
'js/user_pill.js',
|
||||
'js/channel.js',
|
||||
'js/setup.js',
|
||||
'js/unread_ui.js',
|
||||
|
||||
Reference in New Issue
Block a user