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

restructure client #109

Merged
merged 2 commits into from
Feb 10, 2021
Merged

restructure client #109

merged 2 commits into from
Feb 10, 2021

Conversation

leastbad
Copy link
Contributor

@leastbad leastbad commented Feb 9, 2021

This PR primaryily exists to move the giant DOMOperations object out of the main cable_ready.js file.

It also converts activeElement to a memoized object with an element getter and a set setter.

didMorph and shouldMorph have been moved into the [renamed] morph_callbacks.js, although the shouldMorphCallbacks and didMorphCallbacks arrays are still defined in the main file, as they are part of the public API.

This PR doesn't add or remove any functionality. It has been tested successfully against my CR tests harness.

@leastbad leastbad added proposal javascript Pull requests that update Javascript code labels Feb 9, 2021
@leastbad
Copy link
Contributor Author

leastbad commented Feb 9, 2021

Just a reminder to myself that once this PR (hopefully!) goes in, that the follow-up is in the before_after branch.

Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

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

👍🏻 This is great. I've been hoping to get a similar refactor in myself.

@leastbad leastbad merged commit 2bc52c1 into stimulusreflex:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants