- Many dependency updates and cleanups (ember-concurrency 3.0, ember 4.12, drop node 14...) #705
- Improve typescript expertience for users using
exactOptionalPropertyTypesandnoImplicitOverride
- Receive
@animationEnabledin the content component.
- Update ember-maybe-in-element for version that plays nicely with parallel compilation.
- [BREAKING] Update many dependencies, including qunit and ember-auto-import v2. Now the minimum version is 3.28+
- Relax dependency on ember-style-modifier so version 1.0 is also allowed
- Allow ember-get-config v2
- [MAYBE-BREAKING] The trigger component is now implemented internally as an element modifier. This should not be breaking, but a refactor this big is always risky. This makes much easier to make any component the trigger of a dropdown, just applying that modifier to any element.
- Because of the element modifier change, not the minimum version of Ember supported is 3.24
- [BREAKING] Co-locate component templates. This is breaking for anyone overriding the component's templates with their own, as the location of the template has changed.
- Typescript fix for configuration.
- [FEATURE] Improve compatibility with Embroider/Ember 4
- Fix animation when component is not rendered in place.
- Update dependency in @ember/render-modifiers to 2.0.2 with fixes a bug with unnecessary recomputations.
- (#628) Fix issue, The
@animationClassclass don't get reset after the first render. When the dropdown content first renders, it animates correctly, but on subsequent renders there is no animation - cause@animationClassnot being reset back to transitioning--in state.
- (#633) A11y improvements, changing aria-controls instead of aria-owns, which seems to be more correct.
- [BREAKING] Stop using a polyfill for
Object.assign, which effectively removes support for Internet Exporer. But it's 2022, its about time.
- Update
ember-element-helperto fix issues with CI.
- Relax dependencies on embroider packages
- Update ember-element-helper for better embroider compatibility
- Update ember and many other dependencies
- Fix conditional import for Embroider compatibility, using @embroider/macros.
- Import
htmlSafefrom@ember/templateto fix deprecation warning. - Migrate to github actions and fix stuff to make CI green again.
- Use
ember-style-modifierin one more place. - Migrate to github actions and fix CI on beta and canary. This was done by relaxing a dependency on the embroider utils.
- Use
ember-style-modifierfor setting styles on element instead of using inline styles. This allows to use the addon on webs that forbid inline styles on they CSP config.
- Relax dependency on ember-truth-helpers
- More IE11 fixes.
- Use
assignpolyfill for IE11 support.
- Update
ember-maybe-in-elementto 2.0.1, which fixes deprecation about{{-in-element}}usage.
- Add back
onXXXevent handlers to the trigger and content components, removed in the transition to angle bracket components, because make some patterns easier as it allows to set handlers to those events when defining the contextual component, instead of in invocation time
- [BUGFIX] Restore ability to change
horizontalPositionandverticalPositionafter initialization, lost at some point in the transition to glimmer components.
- TS: Fix type definition: Allow touch events in
handleRootMouseDownon another location.
- TS: Fix type definition: Allow touch events in
handleRootMouseDown.
- A11y fix: When the component is not expanded, it must have
aria-expanded="false".
- Ensure
this._superin invoked in theincludedhooks.
- [BUGFIX] Ensure the
otherStylesis initialized with a copied object.
- [CHORE] Update to
@glimmer/component1.0.0 - [BUGFIX] If there's no enough space for the dropdown above nor below the trigger, put it below.
- [CHORE] Improve exported types
- [BUGFIX] Don't use typescript in /app folder
- [CHORE] Convert to typescript
- [BUGFIX] Fix reposition of dropdown after scroll or window resize events
- [CHORE] Update to @glimmer/component 1.0.0-beta.2
- No changes since alpha 1
- [MAYBE-BREAKING] Update to glimmer components
- [BUGFIX] Use
setwhen changingpreviousVerticalPositionandpreviousHorizontalPosition.
- [CHORE] Update some dependencies. More importantly
ember-element-modifiersto 1.0.2 which changes its behavior.
- [BUGFIX] Correct condition in which the development assertion added in 2.0.6 is thrown. Logic was reversed.
- [BUGFIX] Update
ember-element-helperto 0.2.0 to fix bug in engines
- [ENHANCEMENT] Add development assertion to help people understand the somewhat cryptic error message that
appeared when there was no element with id
ember-basic-dropdown-wormholein the document
- [CHORE] Update npm packages to tests pass in beta and canary
- [BUGFIX] Ensure Ember doesn't complain about not using
setto update values.
- [ENHANCEMENT] Allow to pass a
@defaultClassargument to the content. This is necessary to be able to assign classes while the{{component}}helper does not allow to pass attributes like in angle-bracket syntax.
- [ENHANCEMENT] Allow to pass a
@defaultClassargument to the trigger. This is necessary to be able to assign classes while the{{component}}helper does not allow to pass attributes like in angle-bracket syntax.
- [BUGFIX] Move
ember-truth-helperstodependencies.
- [ENHANCEMENT] Expose
ember-basic-dropdown/utils/calculate-positionas public API.
- [CHORE] Setup/teardown mutation observer using dedicated element modifiers.
- [CHORE] Refactor animation logic to use
{{did-insert}}/{{will-destroy}}element modifiers.
- [BREAKING] Remove
onMouseDown,onClick,onKeyDownandonTouchEndattributes from the<dropdown.Trigger>component. Users can just use the{{on}}modifier to attach events now, although that means that to prevent the default event handler from being called for those events, instead ofreturn false, they must callevent.stopImmediatePropagation()like they would with regular events.
- [BREAKING] Remove
onMouseEnter,onMouseLeave,onFocus,onBlur,onFocusIn,onFocusOutandonKeyUpfrom the<dropdown.Trigger>component. Users can just use the{{on}}modifier to attach any event they want. - [BREAKING] Remove
onFocusIn,onFocusOut,onMouseEnter,onMouseLeaveandonKeyDownfrom the<dropdown.Content>component. Users can just use the{{on}}modifier to attach any event they want.
- [CHORE] Now that Ember 3.11 is released, this can go to beta.
- Because of some limitation of splattributes in AngleBracket components, the addons requires Ember 3.11+
- Public API changed: Previously the contextual component of this addon were invoked with
{{#dd.trigger}}and{{#dd.content}}. Now they are expected to be invoked with<dd.Trigger>and<dd.Content>. Note that the names are capitalized. This is done because the new convention that components start with a capital letter. - Passing
@class,@defaultClass,aria-*and most of those properties doesn't work anymore. This addon now expects to be used with angle-bracket syntax. In angle bracket syntax there is a distinction between component arguments (those preceded with an@sign) and html attributes, and the latter are a much better way of passing any arbitrary attribute to any of the components and sub-components of this addon. - The default
eventTypeof the trigger changed from"mousedown"to"click". That means that dropdown used to open with themousedownevents will now open withclickevents, which is a saner default. Since most of the time those events are fired together most people won't notice any difference, but in testing if someone was explicitly firing mouseodown events tests would have to be updated. - The default
rootEventTypehas changed from"mousedown"to"click". That means that before dropdowns would close as soon as the user mousedowns outside the dropdown, but not it will listed to click events by default. It's unlikely this change will be noticed by anyone.
- [ENHANCEMENT] Allow to bind the type attribute of the trigger.
- [ENHANCEMENT] Allow to customize the root event the component listens to in order to close when you
click outside it. It has historically been
mousedown, but now it can beclick. This allows to scroll the page using a scrollbar. In a future versionclickwill become the default.
- [REAPPLY] Revert the revert in 1.0.6. Technically identical to 1.0.5
- [REVERT] Revert change in 1.0.5 as it is a breaking change for Ember Power Select. Will fix EPS and apply again.
- [BUGFIX] A11y improvement: The trigger doesn't have an
aria-ownsattribute until the dropdown is open, because it's illegal for an aria-owns to reference an element (the content) that it's not in the page (yet).
- [BUGFIX] Fix code to find the destination element in fastboot.
- [FEATURE] Allow
onKeyUpaction to added to the trigger.
- [FEATURE] Allow
onKeyDownaction to the content component
- [DOCS] Document
eventTypeoption that has existed for a while now. - [FEATURE] Add
stopPropagationoption to the trigger to prevent the propagation of the event
- NO NEW CHANGES, just version 1.0. It was about time.
- [CLEANUP] Remove another reduntad
self.prefix.
- [CLEANUP] Remove unnecessary
self.prefix to access a few globals likedocumentorwindow.
- [CLEANUP] Remove passing
to="id-of-destination"that has been deprecated for a long time.
- [BUGFIX] Fix event being fired on destroyed trigger in Ember 3.2 and beyond.
- [FEATURE] Allow dropdowns with a custom
calculatePositionfunction to return in thestylesobject css properties other thantop,left,right,heightandwidth. Now users can set any arbitrary properties. P.e.max-height,z-index,transform....
- [INTERNAL] Stop depending internally on
ember-native-dom-helpers. Now the utilities inember-test-helpershave been ported to@ember/test-helpers, so they are not needed anymore.
- [DEPRECATION] Deprecate global acceptance helpers
clickDropdownandtapDropdown. Suggest to explicitly importclickTrigger/tapTriggeror even better, just useclick/tapfrom@ember/test-helpers. - [BREAKING] Drop ember-wormhole addon, use
#-in-elementbuilt-in instead. Less size, more performance. - [BREAKING] Drop support for Ember <= 2.9. This addon will require Ember 2.10 or greater to work.
- [BREAKING] Delete the
/test-supportfolder, useaddon-test-supportinstead. That means people should import helpers fromember-basic-dropdown/test-support/helpersinstead of using relative paths like../../helpers/ember-basic-dropdown, as they are brittle and change with nesting. - [BUGFIX] Ensure that the dropdown is not open by the right button of the mouse.
- [ENHANCEMENT] Allow
horizontalPositionto work whenrenderInPlace=true
- [ENHANCEMENT] Allow to bind the role attribute of the trigger
- [ENHANCEMENT] Added
preventScroll=trueoption to thedropdown.contentcomponent to "frezze" all mousewheel-triggered scrolling happening outside the component. Scrolling on touch devices using touchmove can still occur.
- [ENHANCEMENT] Enable
renderInPlace=truedropdowns to be dynamically repositioned. (#350) - [BUGFIX] Ensure the inline
styleattribute does not outputundefinedpxwhen some style is undefined. Also, ensure that bothleftandrightcannot be applied simultaneous, as it doesn't make sense.
- [BUGFIX] Prevent dropdowns with
renderInPlace=truefrom being incorrectly opened twice. This had no evident effects, but lead to the events in thedd.Contentcomponent to be added twice. - [BREAKING] Remove support for IE9/IE10.
- [ENHANCEMENT] Allow
transitioningInClassandtransitioningOutClassto be several classes by passing a string with spaces in it.
- [BUGFIX] Allow to use
horizontalPosition="center"along withrenderInPlace=true.
- [BUGFIX] When the component is rendered in-place, it still has to have the
--belowclass needed. While not used for positioning, it was used for animations.
- [BUGFIX] Fix positioning problem when the body has position relative.
- [BUGFIX] Move test helpers to
/addon-test-supportand use/test-supportonly for reexporting so apps don't require babel 6.6.0+ to work.
- [INTERNAL] Stop relying in
Ember.testingto decide the wormhole destination. Not just uses the environment. - [ENHANCEMENT] This component by default opens with
mousedownevents, not withclick. This behavior has its reasons but it's also surprising for some users and it might not be adequate sometimes. Now the trigger accepts aneventType="mousedown" | "click"(defaults to"mousedown"as today). This doesn't affect touch devices, as those are opened/closed with thetouchendevent. - [INTERNAL] Use the new import paths (e.g:
import Component from '@ember/component)
- [ENHANCEMENT] Add
auto-rightoption for horizontal position. It's likeauto, but it defaults to being anchored to the right unless there is not enough room towards the left for the content.
- [ENHANCEMENT] Update
ember-native-dom-helpersto^0.5.0.
- [BUGFIX] Guard agains edge case where positioning could fail if the select close and opened extremely fast
- [BUGFIX] Add global events to the
documentinstead of thebody, so the dropdown works even if the body is smaller than the height of the window
- [ENHANCEMENT] Update
ember-native-dom-helpersto 0.4.0
- [BUGFIX] Fix broken render in place after refactor for allowing dropdowns in scrollable elements.
- [ENHANCEMENTE] Allow to nest dropdowns infinitely. Thanks to @alexander-alvarez
- [BUGFIX] Stop looking for scrollable ancestors on the BODY or HTML
- [BUGFIX] Allow to work if the container has no offsetParent. This happens if the body is relative.
- No changes in previous beta
- [ENHANCEMENT] Dropdowns inside elements with their own scroll are finally supported! It works even inside elements with scroll inside another element with scroll inside pages with scroll.
- [BREAKING/BUGFIX] Closes #233. The positioning logic now accounts for the position of the
parent of container if it has position relative or absolute. The breaking part is that
custom
calculatePositionfunctions now take the destination element as third arguments, and the object with the options has now been moved to thr forth position. - [BREAKING] Passing
to="id-of-elmnt"to the{{#dropdown.content}}component is deprecated. The way to specify a different destination forember-wormholeis now by passingdestination=id-of-elmntto the top-level{{#basic-dropdown}}component. The old method works but shows a deprecation message.
- [INTERNAL] Update ember-concurrency to a version that uses babel 6.
- [BUGFIX] Fix calculation of the screen's width when browser shows a scrollbar, which
affected dropdowns with
horizontalPosition="right". - [BUGFIX] Fix initial CSS positioning flickering caused by refactor that removed jQuery.
- Now the addon is 100% jQuery-free. Docs page doesn't use jQuery either. Tests in CI run without jquery so if anyone inadvertenly relies on it, tests will fail.
- Rewrite tests to use
async/awaitwith the latestember-native-dom-helpers
- Update to ember-native-dom-helpers 0.3.4, which contains a new & simpler import path.
- [INTERNAL/BREAKING???] Update to Babel 6. This shouldn't be breaking, but you never know.
- [BUFGIX] Fix unnecesary line break caused by the wormhole empty div. Solved
by making that div be
display: inline.
- [ENHANCEMENT] Allow the
calculatePositionfunction to also determine the height of the dropdown's content.
- [BREAKING] Unify
calculatePositionandcalculateInPlacePosition. Now the function receives anrenderInPlaceflag among its options, and based on that it uses a different logic. This reduces the public API surface. This new function is the default export of/utils/calculate-position. The individual functions used to reposition when rendered in the wormhole or in-place are available as named exports:calculateWormholedPositionandcalculateInPlacePosition
- [INTERNAL] Use
ember-native-dom-helpers.
- [ENHANCEMENT] The trigger component now has a bound style property.
- [ENHANCEMENT] Rely on the new
ember-native-dom-helpersto fire native events instead or rolling out my own solution.
- [BUGFIX] Fix synthetic click on the trigger when happens in SVG items.
- [ENHANCEMENT] Bind
aria-autocompleteandaria-activedescendant. - [BUGFIX] Check if the component is destroyed after calling the
onCloseaction, as it might have been removed.
- [BREAKING] It is a problem for a11y to have
aria-owns/controlsto an element that it's not in the DOM, so now there is a stable div with the right ID that gets moved to the root of the body when the component opens. - [BUGFIX] Fix
clickDropdowntest helper when the given selector is already the selector of the trigger.
- [BREAKING] Don't display
aria-pressedwhen the component is opened. The attribute is not present by default, but can be bound from the outside. - [BREAKING] Don't display
aria-haspopupby default, but display it if passed in a truthy value. - [BREAKING] Use
aria-ownsinstead ofaria-controlsto link trigger and content together.
- [FEATURE] The
dropdown.contentnow accepts adefaultClassproperty as a secondary way of adding a class in contextual components that doesn't pollute theclassproperty.
- [FEATURE]
clickTriggertest helper also works when the given selector is the one of the trigger (before it had to be an ancestor of the trigger).
- [FEATURE] It accepts an
onInitaction passed from the outside. Private-ish for now.
- [FEATURE/BREAKING] Allow to customize the ID of the trigger component. Now the dropdown
uses a new
data-ebd-idattribute for query the trigger reliably. Unlikely to be breaking tho.
- [FEATURE] Add LESS support, on pair with the SASS one.
- [FEATURE] Added
$ember-basic-dropdown-overlay-pointer-eventsSASS variable.
- [BREAKING CHANGE] Renamed
onKeydownevent toonKeyDownto be consistent with the naming of every other action in the component
- [FEATURE] Allow to pass
onMouseDownandonTouchEndoptions actions to subscribe to those events. If the handler for those events returnsfalse, the default behaviour (toggle the component) is prevented.
- [FEATURE] Allow to pass
onMouseEnterandonMouseLeaveactions to the content, like we allow with the trigger.
- [BUGFIX] Prevent the
touchendthat opens the trigger to trigger a click on the dropdown's content when this appears over the trigger. Copied from hammertime.
- [CLEANUP] Update to
ember-cli-sass^6.0.0 and removenode-sassfrom dependencies.
- [BUGFIX] Call
registerAPIwillnullonwillDestroyto avoid memory leaks.
- [ENHANCEMENT] Pass the dropdown itself as an option to
calculatePositionandcalculateInPlacePosition, so users have pretty much total freedom on that function.
- [ENHANCEMENT] Allow downdowns rendered in place to be positioned above the trigger, and also to customize how they are positioned.
- [ENHANCEMENT] Update to ember-wormhole 0.5.1, which maximises Glimmer2 compatibility
- [BUGFIX] The fix in 0.17.2 that removed
e.preventDefault()cause bothtouchendand a syntheticmousedownevents to be fired, which basically made the component to be opened and immediatly closed in touch devises.
- [BUGFIX] Remove
e.preventDefault()that caused inputs inside the trigger to not be focusable in touch screens
- [BUGFIX] The positioning strategy takes into account the horizontal scroll and it's generally smarter.
- [BUGFIX] Fixed bug when a dropdown with
horizontalPosition="auto"passed from left to right, it keeped both properties, modifiying its width implicitly.
- [BREAKING] The object returned by
calculatePositionnow contains the offsets of the dropdown as numbers instead of strings with "px" as unit. This makes easier for people to modify those values in their own functions.
- [ENHANCEMENT] The default
calculatePositionmethod is now insideaddon/utils/calculate-position, so users can import it to perhaps reuse some of the logic in their own positioning functions.
- [BUGFIX] Add forgotten
uniqueIdproperty to the publicAPI yielded to the block. ThepublicAPIobject passes to actions had it but the one in the block didn't.
- [ENHANCEMENT] Allows to customize how the dropdown is positioned by passing a
calculatePositionfunction.
- [BUGFIX] Remove automatic transition detection. It never worked properly. It's fundamentally flawed. CSS animations are OK tho.
- [TESTING] Ensure the addon is tested in 2.4LTS
- [BUGFIX] Fix bug in versions of ember <= 2.6
- [BUGFIX] Remove
ember-get-configentirely. It turns that there is a less hacky way of doing this.
- [BUGFIX] Update
ember-get-configto fix Fastboot compatibility.
- [BUGFIX] Guard agains a possible action invocation after the component has been destroyed.
- [BUGFIX] Fix broken
horizontalPosition="center".
- [BUGFIX] Bind
titleattribute in the trigger.
- [BUGFIX] Revert glimmer2 compatibility
- [BUGFIX] Compatibility with glimmer2.
- [BUGFIX] Fix bug detaching event in IE10.
- [BUGFIX] The correct behaviour when a dropdown is disabled or the tabindex is
falseshould be to not havetabindexattribute, not to have atabindexof -1.
- [BUGFIX] Don't import
guidForfrom the shims.
- [BUGFIX] Preventing the default behaviour from an event doesn't prevent the component from doing the usual thing.
- [BUGFIX] Fix edge case that made the component leak memory if the component is removed after a mousedown but before the mouseup events of the trigger. This situation probably almost impossible outside testing.
- [ENHANCEMENT] The dropdown can have an overlay element if it receives
overlay=true.
- [BREAKING]
dropdown.uniqueIdis not a string likeember1234instead of the number1234.
- [BUGFIX] Consider the scope of the select the entire body, even if the app is rendered inside an specific element.
- [BREAKING] Rename the
dropdown._idtodropdown.uniqueIdand promote it to public API.
- [BUGFIX] Make the first reposition faster by applying the styles directly instead of using bindings. This allows the dropdown to have components with autofocus inside without messing with the scroll.
- [BUGFIX] Enabling the component after it has been disabled should trigger the
registerAPIaction.
- [BUGFIX] Fix bug when the consumer app has a version of
ember-cli-shimsolder than 0.1.3
- [BUGFIX] Stop importing
getOwnerfrom the shim, since many people doesn't have shims up to date and it's trolling them.
- [BUGFIX] Render more than one component with
renderInPlace=truecases an exception and after that mayhem happens.
- [BUGFIX] Use
requestAnimationFrameto wait one frame before checking if the component is being animated. This makes this component fully compatible with Glimmer 2.
- [ENHANCEMENT/BREAKING] Now the publicAPI object received sub-components and passed to actions is
immutable. That means that each change in the internal state of this component will generate a new
object. This allows userts to get rid of
Ember.Observeto use some advanced patterns and makes possible some advanced time-travel debugging.
- [ENHANCEMENT] Allow to customize the classes used for animations with
transitioningInClass,transitionedInClassandtransitioningOutClass. - [BUGFIX] Property detect space on the right when
horizontalPosition="auto"(the default) and position the element anchored to the right of the dropdown if there is no enough space for it to fit.
- [BUGFIX] Correctly remove touchmove event on touch ends.
- [BUGFIX] Prevent DOM access in fastboot mode.
- [ENHANCEMENT] If the component gets disabled while it's opened, it is closed automatically.
- [ENHANCEMENT] Expose
clickDropdownandtapDropdownacceptance helpers. - [BUGFIX] Allow to nest a dropdown inside another dropdown without the second being rendered in place.
- [BUGFIX] Apply enter animation after render. Otherwise it take place before the component
gains the
--aboveor--belowclass, which is needed to know how to animate.
- [BUGFIX] Allow
toproperty of the content component to be undefined
- [BUGFIX] Fix positioning of dropdowns rendered in-place due to a typo
- [BUGFIX] Ensure the
disabledproperty of the public API is updated properly
- [BUGFIX] Ensure reposition is not applied in destroyed components
- [BUGFIX] Fix animations
- [INTERNAL] Update ember-cli to 2.6
- [INTERNAL] Update ember-wormhole to 0.4.0 (fastboot support)
- [BUGFIX] Correct behaviour of
aria-disabled,aria-expanded,aria-invalid,aria-pressedandaria-requiredin Ember 2.7+ - [ENHANCEMENT] Allow to customize componets for the trigger and the content, with the
triggerComponentandcontentComponentproperties. - [BUGFIX] Stop relying in
this.elementId, since it is not present in Ember 2.7+ on tagless components. - [ENHANCEMENT] Add an
onBluraction to the trigger - [BUGFIX] Change repositioning logic so it doesn't sets properties from inside the
didInsertElement, which is deprecated and causes a performance penalty.
- [ENHANCEMENT] Although the component is tagless by default, if the user passes
renderInPlace=true, a wrapper element with class.ember-basic-dropdownis added to be able to position the content properly. - [BUGFIX] The reposition function no longer sets any observable state, so it can be called at any time without worring about the runloop and double renders. More performant and fixes a bug when something inside gains the focus faster than the reposition.
- [BUGFIX] Don't focus the trigger again when the dropdown is closed as consecuence of clicking outside it.
- [ENHANCEMENT] Allow to add focusin/out events to the trigger
- [BUGFIX] Ensure that if the trigger receives
tabindex=nullit still defaults to 0.
- [BUGFIX] Ensure that the
aria-controlsattribute of the trigger points to the content by default.
- [BUGFIX] Focus the trigger when the component is closed
- [BUGFIX] Allow to attach
onFocusInandonFocusOutevent the the dropdown content component.
- [BUGFIX] Around half a docen regressions and changes, including add the proper classes to trigger and content when the component is rendered above/below/right/left/center/in-place. Now those cases are different between trigger and content for better granularity.
- [BREAKING CHANGE] Brand new API