Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

498 add event handlers #499

Merged
merged 15 commits into from
Jul 16, 2020
Merged

498 add event handlers #499

merged 15 commits into from
Jul 16, 2020

Conversation

lougreenwood
Copy link
Contributor

@lougreenwood lougreenwood commented Oct 22, 2019

Closes #498.

* @see https://github.com/cibernox/ember-basic-dropdown/issues/498
* @memberof BasicDropdownContent
*/
@action
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are not accessing this, there is no need of decorating the function with @action

@lougreenwood
Copy link
Contributor Author

@cibernox I just rebased this PR on latest master.

Since I originally created this PR, the repo has moved to TypeScript, which makes pinning this branch in our package.json more difficult as our project is not TS, so we don't have tooling setup to build a TS branch.

With that in mind, I'm keen to pick up this PR and help to get it merged.

So.... I have a question... What do you think about tests for this fix? It seems that proper integration tests would require mocking each of the interaction events to ensure that the callback is properly called. But since this is a stopgap solution, which will probably be un-documented and used by a small number of people and is pretty straight forward, I'm not sure it's worth the effort of adding tests.

WDYT?

@lougreenwood lougreenwood marked this pull request as ready for review June 20, 2020 08:45
@lougreenwood
Copy link
Contributor Author

@cibernox any thoughts on this, would be great to get it merged in so that our (non-TS) project can move to V3 & ember power select 4?

Thanks!

@lougreenwood
Copy link
Contributor Author

lougreenwood commented Jul 16, 2020

@cibernox I've added tests for the temporary event args and we're 🟢.

Would really appreciate a review as this is blocking upgrading our project past Ember 3.16. Thanks!

@cibernox cibernox merged commit 3d57b4a into cibernox:master Jul 16, 2020
@cibernox
Copy link
Owner

Merged, but this makes me a bit sad. Clearly the component helper should allow element modifiers to be passed in.

@cibernox
Copy link
Owner

Can you test this using master before I cut a new release?

@lougreenwood
Copy link
Contributor Author

lougreenwood commented Jul 16, 2020

Merged, but this makes me a bit sad. Clearly the component helper should allow element modifiers to be passed in.

Me too, but I tried to make it easy to remove, so 🤞that something like emberjs/rfcs#497 ever lands.

Can you test this using master before I cut a new release?

We don't have TypeScript setup for our project, so it will take me some time to handle that. Is there another way to test, maybe cutting some temporary release? We've been using c839061 for at least 4 months in production now, and all that's changed since then is adding typings and tests...

@lougreenwood
Copy link
Contributor Author

After discussing this on #e-typescript, it seems that I shouldn't have any issues using it in a non-TS project, so will test and get back to you 👍

@lougreenwood
Copy link
Contributor Author

I've had a chance to test, it's working well. However, I noticed another related issue which I'll create a PR for on Monday

@lougreenwood
Copy link
Contributor Author

@cibernox Followup PR created - #499 Thanks

@lougreenwood lougreenwood deleted the 498-add-event-handlers branch July 29, 2020 06:38
@lougreenwood
Copy link
Contributor Author

@cibernox I've been using this branch for about a week now. We haven't done a release on master, but so far in my testing I haven't seen any issues. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add back eventHandler arguments in V2
2 participants