Skip to content

Releases: cibernox/ember-power-select

Steak and salad

13 Apr 15:54
Compare
Choose a tag to compare

I head that summer is coming a it's time to start doing diet, right?

Well, Ember Power Select is doing that! πŸŽ‰
Starting with 1.7.0 the addon is 100% jQuery-free. You can the addon and the test helper that it provides on jQuery-free apps.

As a consequence of this CSS selectors passed to test helpers that end up in :eq() are now deprecated. They are still supported but will be removed in 1.8.0. Of you want to take the NTH option, now the selectChoose helper accepts a third numeric argument that can be used for the same thing you used to use :eq(number).

selectChoose('.language-picker', '.ember-power-select-option', 5); // It's going to select the 6th element that matches `.ember-power-select-option` query.

Fabada asturiana

13 Mar 15:31
Compare
Choose a tag to compare
Fabada asturiana Pre-release
Pre-release

This is the first version of the addon that is transpiled using Babel6 internally. It should still be usable even if your app still uses babel 5.

No new features since 1.5.0.

Yorkshire pudding

23 Jan 21:18
Compare
Choose a tag to compare

New minor version with a new and handy feature πŸŽ‰

Now you can pass a placeholderComponent to the select to have complex placeholders with HTML and logic. For those situation where a simple string is not enough.

screen shot 2017-01-23 at 21 17 24

Docs: http://www.ember-power-select.com/docs/the-trigger

Props to @montoias for the work!

