ui-select icon indicating copy to clipboard operation
ui-select copied to clipboard

Roadmap and design

Open ProLoser opened this issue 13 years ago • 32 comments

I threw this together to pretty much scrape some features I am hoping this repo eventually is capable of doing: https://github.com/angular-ui/ui-select/wiki/Roadmap

One of the the things I'm focused on right now is easy-to-customize data, access to internal data, and templates.

One concern is the ability to specify a custom list-item template (currently possible) and a custom selected template (not possible, just uses a button). Perhaps we should break this up into multiple tags?

<ui-select>
  <selected></selected>
  <options>
    <li ng-repeat="..."></li>
  </options>
</ui-select>

These child-directives COULD in fact be optional, and if not specified, simply generate <li><a>{{value}}</a></li>

Secondly, if you don't specify <selected> or <options> but you DO specify a template we could use THAT one for both. Perhaps instead of making you create the <li> tag and it's related attributes we can do it for you and you simply specify the contents of each list-item and the selected-item?

ProLoser avatar Nov 07 '13 00:11 ProLoser

What about using an attribute that accepts a comprehension_expression like ngOptions

Simple version

<ui-select options="email for user in users"></ui-select>

Or with child-directives for more flexibility

<ui-select options="user in users">
  <selected>{{user.email}}</selected>
  <options>
    {{user.name}} <b>{{user.email}}</b>
  </options>
</ui-select>

dimirc avatar Nov 07 '13 05:11 dimirc

Not powerful enough to let you customize the list items. On Nov 6, 2013 9:38 PM, "dimirc" [email protected] wrote:

What about using an attribute that accepts a comprehension_expression like ngOptions

Simple version

Or with child-directives for more flexibility

{{user.email}} {{user.name}} {{user.email}}

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ui-select/issues/3#issuecomment-27939050 .

ProLoser avatar Nov 07 '13 09:11 ProLoser

@ProLoser I'm experimenting some approaches and will like to keep going pushing changes but not sure how to proceed since I didn't start this repo and wouldn't want push to master branch and maybe complicating your original roadmap. Let me know your opinion, maybe I could create my own repo and later we check back if we merge or something? Cheers

dimirc avatar Nov 15 '13 21:11 dimirc

Add branches or multiple files. I am not married to my code and you are free to trash all of it if you see fit. On Nov 15, 2013 1:23 PM, "Wladimir Coka" [email protected] wrote:

@ProLoser https://github.com/ProLoser I'm experimenting some approacheshttps://github.com/angular-ui/ui-select/pull/8and will like to keep going pushing changes but not sure how to proceed since I didn't start this repo and wouldn't want push to master branch and maybe complicating your original roadmap. Let me know your opinion, maybe I could create my own repo and later we check back if we merge or something? Cheers

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ui-select/issues/3#issuecomment-28604489 .

ProLoser avatar Nov 15 '13 22:11 ProLoser

Also, I personally would prefer to see as little styling as possible. The css and html used in select2 could be cleaned up but primarily I would like to see approximate structure in the base stylesheet and then we can provide optional "themes" such as select2 or bootstrap dropdown in additional stylesheets.

Secondly, the ability for the stylesheet to work depends primarily on the html structure, so one of the earliest goals should be to make the directive as structureless as possible. Build a version where you are forced to specify a custom template, then create secondary directives or templates that people can choose to use instead. These secondary templates can give people the option of a bootstrap structure or select2 structure, etc.

Hopefully that makes sense. I'm pushing this same approach on the ng-grid rewrite. On Nov 15, 2013 2:03 PM, "Dean Sofer" [email protected] wrote:

Add branches or multiple files. I am not married to my code and you are free to trash all of it if you see fit. On Nov 15, 2013 1:23 PM, "Wladimir Coka" [email protected] wrote:

@ProLoser https://github.com/ProLoser I'm experimenting some approacheshttps://github.com/angular-ui/ui-select/pull/8and will like to keep going pushing changes but not sure how to proceed since I didn't start this repo and wouldn't want push to master branch and maybe complicating your original roadmap. Let me know your opinion, maybe I could create my own repo and later we check back if we merge or something? Cheers

— Reply to this email directly or view it on GitHubhttps://github.com/angular-ui/ui-select/issues/3#issuecomment-28604489 .

ProLoser avatar Nov 15 '13 22:11 ProLoser

@ProLoser I agree that "themes" will be a nice feature, but maybe we can focus on one style for now and later add this ability. Take a look at some changes I committed just a moment ago. To be honest I'd like to have a fully functional directive asap since its really needed it in a working project that I'm right now, so let me know your comments of the changes I did and what do you think of merging to master and keep going with that.

dimirc avatar Nov 17 '13 04:11 dimirc

I see multiselect is on the roadmap. Any idea when that will be implemented?

gabegorelick avatar Mar 31 '14 17:03 gabegorelick

^ @gabegorelick. I would like to throw away select2 for this, one day hopefully!

j-walker23 avatar Apr 01 '14 16:04 j-walker23

Getting this to work with Angular 1.2.* has been a pain in the arse. Any thoughts about updating the plunker demo and fixing the $sce errors? I haven't been able to figure out how to get the highlight custom filter to work as a result.

pixelsailor avatar May 20 '14 18:05 pixelsailor

:+1: for implementing multiselect. I can say goodbye to select2 then.

leesei avatar Aug 08 '14 04:08 leesei

+1 for multiselect. Is tagging on the roadmap?

jverghese avatar Aug 24 '14 17:08 jverghese

+1 for multiselect, +10 for tags, +100 if it also supports editing tags a la https://github.com/ivaynberg/select2/issues/116

seiyria avatar Oct 08 '14 14:10 seiyria

Is there an option to add a call to action in the event that the specified option is not among the ones the select is constructed on?

e.g. Add the option to add an element to the list in the event it does not exist already. I've been reading the examples and documentation on the internet and can't find anything yet.

ScrambledBits avatar Oct 08 '14 16:10 ScrambledBits

+1 for JohnQ's question. I was looking for the same ability to be able to add new options even if they are not present in the list, but user just types them in.

ghost avatar Oct 16 '14 20:10 ghost

Editing tags, ajax result... what is next? fells more like it is turning out to be a Typeahead thing. kind of beats the purpose of being a select with static options.

jimmywarting avatar Oct 21 '14 09:10 jimmywarting

@jimmywarting technically this was a continuation of select2, which I think may have been around before typeahead.

ProLoser avatar Oct 21 '14 10:10 ProLoser

Don't have anything against it... maybe the only thing you will need to include then is this tool

jimmywarting avatar Oct 21 '14 11:10 jimmywarting

@seiyria @jverghese Tagging functionality is in PR #327, FYI. Hoping for it to be merged soon.

brianfeister avatar Nov 14 '14 19:11 brianfeister

We need Custom sorting / matching / filtering. plz

xiangming avatar Dec 05 '14 06:12 xiangming

Is there a way to do the equivalent of ui-select2's createSearchChoice? I need to allow a person to enter a name if it isn't in the list of existing options.

lasimon avatar Dec 19 '14 23:12 lasimon