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

Use importmap for avo stimulus component #4469

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

martinemde
Copy link
Member

@martinemde martinemde commented Feb 19, 2024

These imports were missed in the original conversion to importmaps. Removes the blocker for #4464.

I can't figure out exactly where this component is used in avo to verify that it continues to work. @segiddins?

@martinemde martinemde requested a review from segiddins February 19, 2024 20:23
@martinemde martinemde force-pushed the martinemde/avo-javascript branch 3 times, most recently from ec4a166 to 75c5733 Compare February 19, 2024 20:34
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (11c620b) 97.15% compared to head (14575c7) 97.15%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4469   +/-   ##
=======================================
  Coverage   97.15%   97.15%           
=======================================
  Files         391      391           
  Lines        8259     8259           
=======================================
  Hits         8024     8024           
  Misses        235      235           

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

@martinemde
Copy link
Member Author

This seems to just not work. Avo is not doing great with CSP in general. The console is a mess.

@martinemde martinemde marked this pull request as draft February 19, 2024 20:57
@martinemde martinemde marked this pull request as ready for review February 19, 2024 21:22
@martinemde
Copy link
Member Author

Fixed. Seems to work. Thanks @segiddins.

@martinemde martinemde force-pushed the martinemde/avo-javascript branch from ca54943 to f0c95f7 Compare February 19, 2024 21:24
const application = window.Stimulus.Application.start();
application.register("nested-form", window.StimulusRailsNestedForm);
<% end %>
<%= javascript_importmap_tags "avo.custom" %>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<%= javascript_importmap_tags "avo.custom" %>
<%= javascript_importmap_tags "avo.custom" %>

Run bin/rails generate avo:js:install then update.
@martinemde martinemde force-pushed the martinemde/avo-javascript branch from f0c95f7 to 14575c7 Compare February 20, 2024 02:18
@martinemde martinemde merged commit 1d33ca5 into master Feb 20, 2024
17 checks passed
@martinemde martinemde deleted the martinemde/avo-javascript branch February 20, 2024 04:50
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.

2 participants