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

Update Strada to incorporate Stimulus and changes from HEY #2

Merged
merged 1 commit into from
Apr 11, 2023

Conversation

dginsburg
Copy link
Contributor

@dginsburg dginsburg commented Jan 21, 2022

This PR continues the work begun by Zach Waugh to make Stimulus a dependency and export the Component specialization of the Stimulus Controller.

Most of the work was functional as we received it. We cleaned up some minor things and compared it to the Strada code that can be pulled from hey.com. We added the additional functionality that was on hey.com for Android compatibility.

I'm not sure what held up the completion of Strada in Dec 2020. My guess would be that BridgeElement contains attributes and CSS classes that are HEY patterns.

Strada is useful in its current form and we have it on our production site at Polywork.

There is a corresponding iOS PR at hotwired/strada-ios#2.

@@ -10,6 +10,7 @@ const options = {
bundle: true,
minify: true,
banner: banner,
format: 'esm',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We ran into what I believe is a dependency conflict because Strada embeds Stimulus and we also include the public Stimulus package. Changing the output format to esm caused the compiled JS to only export the Component object and eliminated the conflict.

I saw that Hotwire has moved to a new build system so I didn't spend a lot of time fighting it as I expect this will be redone for public release.

@jayohms
Copy link
Contributor

jayohms commented Jan 21, 2022

Lovely, @dginsburg! I should be able to look at this next week.

Copy link
Contributor

@jayohms jayohms left a comment

Choose a reason for hiding this comment

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

@dginsburg This is embarrassingly late, but I really appreciate all the changes in this PR — they're extremely helpful 🙏. There are still a few HEY-specific concerns in the BridgeElement class, but I'll work on removing those in separate, future PRs.

I'm finally on the push to properly open source Strada. I've got the strada-android library API changes complete and I'll move onto strada-ios after I'm done with the web library changes.

@jayohms jayohms merged commit 48e3430 into incorporate-stimulus Apr 11, 2023
@jayohms jayohms deleted the incorporate-stimulus-polywork branch April 11, 2023 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants