Skip to content

Commit 76f0fee

Browse files
committed
fix: move JavaScript pack tags to head element to resolve Turbo warning
- Move stylesheet_pack_tag and javascript_pack_tag to head element - Prevents Turbo warning about scripts being loaded from body - Scripts are still deferred to maintain performance - Fixes browser console warning about script evaluation on page changes
1 parent 84316f4 commit 76f0fee

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

app/views/layouts/application.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<%= append_javascript_pack_tag('stimulus-bundle') %>
1010
<%= append_javascript_pack_tag('stores-registration') %>
1111

12+
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
13+
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
14+
1215
<%= csrf_meta_tags %>
1316
</head>
1417
<body class="min-h-screen flex flex-col bg-sky-50 text-gray-700">
@@ -20,9 +23,6 @@
2023

2124
<%= react_component "Footer" %>
2225

23-
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
24-
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
25-
2626
<!-- This is a placeholder for ReactOnRails to know where to render the store props for
2727
client side hydration -->
2828
<%= redux_store_hydration_data %>

app/views/layouts/stimulus_layout.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99

1010
<%= append_stylesheet_pack_tag('stimulus-bundle') %>
1111
<%= append_javascript_pack_tag('stimulus-bundle') %>
12+
13+
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
14+
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
1215
</head>
1316
<body class="min-h-screen flex flex-col bg-sky-50 text-gray-700">
1417
<%= react_component "NavigationBarApp" %>
@@ -18,8 +21,5 @@
1821
</div>
1922

2023
<%= react_component "Footer" %>
21-
22-
<%= stylesheet_pack_tag(media: 'all', 'data-turbolinks-track': true) %>
23-
<%= javascript_pack_tag('data-turbolinks-track': true, defer: true) %>
2424
</body>
2525
</html>

pr-review-command.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Claude PR Review Command
2+
3+
Add this to your ~/.claude/CLAUDE.md file:
4+
5+
## PR Review Command
6+
7+
When asked to review a PR, perform a comprehensive review following these steps:
8+
9+
1. **Fetch PR Details**: Use `gh pr view <PR_NUMBER> --json title,body,state,commits,files,additions,deletions,changedFiles`
10+
11+
2. **Analyze Changes**:
12+
- Review the diff with `gh pr diff <PR_NUMBER>`
13+
- Check for breaking changes
14+
- Verify consistency with existing code patterns
15+
- Check for security issues
16+
- Review test coverage
17+
18+
3. **Provide Structured Review**:
19+
- **Summary**: Brief overview of changes
20+
- **Strengths**: What's done well
21+
- **Concerns**: Potential issues or risks
22+
- **Breaking Changes**: Any backwards compatibility issues
23+
- **Security**: Any security considerations
24+
- **Performance**: Performance implications
25+
- **Code Quality**: Style, patterns, best practices
26+
- **Testing**: Test coverage and quality
27+
- **Documentation**: Are changes documented?
28+
- **Suggestions**: Specific improvements
29+
- **Risk Level**: Low/Medium/High
30+
- **Recommendation**: Approve/Request Changes/Needs Discussion
31+
32+
4. **Check CI Status**: `gh pr checks <PR_NUMBER>`
33+
34+
5. **Review Comments**: Check existing review comments if any

0 commit comments

Comments
 (0)