Releases: cibernox/ember-power-select
Chicken with beer sauce and mashed potatoes
I don't expect any more changes before 0.10 final.
And 0.10 will probably the latest before 1.0.0 🎉
- [BREAKING]
e.preventDefault()
no longer affects the behaviour of the component, just prevents
the native browser behaviour. Returnfalse
instead. - [BUGFIX/BREAKING]
onopen
/onclose
actions are called before the component is opens/closes,
giving the user the change to prevent that from happening by returning false. - [BUGFIX]
select.actions.select
doesn't callstopPropagation
orpreventDefault
in the given
event anymore. It's not it's responsability. - [INTERNAL] Update Ember-basic-dropdown to 0.9.5-beta.14. PublicAPI should be the same, but
internal have been simplified and responsabilities better divided across components. Nothing should
break, but given the size of the changes ¯_(ツ)_/¯ - [BUGFIX] The trigger of the single select applies overflow if the content is too long
- [FEATURE] Selects can now be nested inside other dropdowns.
- [FEATURE] Allow to pass WAI-ARIA states (ariaDescribedBy, ariaInvalid, ariaLabel, ariaLabelledBy and required)
- [BUGFIX] Avoid highlight disabled options when they are the first option after a search. Instead,
highlight the first non-disabled option in the list. When all results are disabled, nothing gets
highlighted. - [ENHANCEMENT] Add a class to the component when an element inside has the focus. This allows to
style the component not only when the component itself is focused but when an input inside
is, which was previously impossible. - [BUGFIX] Allow to pass
horizontalPosition
to customize to which edge of the trigger
the dropdown is anchored to. - [FEATURE] The
selected
option can now also be a promise. When it's a promise, the component
won't have any selection (the trigger will be empty, no option of the list will be
highlighted) until that promise resolves. Once it resolves, the trigger and the highlighted
option will update. - [BUGFIX] Fixed bug after event-delegation refactor where mouseovering the list itself
(which happens when options are disabled) throwed an error. - [BUGFIX] Disabled select shouldn't be clearable even if
allowClear=true
. - [BUGFIX] In multiple selects when test in the searchbox was too long the text overflowed the trigger.
- [REMOVE FEATURE] The
opened
property (the only using double bindings instead of DDAU) has been
removed. It was the cause of some errors due to race conditions in the bindings propagation.
It is still possible to passinitiallyOpened=true
to render a select already opened, but it is
a one time property. It won't onpen/close the select when mutated nor will be mutated when the
select is opened or closed. - [BUGFIX] Fix option highlighting when the use mouseovers in an element inside the
<li>
s - [BUGFIX] Fix option selection when the use click in an element inside the
<li>
s - [BUGFIX] In multiple selects, deleting the last element of the list using BACKSPACE to trigger a
search must open the dropdown if not already opened. - [FEATURE] Added
oninput
action that will be fired by changes in the search input. If the user
returnsfalse
from this action the default behaviour (perform a search) is not run.
This is particular useful for addons than need to preprocess the text being typed, by example to
tokenize it and add entries instead of performing a search. - [ENHANCEMENT] Improve accuracy
selectChoose
. BeforeselectChoose('.my-select', 'User')
might,
erroneously, select the option containing the textUser team
if it was before thanUser
in the
list. Now if there is more than one option containing the given text it but the content of
one of the options is identical, then that one is choosen. If none is identical, the first one.
Mutabal, potato pancakes and raw avocado
This is a beta version with basic support for transitions and animations.
When the dropdown is rendered, it gets a .ember-basic-dropdown--transitioned-in
class after it's first rendered, so it's trivial to add transitions when opened.
The closed, the dropdown gets a ember-basic-dropdown--transitioning-out
class, and if there is any CSS animation or transition on the dropdown, the select is not really closed until that animation finishes.
All this behaviour is actually part of ember-basic-dropdown.
This is the kind of feature that might have corner cases depending on the browser, so please, test it and report.
I don't know yet, but something italian I reckon.
- [BUGFIX] Fixes acceptance helpers to fire native events and therefore work with Ember Basic Dropdown 0.9.2
Chinese takeaway
After a loooong beta process, many bugs have been solved, new features added, and a few easy to fix breaking changes happened.
- [BREAKING CHANGE] Passing
class="my-foo"
to the component just customizes the class of the top-most
component, but doesn't try to derive classes from it for the trigger and the dropdown. This behavour
was unexpected, confusing, didn't work with multiple classesclass="foo bar baz"
and doesn't enables
any feature thattriggerClass=
anddropdownClass=
don't allow already. Ditched. - [BUGFIX] Allow to type in closed multiple selects. Before the default behaviour of keydown events
was being prevented, disallowing the typing. - [BUGFIX] Ensure the public API passed to the components and to the ourside world is the same, by
making it a CP and and use it as single source of truth. - [BUGFIX] Fix a bug filtering when the given options is a promise.
- [ENHALCEMENT] The custom matchers defined by the user now can and should return numbers instead of
true/false
. Returning a boolean still works but emits a deprecation warning and will be removed in the next version.
The reason is that returning a number gives us more posibilities, like sorting the results. - [BUGFIX] Ensure the placeholder text of simple selects doesn't overflow the container trigger.
- [FEATURE] Allow to customize the destination element used by ember-wormhole on a per-component basis
- [FEATURE] Update to
ember-basic-dropdown
0.9.0 final. This allows to customize the wormhole destination
of all dropdowns of the app, including ember-power-select's dropdowns. - [BUGFIX] Ensure
triggerComponent
receives theloading
property to allow showing spinners and things like that. - [BUGFIX] Ensure
beforeOptionsComponent
andafterOptionsComponent
receive theextra
object. - [FEATURE] Now you can type in closed single selects and automatically select the first match as you type.
The typed text is erased after one second. It doesn't work in closed multiple select without searchbox (what would be the correct behavior?) - [FEATURE] Now you can type in opened selects witout searcbox (multiple or single) to highlight the
first marching option as you type. The typed text is erased after one second. - [FEATURE] Search can be disabled in multiple selects, instead of only in single selects.
- [BUGFIX] Pressing enter in a select without searchbox correctly selects the highlighted element
- [FEATURE] Proper Accesibility!! Lots of roles and
aria-*
tags have been added to make the component
friendly, according with the guidelines in the RFC - [BUGFIX] When the component received a promise as
options
and also asearch
action, clearing
the search must show the content of that promise. - [FEATURE] The
.ember-power-select-option
s added to wrap thenoMatchesMessage
and thesearchMessage
have special classes to help styling them (ember-power-select-option--no-matches-message
&ember-power-select-option--search-message
) - [BUGFIX] Single selects without searchbox can be focused normally. Fixed updating ember-basic-dropdown.
Ember basic dropdown was callingpreventDefault
on the mousedown event to prevent the user to
select text when moving the mouse between the mouseup and the mousedown. Now the event is not defaultPrevented,
it uses another technique. - [BUGFIX] When the list of options is empty but the component is given a search action, it should
not show theNo results found
until the user actually performs a search and there and it comes
empty. - [BREAKING] The
ember-power-select-options--nested
class is not used anymore. Now nested groups
haverole=group
, and the top-most one hasrole=listbox
. - [BREAKING] The
*--open
class on the.ember-power-select
div has been removed. Now styles
target[aria-expanded=true/false]
, and it applies to the trigger, not to the top-most div.
People explicitly targeting this class in they styles will need to update. - [BREAKING] Warning. Classes ending in
--disabled
,--highlighted
and--selected
have been
replaced by aria attributes[aria-disabled="true"]
,[aria-current="true"]
and[aria-selected="true"]
respectively. Those attributes are needed for a11y and the recomendation is to style based on them
instead of classes.
Styles have been updated accordingly, so people using them and customizing the appearance using the
sass variables won't notice anything, but people that relied on those classes for overriding styles
will have to update them. - [TESTING] Run fasboot tests as part of CI
- [TESTING] Add fastboot tests harness.
- [FEATURE] Initial Fastboot support!!
- [INTERNAL] Removed deprecated properties
- [INTERNAL] Updated mirage, liquidfire, ember-try and others.
- [FEATURE]
$ember-power-select-line-height
variable can have units now. - [IMPROVEMENT] Multiple select's trigger uses flexbox to improve appearance and behavior. In browsers
without flexbox works as it did before. - [FEATURE] Multiple selects have a distintive class in the trigger so they be styled accordingly.
- [BUGFIX] Modify the searchText programatically (through the
select.actions.search('foo')
per example)
updates the input, respecting the cursor position.
Provenzal chichen with honey carrots
Bug fixes and ability to customize the wormhole destination div globally or on a per-component basis
Roasted chicken with spices
This smaller version comes with one bugfix and three some nice features.
- [FEATURE] Now you can type in closed single selects and automatically select the first match as you type.
The typed text is erased after one second. It doesn't work in closed multiple select without searchbox. - [FEATURE] Now you can type in opened selects witout searcbox (multiple or single) to highlight the
first marching option as you type. The typed text is erased after one second. - [FEATURE] Search can be disabled in multiple selects, instead of only in single selects.
- [BUGFIX] Pressing enter in a select without searchbox correctly selects the highlighted element
Chicken milanese with fries
Oh, this with this release the 0.9.0 starts being the advices version to be used.
Many things have improved, many bugs were fixed. Some highlights:
- [FEATURE] Fastboot support!! The component now should render perfectly in Fastboot Mode
- [FEATURE] Proper Accesibility!! Lots of roles and
aria-*
tags have been added to make the component
friendly, according with the guidelines in the RFC - [FEATURE]
$ember-power-select-line-height
variable can have units now. - [FEATURE] The
.ember-power-select-option
elements added to wrap thenoMatchesMessage
and thesearchMessage
have special classes to help styling them (ember-power-select-option--no-matches-message
&ember-power-select-option--search-message
) - [BREAKING CHANGE] The
ember-power-select-options--nested
class is not used anymore. Now nested groups
haverole=group
, and the top-most one hasrole=listbox
. - [BREAKING CHANGE] The
*--open
class on the.ember-power-select
div has been removed. Now styles
target[aria-expanded=true/false]
, and it applies to the trigger, not to the top-most div.
People explicitly targeting this class in they styles will need to update. - [BREAKING CHANGE] Warning. Classes ending in
--disabled
,--highlighted
and--selected
have been
replaced by aria attributes[aria-disabled="true"]
,[aria-current="true"]
and[aria-selected="true"]
respectively. Those attributes are needed for a11y and the recomendation is to style based on them
instead of classes.
Styles have been updated accordingly, so people using them and customizing the appearance using the
sass variables won't notice anything, but people that relied on those classes for overriding styles
will have to update them. - [BUGFIX] When the component received a promise as
options
and also asearch
action, clearing
the search must show the content of that promise. - [BUGFIX] Single selects without searchbox can be focused normally. Fixed updating ember-basic-dropdown.
Ember basic dropdown was callingpreventDefault
on the mousedown event to prevent the user to
select text when moving the mouse between the mouseup and the mousedown. Now the event is not defaultPrevented,
it uses another technique. - [BUGFIX] When the list of options is empty but the component is given a search action, it should
not show theNo results found
until the user actually performs a search and there and it comes
empty.
The most relevan part about breaking changes is many styles that used to target classes, like ember-power-select-option--disabled
will now target aria-*
attributes, like aria-disabled=true
. People using the default styles or customizing them using the sass variables will be fine. People targeting those clases will have to change their styles to target the proper attributes.
This is annoying but is necessary in order to enforce good practices in accessibility. People that want to reuse the default styles will have to add the proper a11y attributes, resulting in a ecosystem of addons based on ember-power-select that are accesible by default.
Pork ribs
This is most likely the last release with breaking changes in the public API before 1.0, so you should feel safe already using it.
The "semi-public" API received by the components that are customizable by the user is approaching to stability but might take another version or two.
Below, a list of all changes since 0.7.2:
- [INTERNAL] Update to ember-cli 2.3.0-beta.1
- [ENHANCEMENT] The mouseup over on element of the list doesn't selects that element if the mouse is
still in the same coordinates (+/- 2px) of the mousedown that opened the component. This allows the
options list to be rendered over the trigger and not wrongly select the element above the trigger - [BUGFIX] default
beforeOptions
component only clear the search on destroy when the search is enabled. - [BUGFIX] Not it's responsability of the component holding the searchbox to clear (or not) clear the
search when the component is closed. The default components (single/multiple) do it. Maybe breaking?? - [BUGFIX] Trigger should use clearfix so when the amount of options selected (multiple selects) overflows
the available width is grows. - [BUGFIX] Do not use
let
in node code (unless you want node 0.12 to break) - [BUGFIX] Ensure that the
included
hook works when invoked from another addon (being a dependency)
instead of directly by the consumer app, and also that the function is a noop the 2nd time it's invoked. - [BUGFIX] Not returning from the
search
action but instead settingoptions
to a promise does not
prevent subsequent searches. - [BUGFIX] Pressing Backspace to delete the last selected option in multiple select when options are not
plain strings now works as expected. It makessearchField
mandatory, and asserts its presence. - [INTERNAL] Refactor internals to don't force people providing custom components for slots to
implement that much logic on it. Also logic for thecloseOnSelect
configuration lies in a single place. - [INTERNAL] Remove unnecesary action. Makes customization of triggerComponent easier.
- [BUGFIX] Do not rely on significant whitepace + inlineBlock for styling selections in multiple select.
Use float: left - [FEATURE] Added a new slot that can be customized with the
selectedItemComponent
. This allows to
customize the markup of the selected option(s) without forcing the user to customize the entire
trigger component. This doesn't enable any new pattern but makes customization easier. - [BREAKING]
dropdownPosition
is nowverticalPosition
. It will continue to work until 0.9 but throwing
a deprecation warning. - [BUGFIX]
{{power-select-multiple}}
has fallback values for the component names. Makes it composable. - [BREAKING] Renamed
selectedComponent
totriggerComponent
, which is more accurate, in preparation
to add aselectedItemComponent
soon.selectedComponent
continues to work, but throws a deprecation. - [FEATURE] Add new sass variables for customize the border & padding of each option in multiple mode,
and the padding of the trigger in ltr/rtl modes. - [INTERNAL] Update ember-cli
- [BUGFIX] Update deps to ember-basic-dropdown 0.7.2. Fixed duplicated wormhole placeholder when
ember-basic-dropdown is also a direct dependency of the project. - [BREAKING] Eliminame multiple mode and create
{{#power-select-multiple}}
as a separated component
for dogfooding - [BREAKING] The name of the selected property inside the custom components is now
selected
instead ofselection
for consistency with the external API. - [BREAKING] More bahaviour has been transfered from the main components to the default implementation
of theselectedComponent
,optionsComponent
andbeforeOptionsComponent
. This makes the component
more flexible but less straigtforward to extend. The API for extending the component was never publish
but still, expect things to break.
King prawns tagliatelle
This is the first release in the 0.8.0 cycle.
Unlike previous versions where breaking changes were pretty minor, this version includes some noticeable changes that might break your app or your custom components. This was necessary as the component iterates over a stable public API.
The most notable change is that the multiple select component is not longer a option multiple=true
option, but an entirely different component {{power-select-multiple}}
, that is composed over the default component. Dogfooding at it's best. Apart from that change, the public API remains identical, so this should be easy to fix.
If you are creating your passing custom selectedComponent
, optionsComponent
or beforeOptionsComponent
to replace the defaults, there is another breaking change. The selected element is now passed to those component as selected
instead of selection
. This change was made to match the name of the public API. I should never have been different.
See the changelog for more detailed changes.
Russian Salad
Mostly bugfixing and some testing refactors.
- [INTERNAL] Make integration test helpers runloop aware to dry tests.
- [BUGFIX] The highliged element is reseted to default when the component is closed.
- [BUGFIX] Update ember-basic-dropdown to defaultPrevent the behavior if the mousedown that opens the
component, so the user does not select text if moves the finger before releasing the mouse.