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

✨ Rearchitect for Octane and tracked properties #235

Merged

Conversation

achambers
Copy link
Collaborator

@achambers achambers commented Nov 24, 2020

This PR is a reimagining of the repo, implemented with glimmer tracking, specifically designed to work with Ember Octane and above.

Tracked properties allows us to remove a significant amount of complexity and to move to more natural Javascript patterns instead of Ember specific ones.

As a result, the intention is that this PR will form the basis for v2 of the addon that will support only Ember versions 3.17 and above.

From a high level this PR removes the concept of Ember services to keep track of the LD client and removes the initializers to instantiate them. It replaces them with simple functions that store and retrieve the client state from an object stored on window, not unlike how something like @sentry/browser operates.

A nice addition to this new pattern is that the nicer API that the babel plugin gave us (a variation import) is now the exact way we import and use the variation function. So, we were able to remove the babel plugin completely and just use JS.

@achambers achambers self-assigned this Nov 24, 2020
@achambers achambers changed the base branch from master to beta-2-x November 24, 2020 11:11
@achambers achambers marked this pull request as ready for review November 24, 2020 15:09
@achambers achambers marked this pull request as draft November 24, 2020 15:10
@achambers achambers force-pushed the based-on-tracked-properties branch from 862a846 to 7e034d5 Compare November 24, 2020 15:22
@achambers achambers force-pushed the based-on-tracked-properties branch from 7e034d5 to c6067db Compare November 24, 2020 16:17
@achambers achambers mentioned this pull request Nov 24, 2020
5 tasks
@achambers achambers marked this pull request as ready for review November 24, 2020 16:31
@achambers achambers mentioned this pull request May 11, 2021
30 tasks
@achambers achambers force-pushed the based-on-tracked-properties branch 2 times, most recently from 140761e to 5437ac4 Compare May 11, 2021 20:36
@achambers achambers merged commit ec0a27d into adopted-ember-addons:beta-2-x May 12, 2021
@achambers achambers deleted the based-on-tracked-properties branch May 12, 2021 07:08
@chrisvdp
Copy link
Contributor

Congrats @achambers !

@achambers
Copy link
Collaborator Author

Congrats @achambers !

🙏 @chrisvdp

Apologies it took so long. But this new world is soooo much simpler so I'm looking forward to being able to keep it up to date moving forward.

Not sure if you're still using/invested in this addon but it'd be wonderful if you are in a position to trial the v2 beta and let me know if you run in to any issues.

Just updating my production app so hoping to have have a good idea of how stable it is soon.

@chrisvdp
Copy link
Contributor

Sadly, I've moved jobs and am no longer doing Ember. Maybe @k-dauda

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

Successfully merging this pull request may close these issues.

2 participants