Skip to content

Commit 8f74e2d

Browse files
justin808claude
andcommitted
Address code review feedback for configuration documentation
- Fix CHANGELOG PR format from [PR 2011] to [PR #2011] for consistency - Enhance test configuration comments in generator template for clarity - Add warning emoji and "ONLY ONE" emphasis - Expand approach descriptions with bullet points - Clarify that alternative approach requires both uncommenting AND TestHelper setup - Add 'text' language tag to directory structure code block in configuration.md - Replace Rails.root paths with absolute GitHub URLs in doctor.rb - Ensures documentation links work in all execution contexts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f0923ca commit 8f74e2d

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Changes since the last non-beta release.
5555

5656
#### Documentation
5757

58-
- **Simplified Configuration Files**: Improved configuration documentation and generator template for better clarity and usability. Reduced generator template from 67 to 42 lines (37% reduction). Added comprehensive testing configuration guide. Reorganized configuration docs into Essential vs Advanced sections. Enhanced Doctor program with diagnostics for server rendering and test compilation consistency. [PR 2011](https://github.com/shakacode/react_on_rails/pull/2011) by [justin808](https://github.com/justin808).
58+
- **Simplified Configuration Files**: Improved configuration documentation and generator template for better clarity and usability. Reduced generator template from 67 to 42 lines (37% reduction). Added comprehensive testing configuration guide. Reorganized configuration docs into Essential vs Advanced sections. Enhanced Doctor program with diagnostics for server rendering and test compilation consistency. [PR #2011](https://github.com/shakacode/react_on_rails/pull/2011) by [justin808](https://github.com/justin808).
5959

6060
#### Deprecated
6161

docs/api-reference/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ config.build_production_command = BuildProductionCommand
676676

677677
Recommended directory structure with private server bundles:
678678

679-
```
679+
```text
680680
app/
681681
├── ssr-generated/ # Private server bundles (never served to browsers)
682682
│ ├── server-bundle.js

lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ ReactOnRails.configure do |config|
1515
################################################################################
1616
# Test Configuration (Optional)
1717
################################################################################
18-
# Two mutually exclusive approaches - use ONE of the following:
18+
# ⚠️ IMPORTANT: Two mutually exclusive approaches - use ONLY ONE:
1919
#
20-
# RECOMMENDED: Set `compile: true` in config/shakapacker.yml for test environment
21-
# This is simpler and handled automatically by Shakapacker.
20+
# RECOMMENDED APPROACH: Set `compile: true` in config/shakapacker.yml test section
21+
# - Simpler configuration (no additional setup needed)
22+
# - Handled automatically by Shakapacker
2223
#
23-
# ALTERNATIVE: Uncomment below and add ReactOnRails::TestHelper to spec helpers
24-
# Use this approach only if you need explicit control over test asset compilation.
25-
# See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md
24+
# ALTERNATIVE APPROACH: Uncomment below AND configure ReactOnRails::TestHelper
25+
# - Provides explicit control over test asset compilation timing
26+
# - Requires adding ReactOnRails::TestHelper to spec/rails_helper.rb
27+
# - See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md
2628
#
2729
# config.build_test_command = "RAILS_ENV=test bin/shakapacker"
2830

lib/react_on_rails/doctor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ def check_build_test_configuration
11861186
checker.add_info(" 💡 These are mutually exclusive - use only one approach")
11871187
checker.add_info(" 💡 Recommended: Use compile: true in shakapacker.yml (simpler)")
11881188
checker.add_info(" 💡 Alternative: Use build_test_command with ReactOnRails::TestHelper (explicit control)")
1189-
checker.add_info(" 📖 See: #{Rails.root}/docs/guides/testing-configuration.md")
1189+
checker.add_info(" 📖 See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md")
11901190
elsif has_build_test_command && !uses_test_helper
11911191
checker.add_warning(" ⚠️ build_test_command is set but ReactOnRails::TestHelper is not configured")
11921192
checker.add_info(" 💡 Add to spec/rails_helper.rb:")
@@ -1201,7 +1201,7 @@ def check_build_test_configuration
12011201
checker.add_warning(" ⚠️ No test asset compilation configured")
12021202
checker.add_info(" 💡 Recommended: Add to shakapacker.yml test section:")
12031203
checker.add_info(" compile: true")
1204-
checker.add_info(" 📖 See: #{Rails.root}/docs/guides/testing-configuration.md")
1204+
checker.add_info(" 📖 See: https://github.com/shakacode/react_on_rails/blob/master/docs/guides/testing-configuration.md")
12051205
elsif has_compile_true
12061206
checker.add_success(" ✅ Test assets configured via Shakapacker auto-compilation")
12071207
checker.add_info(" (compile: true in shakapacker.yml)")

0 commit comments

Comments
 (0)