Muesly (it's too early)

20 Jan 09:26
Compare
Choose a tag to compare

Thanks to the awesome work of @simonihmig , now the addon has LESS support on pair with SASS!
This also improved the blueprint to add the import statements without wiping the rest of the file.

Just a salad

12 Jan 12:20
Compare
Choose a tag to compare

First minor version bump in the 1.X cycle.

The main feature in this version is the usage of Ember.isEqual to compare options instead of a simple === operator.
Using this comparator function is unlikely to break anyone code, but I thought that it deserved a minor bump.

Among of the advantages of this are:

  • Better results when comparing dates. While in JS, new Date(2017, 5, 5) !== new Date(2017, 5, 5) because objects are compared by reference, this is hardly ever the intended behaviour. Ember.isEqual(new Date(2017, 5, 5), new Date(2017, 5, 5)) will correctly return true.
  • Allows the user to define their own way of comparing equality. If an object defines an isEqual(other) {} method it will be used instead of a simple ===. This allows users to decide that two POJOs should be considered equal if their id property is the same.

Estrella Galicia

10 Dec 17:57
Compare
Choose a tag to compare

πŸŽ‰ πŸŽ‰ πŸŽ‰
An after a loong looong time delaying the unavoidable, today is the first stable release of Ember Power Select
πŸŽ‰ πŸŽ‰ πŸŽ‰

The latest betas were mostly bugfixes and refactors to ensure the component works well and without deprecations from 2.3.1 to the latest 2.10/2.11 versions that ship with the shiny new Glimmer2 engine. Not to mention being compatible with Fastboot and Engines.

This version just means a commitment to not break the public API of the select or any of its internal components for the foreseeable future. The component might get additive features (there is a few ideas already) and it will track progress in the framework like the upcoming glimmer-components.

This is a big milestone on a project that started like a rant against the rigidness of wrapped jquery plugins used from Ember, and it aimed to provide a select that was native, idiomatic, usable out-of-the-box but flexible enough for allowing users to step forward and customize or even replace what they don't like.
I think it was achieved, to the best of my ability.

Can't finish this release without thanking the over 50 contributors who improved the components or its documentations, and the hundreds who tested it, reported issues and reached me, publicly or privately, to thank me for the addon or tell me that they love it.

That really matters.

Prawns risotto

01 Oct 23:34
Compare
Choose a tag to compare

Notable changes:

  • Support for cancelable tasks (p.e. ember-concurrency's tasks) in the search action! πŸŽ‰ πŸŽ‰ If a search is ongoing but the component doesn't care about it anymore (because the select was closed or because a newer search was fired), instead of just ignoring that search, not EPS attempts to cancel it and save some potentially expensive work to be done.
  • selectChoose and selectSearch now throw helpful errors when either the select or the option cannot be found.
  • The documentation page got some nice syntax highlighting in the code examples.

Salmon crumble

01 Aug 23:14
Compare
Choose a tag to compare
Salmon crumble Pre-release
Pre-release

This release contains one main change when compared with the 1.0.0-beta.5: IMMUTABLE API.

The publicAPI object received by subcomponents, actions and the block of the components is now immutable. Any change in the state of this object actually creates a new object.

Subcomponents can now rely on this to replace usages of Ember.Observe with didReceiveAttrs, since now the select object will be updated after each change.

Also, every change in this object will be broadcasted to the outside using the registerAPI action. This can be used to track how the state of the select evolved after every change, giving a poor's man log and I hope will evolve into a time-travel debugging feature.

For a fill list of changes check the Changelog file.

Escalivada

07 Jun 12:17
Compare
Choose a tag to compare
Escalivada Pre-release
Pre-release

1.0.0-alpha.0 πŸŽ‰ πŸŽ‰ πŸŽ‰

Finally the component is ready to commit to a public API for internal sub components. This process might take a couple more iterations, but generally speaking all changes are going to be additive.

Will be updated soon.

The shape of the publicAPI objected received by all sub-components is this one:

{
  options: <array[T]>,            // Contains the regular array with the resolved collection of options.
  results: <array[T]>,            // Contains the regular array with the active set of results.
  resultsCount: <number>,         // Contains the number of results incuding those nested/disabled
  selected: <T> or <array[T]>,    // Contains the resolved selected option (or options in multiple selects)
  highlighted: <T>,               // Contains the currently highlighted option (if any)
  searchText: <string>,           // Contains the text of the current search
  lastSearchedText: <string>,     // Contains the text of the last finished search. In sync searches will match `searchText`. In async searches, it will match it if the current search is fulfilled
  loading: <boolean>,             // Truthy if there is a pending promise that will update the results
  isActive: <boolean>,            // Truthy if the trigger is focused. Other subcomponents can mark it as active depending on other logic.
  actions: {
    open() { ... },               // Opens the select
    close() { ... },              // Closes the select
    toggle() { ... },             // Toggles the select
    reposition() { ... },         // Repositions the dropdown (noop if renderInPlace=true)
    search(term) { ... }          // Performs a search
    highlight(option) { ... }     // Highlights the given option (if it's not disabled)
    select(option) { ... }        // Selects the given option (if it's not disabled)
    choose(option) { ... }        // Chooses the given options if it's not disabled (slight different than `select`)
    scrollTo(option) { ... }      // Scrolls the given option into the viewport
  }
}

Users creating their own version of Ember Power Select replacing built in components with their own can trust that this public API object (received by those components as select) will keep this shape (it might get more options with time).

The definitive list of slots that can be customized with custom components:

afterOptionsComponent
beforeOptionsComponent
optionsComponent
selectedItemComponent
triggerComponent

Those components can be strings or contextual components wrapped along with some state using the component keyword. Check http://www.ember-power-select.com/docs/architecture for more information on how this components compose to get the final result.

The full list of configuration options accepted by the component can be consulted in http://www.ember-power-select.com/docs/api-reference

For those who don't know, Escalivada is a dish typical from the east of Spain consisting of charcoal-grilled peeled vegetables (tomatoes, eggplants, young onions and red peppers) seasoned with olive oil, salt and pepper, eaten at room temperature, usually during the summer months. I personally like to also add a pinch of smoked paprika instead of pepper.

Braided chicken with spinach bechamel

02 Jun 20:18
Compare
Choose a tag to compare
Pre-release

Big release

Huge internal refactor to use the new final API of Ember Basic Dropdown internally, to make it more flexible and easy to customize.

The public API of the component remains the same with the exception that trigger no longer needs a wrapper div, so the main component is tagless and the class attribute has no effect on it. The component can still have a tag and a class if the user passes tagName="div" class="whatever", but that is not the default anymore.
Some classes have changed to make the css hierarchy flatter. That won't affect you unless you are customizing the default styles by targeting that specific class.

There is more work to be done in the 0.11 series:

  • Remove hacks needed prior to 2.3 in inputs.
  • Use ember-concurrecy to simplify internals.
  • Thanks to the new flexibility of Ember Basic Dropdown, the multiple select can be simplified