bmeurant / ember-array-contains-helper

Ember helper to test the presence of a value in an array
http://bmeurant.github.io/ember-array-contains-helper/
MIT License
22 stars 2 forks source link

update project #196

Closed miguelcobain closed 8 months ago

miguelcobain commented 8 months ago

@bmeurant this is my proposal for this addon.

Let me explain what this does.

First, there's this text I added to the README:

In recent Ember versions, you problem don't need an addon for this case. With the introduction of helper functions, you can just easily create a local helper that checks if an element is contained in an array.

If you want the helper to react to add/removals, you should be using some version of a "reactive" array. Either EmberArray or TrackedArray from tracked-built-ins. See demo here.

In any case, this addon should be compatible with basically every ember version from 3.28 to 5.x.

So, the goal of this PR is to make this addon as compatible as possible and then "forget" about it. Meaning that people should probably be using different approaches in their apps nowadays.

I managed to get this addon compatible up to latest ember 5! (even canary)

image

Because the dummy app and tests are "linked", I had to give up on the dummy app. ember-paper was causing a lot of issues.

I hope this provides a good state to leave this addon.

bmeurant commented 8 months ago

Hi @miguelcobain Thank you very much!

I fully agree on your proposal to leave it as clean as possible and then to forget about it as it exists, now, more "native approaches" in ember.

I'll still have to clear the readme of obsolete sections (docs, demo, etc.)

Many thanks, again