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

Stimulus controller structure and stimulus-rails gem #4417

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

martinemde
Copy link
Member

This loads, but otherwise ignores stimulus. I'll use this as a base to convert each of the javascript features to stimulus.

@martinemde martinemde requested a review from segiddins February 1, 2024 17:39
Copy link

codecov bot commented Feb 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7b9d981) 96.99% compared to head (af8f7a4) 96.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4417   +/-   ##
=======================================
  Coverage   96.99%   96.99%           
=======================================
  Files         349      349           
  Lines        7695     7695           
=======================================
  Hits         7464     7464           
  Misses        231      231           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# stimulus-loading.js is a compiled asset only available from stimulus-rails gem
pin "@hotwired/stimulus-loading", to: "stimulus-loading.js"
pin_all_from "app/javascript/controllers", under: "controllers"
pin "clipboard", preload: false # @2.0.11
Copy link
Member

Choose a reason for hiding this comment

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

Why the change to preload false?

Copy link
Member Author

@martinemde martinemde Feb 1, 2024

Choose a reason for hiding this comment

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

These are only used on specific pages. Seemed aggressive to preload them.

This change snuck in with my overall changes though and wasn't really intended for this commit.

Do you think I should revert this?

Copy link
Member

Choose a reason for hiding this comment

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

It's fine so long as it's intentional and you've tested that it doesn't break the clipboard functionality

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll revert for now. I want to cleanup the loading but I'll do it in a separate PR.

@martinemde martinemde force-pushed the martinemde/stimulus-base branch from 62d3ce4 to ee45981 Compare February 2, 2024 00:32
@martinemde martinemde force-pushed the martinemde/stimulus-base branch from ee45981 to af8f7a4 Compare February 2, 2024 00:56
@@ -1,13 +1,18 @@
# Pin npm packages by running ./bin/importmap

pin "application", preload: true
Copy link
Member Author

Choose a reason for hiding this comment

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

Note: preload: true is the default.

@martinemde martinemde merged commit 1975a07 into master Feb 2, 2024
17 checks passed
@martinemde martinemde deleted the martinemde/stimulus-base branch February 2, 2024 02:43
@Muhammadamjadm

This comment was marked as spam.

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

Successfully merging this pull request may close these issues.

3 participants