Commit 8f3d178
authored
React on Rails Generator Overhaul & Developer Experience Enhancement
MAJOR IMPROVEMENTS
Generator Architecture Redesign:
- Simplified component structure: Replaced complex client/server split with unified HelloWorld.jsx approach
- Smart documentation: Added inline guidance for when client/server separation is needed
- Better file organization: Improved ror_components directory structure with clear migration paths
- Eliminated bad imports: Fixed server components incorrectly importing from client files
Enhanced Developer Experience:
- Restored colorized output: Re-added Rainbow-colored URLs and visual hierarchy to bin/dev help (wrongly reverted in bd4210b)
- Improved messaging: Better generator success messages with proper endpoint URLs (/hello_world)
- Visual polish: Enhanced help command with emojis, colors, and better formatting
- Process manager detection: Smart detection of Overmind/Foreman with tailored recommendations
Technical Refinements:
- Babel configuration cleanup: Resolved duplicate preset conflicts common in yalc development
- Yalc integration: Improved local development workflow with proper package linking
- Linting compliance: Fixed ESLint/Prettier formatting and RuboCop style violations
- Template consolidation: Streamlined generator templates for better maintainability
DOCUMENTATION & GUIDANCE
Comprehensive TODO Roadmap:
- Created detailed improvement plan covering advanced patterns, TypeScript support, and real-world examples
- Documented migration paths from Webpacker to Shakapacker
- Outlined future generator flags for different architectural patterns
Inline Developer Education:
- Added clear comments explaining when to use client/server split patterns
- Provided examples for React Router, styled-components, and other libraries requiring separation
- Included migration guidance from simple to advanced architectures
PROBLEM SOLVING
Issues Resolved:
- Generator regression: Fixed components not rendering despite correct file structure
- Import conflicts: Eliminated circular dependencies in generated templates
- Configuration conflicts: Addressed Babel preset duplication issues
- Visual regression: Restored accidentally removed colorization and formatting
Quality Improvements:
- Consistent code style: Applied ESLint auto-fixes and RuboCop corrections
- Better error messaging: Improved guidance for common development issues
- Process management: Enhanced development server startup with better visual feedback
IMPACT
This overhaul transforms the React on Rails v15 generator from a complex, error-prone setup into a streamlined, educational, and visually appealing developer experience. New users get a working foundation
immediately, while experienced developers receive clear guidance for advanced patterns.
The enhanced bin/dev help command now serves as both a functional tool and an educational resource, making React on Rails more accessible to developers at all skill levels.1 parent 3ed127f commit 8f3d178
File tree
97 files changed
+2498
-794
lines changed- .github/workflows
- docs/additional-details
- lib
- generators
- react_on_rails
- bin
- templates
- base/base
- app
- javascript
- bundles/HelloWorld/components
- packs
- src/HelloWorld/ror_components
- views
- hello_world
- layouts
- bin
- config
- initializers
- webpack
- dev_tests/spec/system
- redux/base/app/javascript/bundles/HelloWorld
- components
- startup
- react_on_rails
- dev
- server_rendering_pool
- test_helper
- rakelib
- script
- spec
- dummy
- bin
- spec
- helpers
- support
- react_on_rails
- binstubs
- dev
- generators
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
97 files changed
+2498
-794
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
15 | 26 | | |
16 | 27 | | |
17 | | - | |
| 28 | + | |
18 | 29 | | |
19 | 30 | | |
20 | 31 | | |
| |||
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
43 | | - | |
| 54 | + | |
44 | 55 | | |
45 | 56 | | |
46 | 57 | | |
| |||
58 | 69 | | |
59 | 70 | | |
60 | 71 | | |
61 | | - | |
| 72 | + | |
62 | 73 | | |
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
66 | 77 | | |
67 | | - | |
| 78 | + | |
68 | 79 | | |
69 | 80 | | |
70 | 81 | | |
71 | 82 | | |
72 | | - | |
| 83 | + | |
73 | 84 | | |
74 | 85 | | |
75 | 86 | | |
| |||
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
98 | | - | |
| 109 | + | |
99 | 110 | | |
100 | 111 | | |
101 | | - | |
| 112 | + | |
102 | 113 | | |
103 | 114 | | |
104 | 115 | | |
105 | | - | |
| 116 | + | |
106 | 117 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
14 | 27 | | |
15 | 28 | | |
16 | 29 | | |
| |||
19 | 32 | | |
20 | 33 | | |
21 | 34 | | |
22 | | - | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
31 | | - | |
| 44 | + | |
32 | 45 | | |
33 | 46 | | |
34 | 47 | | |
| |||
41 | 54 | | |
42 | 55 | | |
43 | 56 | | |
44 | | - | |
| 57 | + | |
45 | 58 | | |
46 | 59 | | |
47 | 60 | | |
48 | | - | |
| 61 | + | |
49 | 62 | | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
55 | | - | |
| 68 | + | |
56 | 69 | | |
57 | 70 | | |
58 | 71 | | |
59 | 72 | | |
60 | | - | |
| 73 | + | |
61 | 74 | | |
62 | 75 | | |
63 | 76 | | |
| |||
68 | 81 | | |
69 | 82 | | |
70 | 83 | | |
71 | | - | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
77 | 90 | | |
78 | | - | |
| 91 | + | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
83 | 96 | | |
84 | 97 | | |
85 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
86 | 112 | | |
87 | 113 | | |
88 | 114 | | |
| |||
91 | 117 | | |
92 | 118 | | |
93 | 119 | | |
94 | | - | |
| 120 | + | |
95 | 121 | | |
96 | 122 | | |
97 | 123 | | |
98 | 124 | | |
99 | | - | |
| 125 | + | |
100 | 126 | | |
101 | 127 | | |
102 | 128 | | |
| |||
109 | 135 | | |
110 | 136 | | |
111 | 137 | | |
112 | | - | |
| 138 | + | |
113 | 139 | | |
114 | 140 | | |
115 | 141 | | |
116 | 142 | | |
117 | 143 | | |
118 | | - | |
| 144 | + | |
119 | 145 | | |
120 | 146 | | |
121 | 147 | | |
122 | 148 | | |
123 | | - | |
| 149 | + | |
124 | 150 | | |
125 | 151 | | |
126 | 152 | | |
127 | 153 | | |
128 | 154 | | |
129 | 155 | | |
130 | | - | |
| 156 | + | |
131 | 157 | | |
132 | 158 | | |
133 | | - | |
| 159 | + | |
134 | 160 | | |
135 | 161 | | |
136 | 162 | | |
137 | 163 | | |
138 | 164 | | |
139 | 165 | | |
140 | | - | |
| 166 | + | |
141 | 167 | | |
142 | 168 | | |
143 | 169 | | |
| |||
172 | 198 | | |
173 | 199 | | |
174 | 200 | | |
175 | | - | |
| 201 | + | |
176 | 202 | | |
177 | 203 | | |
178 | 204 | | |
179 | 205 | | |
180 | 206 | | |
181 | 207 | | |
182 | 208 | | |
183 | | - | |
| 209 | + | |
184 | 210 | | |
185 | 211 | | |
186 | 212 | | |
187 | 213 | | |
188 | 214 | | |
189 | | - | |
| 215 | + | |
190 | 216 | | |
191 | 217 | | |
192 | 218 | | |
193 | 219 | | |
194 | | - | |
| 220 | + | |
195 | 221 | | |
196 | 222 | | |
197 | 223 | | |
198 | 224 | | |
199 | | - | |
| 225 | + | |
200 | 226 | | |
201 | 227 | | |
202 | 228 | | |
203 | 229 | | |
204 | | - | |
| 230 | + | |
205 | 231 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | | - | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
53 | 54 | | |
54 | | - | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
0 commit comments