Skip to content

Comments

restructure client#109

Merged
leastbad merged 2 commits intostimulusreflex:masterfrom
leastbad:pipeline
Feb 10, 2021
Merged

restructure client#109
leastbad merged 2 commits intostimulusreflex:masterfrom
leastbad:pipeline

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.

2 participants